X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=src%2Fthread%2Fpthread_join.c;h=86191f252dda86cc398a57303a482afbcb5a7ddd;hp=1b0c4f35de683bac3d15a5c4b6e0c87a61b49501;hb=e6d765a8b1278e9e5f507638ccdec9fe40e52364;hpb=eb351a9e633e5893f0c3bb48808c3ed0280585b5 diff --git a/src/thread/pthread_join.c b/src/thread/pthread_join.c index 1b0c4f35..86191f25 100644 --- a/src/thread/pthread_join.c +++ b/src/thread/pthread_join.c @@ -6,8 +6,8 @@ static void dummy(void *p) int pthread_join(pthread_t t, void **res) { - int tmp = t->tid; - if (tmp) __timedwait(&t->tid, tmp, 0, 0, dummy, 0, 0); + 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;