diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2001-03-28 11:52:56 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2001-03-28 11:52:56 +0000 |
| commit | 1005a129e5ff4af4709d281023e8a101a28fcb82 (patch) | |
| tree | 0e149b4a15299675308712c4196c45b696f76c14 /sys/kern/kern_fork.c | |
| parent | 11f1917f8ae19359d8672d966f4cf966e115c7a7 (diff) | |
Notes
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 8ae5bcf0e4dc..c9539bbb1f64 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); |
