projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6232b96
)
run dtors before taking the exit-lock in pthread exit
author
Rich Felker
<dalias@aerifal.cx>
Tue, 14 Jun 2011 05:25:17 +0000
(
01:25
-0400)
committer
Rich Felker
<dalias@aerifal.cx>
Tue, 14 Jun 2011 05:25:17 +0000
(
01:25
-0400)
previously a long-running dtor could cause pthread_detach to block.
src/thread/pthread_create.c
patch
|
blob
|
history
diff --git
a/src/thread/pthread_create.c
b/src/thread/pthread_create.c
index d1eea0cead731d4523d0c09fc114ae91bd27f006..c856c58110beab936fa1a665ae4a6b0f023ac613 100644
(file)
--- a/
src/thread/pthread_create.c
+++ b/
src/thread/pthread_create.c
@@
-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;