summaryrefslogtreecommitdiffstats
path: root/sys/compat/svr4/svr4_misc.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2001-03-28 11:52:56 +0000
committerjhb <jhb@FreeBSD.org>2001-03-28 11:52:56 +0000
commit79cf991a6bd845fad54bd6a15892cb5aaf74b223 (patch)
tree1cee6a483c3c79f058207ee2c66c63c38f2ad20a /sys/compat/svr4/svr4_misc.c
parent673f3af133009642ca79479ec4db4a25a4ea86d6 (diff)
downloadFreeBSD-src-79cf991a6bd845fad54bd6a15892cb5aaf74b223.zip
FreeBSD-src-79cf991a6bd845fad54bd6a15892cb5aaf74b223.tar.gz
Convert the allproc and proctree locks from lockmgr locks to sx locks.
Diffstat (limited to 'sys/compat/svr4/svr4_misc.c')
-rw-r--r--sys/compat/svr4/svr4_misc.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/compat/svr4/svr4_misc.c b/sys/compat/svr4/svr4_misc.c
index d6091d8..7d115f7 100644
--- a/sys/compat/svr4/svr4_misc.c
+++ b/sys/compat/svr4/svr4_misc.c
@@ -1215,7 +1215,7 @@ svr4_sys_waitsys(p, uap)
loop:
nfound = 0;
- PROCTREE_LOCK(PT_SHARED);
+ sx_slock(&proctree_lock);
LIST_FOREACH(q, &p->p_children, p_sibling) {
if (SCARG(uap, id) != WAIT_ANY &&
q->p_pid != SCARG(uap, id) &&
@@ -1231,7 +1231,7 @@ loop:
((SCARG(uap, options) & (SVR4_WEXITED|SVR4_WTRAPPED)))) {
mtx_unlock_spin(&sched_lock);
PROC_UNLOCK(q);
- PROCTREE_LOCK(PT_RELEASE);
+ sx_sunlock(&proctree_lock);
*retval = 0;
DPRINTF(("found %d\n", q->p_pid));
error = svr4_setinfo(q, q->p_xstat, SCARG(uap, info));
@@ -1252,7 +1252,7 @@ loop:
* parent a SIGCHLD. The rest of the cleanup will be
* done when the old parent waits on the child.
*/
- PROCTREE_LOCK(PT_EXCLUSIVE);
+ sx_xlock(&proctree_lock);
PROC_LOCK(q);
if (q->p_flag & P_TRACED) {
if (q->p_oppid != q->p_pptr->p_pid) {
@@ -1266,13 +1266,13 @@ loop:
PROC_LOCK(t);
psignal(t, SIGCHLD);
PROC_UNLOCK(t);
- PROCTREE_LOCK(PT_RELEASE);
+ sx_xunlock(&proctree_lock);
wakeup(t);
return 0;
}
}
PROC_UNLOCK(q);
- PROCTREE_LOCK(PT_RELEASE);
+ sx_xunlock(&proctree_lock);
q->p_xstat = 0;
ruadd(&p->p_stats->p_cru, q->p_ru);
FREE(q->p_ru, M_ZOMBIE);
@@ -1313,13 +1313,13 @@ loop:
*/
leavepgrp(q);
- ALLPROC_LOCK(AP_EXCLUSIVE);
+ sx_xlock(&allproc_lock);
LIST_REMOVE(q, p_list); /* off zombproc */
- ALLPROC_LOCK(AP_RELEASE);
+ sx_xunlock(&allproc_lock);
- PROCTREE_LOCK(PT_EXCLUSIVE);
+ sx_xlock(&proctree_lock);
LIST_REMOVE(q, p_sibling);
- PROCTREE_LOCK(PT_RELEASE);
+ sx_xunlock(&proctree_lock);
PROC_LOCK(q);
if (--q->p_procsig->ps_refcnt == 0) {
OpenPOWER on IntegriCloud