thrd_join.c 266 B

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