summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_exit.c
diff options
context:
space:
mode:
authortjr <tjr@FreeBSD.org>2003-03-13 00:57:47 +0000
committertjr <tjr@FreeBSD.org>2003-03-13 00:57:47 +0000
commit22308242217f3e9bc1fffc2f8a45c762d541779c (patch)
treea6f31419d11320fbf972982a53b52344f91344bb /sys/kern/kern_exit.c
parenta9d877b4c2853a9964b1070dc4d5a9fa6b86c417 (diff)
downloadFreeBSD-src-22308242217f3e9bc1fffc2f8a45c762d541779c.zip
FreeBSD-src-22308242217f3e9bc1fffc2f8a45c762d541779c.tar.gz
Tidy up previous change: move comment about obtaining an exclusive
reference where it belongs, and remove a blank line to make it more obvious what the comment applies to.
Diffstat (limited to 'sys/kern/kern_exit.c')
-rw-r--r--sys/kern/kern_exit.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index f0554e0..22dba08 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -658,15 +658,14 @@ loop:
return (0);
}
- sx_xlock(&allproc_lock);
- LIST_REMOVE(p, p_list); /* off zombproc */
- sx_xunlock(&allproc_lock);
-
- LIST_REMOVE(p, p_sibling);
/*
* Remove other references to this process to ensure
* we have an exclusive reference.
*/
+ sx_xlock(&allproc_lock);
+ LIST_REMOVE(p, p_list); /* off zombproc */
+ sx_xunlock(&allproc_lock);
+ LIST_REMOVE(p, p_sibling);
leavepgrp(p);
sx_xunlock(&proctree_lock);
OpenPOWER on IntegriCloud