summaryrefslogtreecommitdiffstats
path: root/lib/libthr/thread/thr_fork.c
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2010-09-13 07:03:01 +0000
committerdavidxu <davidxu@FreeBSD.org>2010-09-13 07:03:01 +0000
commite87e922f3125332f002638f5f231acc7544b7ebf (patch)
tree82f35174d92e7167b6c95a574f45720b60ded582 /lib/libthr/thread/thr_fork.c
parent8ff2afea3997418eb503ad0843ed126e994fe54b (diff)
downloadFreeBSD-src-e87e922f3125332f002638f5f231acc7544b7ebf.zip
FreeBSD-src-e87e922f3125332f002638f5f231acc7544b7ebf.tar.gz
Convert thread list lock from mutex to rwlock.
Diffstat (limited to 'lib/libthr/thread/thr_fork.c')
-rw-r--r--lib/libthr/thread/thr_fork.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libthr/thread/thr_fork.c b/lib/libthr/thread/thr_fork.c
index c15e8f9..dd6005a 100644
--- a/lib/libthr/thread/thr_fork.c
+++ b/lib/libthr/thread/thr_fork.c
@@ -178,13 +178,13 @@ _fork(void)
/* Child process */
errsave = errno;
curthread->cancel_pending = 0;
- curthread->flags &= ~THR_FLAGS_NEED_SUSPEND;
+ curthread->flags &= ~(THR_FLAGS_NEED_SUSPEND|THR_FLAGS_DETACHED);
/*
* Thread list will be reinitialized, and later we call
* _libpthread_init(), it will add us back to list.
*/
- curthread->tlflags &= ~(TLFLAGS_IN_TDLIST | TLFLAGS_DETACHED);
+ curthread->tlflags &= ~TLFLAGS_IN_TDLIST;
/* child is a new kernel thread. */
thr_self(&curthread->tid);
OpenPOWER on IntegriCloud