summaryrefslogtreecommitdiffstats
path: root/lib/libthr/thread/thr_join.c
diff options
context:
space:
mode:
authormtm <mtm@FreeBSD.org>2004-03-28 14:05:28 +0000
committermtm <mtm@FreeBSD.org>2004-03-28 14:05:28 +0000
commitc715901410e98c7b0c336278828765e4285964d3 (patch)
treec847bc30278d22c01ea70ac7fbb7c69dc9831151 /lib/libthr/thread/thr_join.c
parent1425c998a18db105fcdc560157ebc5bb857ab2e6 (diff)
downloadFreeBSD-src-c715901410e98c7b0c336278828765e4285964d3.zip
FreeBSD-src-c715901410e98c7b0c336278828765e4285964d3.tar.gz
Remove the garbage collector thread. All resources are freed
in-line. If the exiting thread cannot release a resource, then the next thread to exit will release it.
Diffstat (limited to 'lib/libthr/thread/thr_join.c')
-rw-r--r--lib/libthr/thread/thr_join.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libthr/thread/thr_join.c b/lib/libthr/thread/thr_join.c
index 30acc93..b96eedc 100644
--- a/lib/libthr/thread/thr_join.c
+++ b/lib/libthr/thread/thr_join.c
@@ -160,12 +160,12 @@ _pthread_join(pthread_t pthread, void **thread_return)
*thread_return = pthread->ret;
}
- /* Make the thread collectable by the garbage collector. */
+ /* Free all remaining memory allocated to the thread. */
pthread->attr.flags |= PTHREAD_DETACHED;
UMTX_UNLOCK(&pthread->lock);
+ TAILQ_REMOVE(&_dead_list, pthread, dle);
+ deadlist_free_onethread(pthread);
THREAD_LIST_UNLOCK;
- if (pthread_cond_signal(&_gc_cond) != 0)
- PANIC("Cannot signal gc cond");
DEAD_LIST_UNLOCK;
}
OpenPOWER on IntegriCloud