提交 f58c8a0f 编写于 作者: R Rich Felker

run dtors before taking the exit-lock in pthread exit

previously a long-running dtor could cause pthread_detach to block.
上级 6232b96f
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册