use weak aliases rather than function pointers to simplify some code
[musl] / src / thread / pthread_join.c
1 #include "pthread_impl.h"
2
3 static void dummy(void *p)
4 {
5 }
6
7 int pthread_join(pthread_t t, void **res)
8 {
9         int tmp = t->tid;
10         if (tmp) __timedwait(&t->tid, tmp, 0, 0, dummy, 0, 1);
11         if (res) *res = t->result;
12         if (t->map_base) munmap(t->map_base, t->map_size);
13         return 0;
14 }