1*c9945492SAndroid Build Coastguard Worker #include <stdint.h> 2*c9945492SAndroid Build Coastguard Worker #include <threads.h> 3*c9945492SAndroid Build Coastguard Worker #include <pthread.h> 4*c9945492SAndroid Build Coastguard Worker thrd_join(thrd_t t,int * res)5*c9945492SAndroid Build Coastguard Workerint thrd_join(thrd_t t, int *res) 6*c9945492SAndroid Build Coastguard Worker { 7*c9945492SAndroid Build Coastguard Worker void *pthread_res; 8*c9945492SAndroid Build Coastguard Worker __pthread_join(t, &pthread_res); 9*c9945492SAndroid Build Coastguard Worker if (res) *res = (int)(intptr_t)pthread_res; 10*c9945492SAndroid Build Coastguard Worker return thrd_success; 11*c9945492SAndroid Build Coastguard Worker } 12