mirror of
https://github.com/fluencelabs/musl
synced 2025-05-04 11:32:14 +00:00
run dtors before taking the exit-lock in pthread exit
previously a long-running dtor could cause pthread_detach to block.
This commit is contained in:
parent
6232b96f51
commit
f58c8a0f39
@ -22,10 +22,10 @@ void __pthread_unwind_next(struct __ptcb *cb)
|
||||
longjmp((void *)cb->__next->__jb, 1);
|
||||
}
|
||||
|
||||
__lock(&self->exitlock);
|
||||
|
||||
__pthread_tsd_run_dtors();
|
||||
|
||||
__lock(&self->exitlock);
|
||||
|
||||
/* Mark this thread dead before decrementing count */
|
||||
self->dead = 1;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user