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