summaryrefslogtreecommitdiff
path: root/sys/kern/sys_process.c
diff options
context:
space:
mode:
authorBosko Milekic <bmilekic@FreeBSD.org>2001-02-09 06:11:45 +0000
committerBosko Milekic <bmilekic@FreeBSD.org>2001-02-09 06:11:45 +0000
commit9ed346bab02c967ac656a58bc024f9505d8e3d7a (patch)
treed3c094e833fc39df4460403c9499fab2981579c4 /sys/kern/sys_process.c
parentc27eb220c245e2b0f32d16a84d5edb3e42ccd2f8 (diff)
Notes
Diffstat (limited to 'sys/kern/sys_process.c')
-rw-r--r--sys/kern/sys_process.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/sys/kern/sys_process.c b/sys/kern/sys_process.c
index 2c0300029488..d53bf7296f09 100644
--- a/sys/kern/sys_process.c
+++ b/sys/kern/sys_process.c
@@ -284,12 +284,12 @@ ptrace(curp, uap)
PROCTREE_LOCK(PT_RELEASE);
/* not currently stopped */
- mtx_enter(&sched_lock, MTX_SPIN);
+ mtx_lock_spin(&sched_lock);
if (p->p_stat != SSTOP || (p->p_flag & P_WAITED) == 0) {
- mtx_exit(&sched_lock, MTX_SPIN);
+ mtx_unlock_spin(&sched_lock);
return EBUSY;
}
- mtx_exit(&sched_lock, MTX_SPIN);
+ mtx_unlock_spin(&sched_lock);
/* OK */
break;
@@ -377,13 +377,13 @@ ptrace(curp, uap)
sendsig:
/* deliver or queue signal */
s = splhigh();
- mtx_enter(&sched_lock, MTX_SPIN);
+ mtx_lock_spin(&sched_lock);
if (p->p_stat == SSTOP) {
p->p_xstat = uap->data;
setrunnable(p);
- mtx_exit(&sched_lock, MTX_SPIN);
+ mtx_unlock_spin(&sched_lock);
} else {
- mtx_exit(&sched_lock, MTX_SPIN);
+ mtx_unlock_spin(&sched_lock);
if (uap->data) {
mtx_assert(&Giant, MA_OWNED);
psignal(p, uap->data);
@@ -437,14 +437,14 @@ ptrace(curp, uap)
}
error = 0;
PHOLD(p); /* user had damn well better be incore! */
- mtx_enter(&sched_lock, MTX_SPIN);
+ mtx_lock_spin(&sched_lock);
if (p->p_sflag & PS_INMEM) {
- mtx_exit(&sched_lock, MTX_SPIN);
+ mtx_unlock_spin(&sched_lock);
fill_kinfo_proc (p, &p->p_addr->u_kproc);
curp->p_retval[0] = *(int *)
((uintptr_t)p->p_addr + (uintptr_t)uap->addr);
} else {
- mtx_exit(&sched_lock, MTX_SPIN);
+ mtx_unlock_spin(&sched_lock);
curp->p_retval[0] = 0;
error = EFAULT;
}
@@ -453,13 +453,13 @@ ptrace(curp, uap)
case PT_WRITE_U:
PHOLD(p); /* user had damn well better be incore! */
- mtx_enter(&sched_lock, MTX_SPIN);
+ mtx_lock_spin(&sched_lock);
if (p->p_sflag & PS_INMEM) {
- mtx_exit(&sched_lock, MTX_SPIN);
+ mtx_unlock_spin(&sched_lock);
fill_kinfo_proc (p, &p->p_addr->u_kproc);
error = ptrace_write_u(p, (vm_offset_t)uap->addr, uap->data);
} else {
- mtx_exit(&sched_lock, MTX_SPIN);
+ mtx_unlock_spin(&sched_lock);
error = EFAULT;
}
PRELE(p);