clean up sloppy nested inclusion from pthread_impl.h
[musl] / src / thread / pthread_join.c
1 #include "pthread_impl.h"
2 #include <sys/mman.h>
3
4 static void dummy(void *p)
5 {
6 }
7
8 int pthread_join(pthread_t t, void **res)
9 {
10         int tmp;
11         while ((tmp = t->tid)) __timedwait(&t->tid, tmp, 0, 0, dummy, 0, 0);
12         if (res) *res = t->result;
13         if (t->map_base) munmap(t->map_base, t->map_size);
14         return 0;
15 }