X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fthread%2Fpthread_create.c;h=94dc308dceffcabf728f213b1290519f68f38381;hb=1fb01691547e85be253a4f1543be3920de651e27;hp=ae2f9e4e9b1cb6583e1820b50d150c4bab5de6dc;hpb=92f8396b0c8e4f146563b87f46137484cfb36e31;p=musl diff --git a/src/thread/pthread_create.c b/src/thread/pthread_create.c index ae2f9e4e..94dc308d 100644 --- a/src/thread/pthread_create.c +++ b/src/thread/pthread_create.c @@ -24,12 +24,12 @@ void pthread_exit(void *result) __pthread_tsd_run_dtors(); - __lock(&self->exitlock); + __lock(self->exitlock); /* Mark this thread dead before decrementing count */ - __lock(&self->killlock); + __lock(self->killlock); self->dead = 1; - a_store(&self->killlock, 0); + __unlock(self->killlock); do n = libc.threads_minus_1; while (n && a_cas(&libc.threads_minus_1, n, n-1)!=n);