X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=src%2Fthread%2Fpthread_join.c;h=719c91ca24f7b03f729657a27208e10e3bf1c020;hp=5210ed4835b760769b3836e4ba0cf4fab03d9b0a;hb=2d0f495e7bbcc1b17bf118b939e347e2d771fa2f;hpb=0b44a0315b47dd8eced9f3b7f31580cf14bbfc01 diff --git a/src/thread/pthread_join.c b/src/thread/pthread_join.c index 5210ed48..719c91ca 100644 --- a/src/thread/pthread_join.c +++ b/src/thread/pthread_join.c @@ -1,11 +1,14 @@ #include "pthread_impl.h" +#include + +static void dummy(void *p) +{ +} int pthread_join(pthread_t t, void **res) { - int tmp = t->tid; - CANCELPT_BEGIN; - if (tmp) __wait(&t->tid, 0, tmp, 1); - CANCELPT_END; + int tmp; + while ((tmp = t->tid)) __timedwait(&t->tid, tmp, 0, 0, dummy, 0, 0); if (res) *res = t->result; if (t->map_base) munmap(t->map_base, t->map_size); return 0;