X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fthread%2Fpthread_create.c;h=d60c2a4d3b8442f2a2bba1ee3855096b84261e6c;hb=94a0171d807dc94302d6505041fc58879c27f3bd;hp=c856c58110beab936fa1a665ae4a6b0f023ac613;hpb=f58c8a0f391987a65e055ae591ec59b9df7b7f7c;p=musl diff --git a/src/thread/pthread_create.c b/src/thread/pthread_create.c index c856c581..d60c2a4d 100644 --- a/src/thread/pthread_create.c +++ b/src/thread/pthread_create.c @@ -27,7 +27,9 @@ void __pthread_unwind_next(struct __ptcb *cb) __lock(&self->exitlock); /* Mark this thread dead before decrementing count */ + __lock(&self->killlock); self->dead = 1; + a_store(&self->killlock, 0); do n = libc.threads_minus_1; while (n && a_cas(&libc.threads_minus_1, n, n-1)!=n);