summaryrefslogtreecommitdiffstats
path: root/lib/libthr/thread/thr_join.c
diff options
context:
space:
mode:
authormtm <mtm@FreeBSD.org>2003-05-29 20:46:53 +0000
committermtm <mtm@FreeBSD.org>2003-05-29 20:46:53 +0000
commite0fdf7a90db60211ee59359697c41dab2d566785 (patch)
tree24627382282fb3a2ee03fe4390d9fac487628e88 /lib/libthr/thread/thr_join.c
parent9863dd8503db3fadb6ae84c6eee25d7ee94a2a5a (diff)
downloadFreeBSD-src-e0fdf7a90db60211ee59359697c41dab2d566785.zip
FreeBSD-src-e0fdf7a90db60211ee59359697c41dab2d566785.tar.gz
Don't hold the active thread list lock when signaling the gc thread.
The dead list thread is sufficient for synchronization. Retire the arch_id (ldt array slot) in the gc thread instead of the doing it in the thread itself. Approved by: re/jhb
Diffstat (limited to 'lib/libthr/thread/thr_join.c')
-rw-r--r--lib/libthr/thread/thr_join.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libthr/thread/thr_join.c b/lib/libthr/thread/thr_join.c
index 88a71f2..2a5433a 100644
--- a/lib/libthr/thread/thr_join.c
+++ b/lib/libthr/thread/thr_join.c
@@ -160,9 +160,9 @@ _pthread_join(pthread_t pthread, void **thread_return)
/* Make the thread collectable by the garbage collector. */
pthread->attr.flags |= PTHREAD_DETACHED;
_SPINUNLOCK(&pthread->lock);
+ THREAD_LIST_UNLOCK;
if (pthread_cond_signal(&_gc_cond) != 0)
PANIC("Cannot signal gc cond");
- THREAD_LIST_UNLOCK;
DEAD_LIST_UNLOCK;
}
OpenPOWER on IntegriCloud