summaryrefslogtreecommitdiffstats
path: root/lib/libthr/thread/thr_gc.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_gc.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_gc.c')
-rw-r--r--lib/libthr/thread/thr_gc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/libthr/thread/thr_gc.c b/lib/libthr/thread/thr_gc.c
index 9e26314..e2aa753 100644
--- a/lib/libthr/thread/thr_gc.c
+++ b/lib/libthr/thread/thr_gc.c
@@ -142,6 +142,13 @@ _thread_gc(pthread_addr_t arg)
pthread_cln = pthread;
_SPINUNLOCK(&pthread->lock);
+
+ /*
+ * Retire the architecture specific id so it may be
+ * used for new threads.
+ */
+ _retire_thread(pthread_cln->arch_id);
+
}
/*
OpenPOWER on IntegriCloud