diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2005-12-30 21:51:28 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2005-12-30 21:51:28 +0000 |
commit | aaf04e4e4f0096edc118e01161b39850155c3a3b (patch) | |
tree | 79c2608893628bd40442c59784f35fbba157a157 /lib | |
parent | bff697eed14bb7d21911c91be61cd6056b1085da (diff) |
Remove exitinng thread from the list of threads. ok tedu@
Diffstat (limited to 'lib')
-rw-r--r-- | lib/librthread/rthread.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/librthread/rthread.c b/lib/librthread/rthread.c index 60cff0846d7..d29e1277a89 100644 --- a/lib/librthread/rthread.c +++ b/lib/librthread/rthread.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rthread.c,v 1.23 2005/12/30 20:35:11 otto Exp $ */ +/* $OpenBSD: rthread.c,v 1.24 2005/12/30 21:51:27 otto Exp $ */ /* * Copyright (c) 2004,2005 Ted Unangst <tedu@openbsd.org> * All Rights Reserved. @@ -181,6 +181,9 @@ pthread_exit(void *retval) free(oclfn); } _rthread_tls_destructors(thread); + _spinlock(&_thread_lock); + LIST_REMOVE(thread, threads); + _spinunlock(&_thread_lock); #if 0 if (thread->flags & THREAD_DETACHED) free(thread); |