diff options
author | Brian Somers <brian@FreeBSD.org> | 2007-03-05 17:47:27 +0000 |
---|---|---|
committer | Brian Somers <brian@FreeBSD.org> | 2007-03-05 17:47:27 +0000 |
commit | ee12856f1d4a2a8eefcbc53fc64b2298900f9093 (patch) | |
tree | fba9c55c660a6349fe83984ae7f6a4012d3b2e29 /lib/libpthread/thread/thr_kern.c | |
parent | db181dc741b63797fad3a1acf14e66bc2e801894 (diff) |
Notes
Diffstat (limited to 'lib/libpthread/thread/thr_kern.c')
-rw-r--r-- | lib/libpthread/thread/thr_kern.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/libpthread/thread/thr_kern.c b/lib/libpthread/thread/thr_kern.c index 02ced942abcc5..20e81737bdbe6 100644 --- a/lib/libpthread/thread/thr_kern.c +++ b/lib/libpthread/thread/thr_kern.c @@ -228,6 +228,10 @@ _kse_single_thread(struct pthread *curthread) __sys_sigprocmask(SIG_SETMASK, &curthread->sigmask, NULL); _thread_active_threads = 1; + curthread->kse->k_kcb->kcb_kmbx.km_curthread = NULL; + curthread->attr.flags &= ~PTHREAD_SCOPE_SYSTEM; + curthread->attr.flags |= PTHREAD_SCOPE_SYSTEM; + /* * Enter a loop to remove and free all threads other than * the running thread from the active thread list: @@ -310,13 +314,6 @@ _kse_single_thread(struct pthread *curthread) inited = 0; } - /* - * After a fork(), the leftover thread goes back to being - * scope process. - */ - curthread->attr.flags &= ~PTHREAD_SCOPE_SYSTEM; - curthread->attr.flags |= PTHREAD_SCOPE_PROCESS; - /* We're no longer part of any lists */ curthread->tlflags = 0; |