X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fthread%2Fpthread_join.c;h=719c91ca24f7b03f729657a27208e10e3bf1c020;hb=3df0b66ee95c837496ae434ba7a2282d97ca71ef;hp=ba7bb7d54be15ca9ad911af060e2dd75f258abc1;hpb=feee98903cd8119d9a3db62589246a940f44a9f5;p=musl diff --git a/src/thread/pthread_join.c b/src/thread/pthread_join.c index ba7bb7d5..719c91ca 100644 --- a/src/thread/pthread_join.c +++ b/src/thread/pthread_join.c @@ -1,9 +1,14 @@ #include "pthread_impl.h" +#include + +static void dummy(void *p) +{ +} int pthread_join(pthread_t t, void **res) { - int tmp = t->tid; - if (tmp) __timedwait_cp(&t->tid, tmp, 0, 0, 1); + 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;