diff options
author | jhb <jhb@FreeBSD.org> | 2001-03-28 11:52:56 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2001-03-28 11:52:56 +0000 |
commit | 79cf991a6bd845fad54bd6a15892cb5aaf74b223 (patch) | |
tree | 1cee6a483c3c79f058207ee2c66c63c38f2ad20a /sys/kern/kern_fork.c | |
parent | 673f3af133009642ca79479ec4db4a25a4ea86d6 (diff) | |
download | FreeBSD-src-79cf991a6bd845fad54bd6a15892cb5aaf74b223.zip FreeBSD-src-79cf991a6bd845fad54bd6a15892cb5aaf74b223.tar.gz |
Convert the allproc and proctree locks from lockmgr locks to sx locks.
Diffstat (limited to 'sys/kern/kern_fork.c')
-rw-r--r-- | sys/kern/kern_fork.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index 8ae5bcf..c9539bb 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -306,7 +306,7 @@ fork1(p1, flags, procp) * If RFHIGHPID is set (used during system boot), do not allocate * low-numbered pids. */ - ALLPROC_LOCK(AP_EXCLUSIVE); + sx_xlock(&allproc_lock); trypid = nextpid + 1; if (flags & RFHIGHPID) { if (trypid < 10) { @@ -376,7 +376,7 @@ again: p2->p_pid = trypid; LIST_INSERT_HEAD(&allproc, p2, p_list); LIST_INSERT_HEAD(PIDHASH(p2->p_pid), p2, p_hash); - ALLPROC_LOCK(AP_RELEASE); + sx_xunlock(&allproc_lock); /* * Make a proc table entry for the new process. @@ -516,12 +516,12 @@ again: pptr = initproc; else pptr = p1; - PROCTREE_LOCK(PT_EXCLUSIVE); + sx_xlock(&proctree_lock); PROC_LOCK(p2); p2->p_pptr = pptr; PROC_UNLOCK(p2); LIST_INSERT_HEAD(&pptr->p_children, p2, p_sibling); - PROCTREE_LOCK(PT_RELEASE); + sx_xunlock(&proctree_lock); PROC_LOCK(p2); LIST_INIT(&p2->p_children); LIST_INIT(&p2->p_contested); |