diff options
author | davidxu <davidxu@FreeBSD.org> | 2008-10-23 07:55:38 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2008-10-23 07:55:38 +0000 |
commit | 2062caca2494bf113adefa9ca01f9f5fb24ad7b9 (patch) | |
tree | 0f85351fa5ffde7cf121d1e0f3f5e83ff415f868 /sys/kern/kern_thr.c | |
parent | b20c19bc667aef513fa9f5449df2d4a833e42d3d (diff) | |
download | FreeBSD-src-2062caca2494bf113adefa9ca01f9f5fb24ad7b9.zip FreeBSD-src-2062caca2494bf113adefa9ca01f9f5fb24ad7b9.tar.gz |
Actually, for signal and thread suspension, extra process spin lock is
unnecessary, the normal process lock and thread lock are enough. The
spin lock is still needed for process and thread exiting to mimic
single sched_lock.
Diffstat (limited to 'sys/kern/kern_thr.c')
-rw-r--r-- | sys/kern/kern_thr.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/kern/kern_thr.c b/sys/kern/kern_thr.c index b460bd3..51f0f05 100644 --- a/sys/kern/kern_thr.c +++ b/sys/kern/kern_thr.c @@ -283,7 +283,6 @@ thr_exit(struct thread *td, struct thr_exit_args *uap) PROC_LOCK(p); sigqueue_flush(&td->td_sigqueue); - PROC_SLOCK(p); /* * Shutting down last thread in the proc. This will actually @@ -291,10 +290,10 @@ thr_exit(struct thread *td, struct thr_exit_args *uap) */ if (p->p_numthreads != 1) { thread_stopped(p); + PROC_SLOCK(p); thread_exit(); /* NOTREACHED */ } - PROC_SUNLOCK(p); PROC_UNLOCK(p); return (0); } |