summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2014-11-10 09:11:23 +0000
committerkib <kib@FreeBSD.org>2014-11-10 09:11:23 +0000
commit9f76ecdf8933886e0e26df2048aedc7f7439e80a (patch)
tree2c425c888df917c1f241202c2abfe031ba4d4e4e /sys/kern
parent2b3683aa2c730e5f63aec330d51709aaab1135b1 (diff)
downloadFreeBSD-src-9f76ecdf8933886e0e26df2048aedc7f7439e80a.zip
FreeBSD-src-9f76ecdf8933886e0e26df2048aedc7f7439e80a.tar.gz
MFC r274038:
Clean up confusing comment.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_thr.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/kern/kern_thr.c b/sys/kern/kern_thr.c
index 4270b41..b298f33 100644
--- a/sys/kern/kern_thr.c
+++ b/sys/kern/kern_thr.c
@@ -317,10 +317,6 @@ sys_thr_exit(struct thread *td, struct thr_exit_args *uap)
PROC_LOCK(p);
- /*
- * Shutting down last thread in the proc. This will actually
- * call exit() in the trampoline when it returns.
- */
if (p->p_numthreads != 1) {
racct_sub(p, RACCT_NTHR, 1);
LIST_REMOVE(td, td_hash);
@@ -331,6 +327,12 @@ sys_thr_exit(struct thread *td, struct thr_exit_args *uap)
thread_exit();
/* NOTREACHED */
}
+
+ /*
+ * Ignore attempts to shut down last thread in the proc. This
+ * will actually call _exit(2) in the usermode trampoline when
+ * it returns.
+ */
PROC_UNLOCK(p);
rw_wunlock(&tidhash_lock);
return (0);
OpenPOWER on IntegriCloud