summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_sig.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_sig.c')
-rw-r--r--sys/kern/kern_sig.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c
index 434420b..a6d9f75 100644
--- a/sys/kern/kern_sig.c
+++ b/sys/kern/kern_sig.c
@@ -1108,8 +1108,11 @@ psignal(p, sig)
* Defer further processing for signals which are held,
* except that stopped processes must be continued by SIGCONT.
*/
- if (action == SIG_HOLD && (!(prop & SA_CONT) || p->p_stat != SSTOP))
+ mtx_enter(&sched_lock, MTX_SPIN);
+ if (action == SIG_HOLD && (!(prop & SA_CONT) || p->p_stat != SSTOP)) {
+ mtx_exit(&sched_lock, MTX_SPIN);
return;
+ }
s = splhigh();
switch (p->p_stat) {
@@ -1242,6 +1245,7 @@ runfast:
run:
setrunnable(p);
out:
+ mtx_exit(&sched_lock, MTX_SPIN);
splx(s);
}
@@ -1417,9 +1421,11 @@ stop(p)
register struct proc *p;
{
+ mtx_enter(&sched_lock, MTX_SPIN);
p->p_stat = SSTOP;
p->p_flag &= ~P_WAITED;
wakeup((caddr_t)p->p_pptr);
+ mtx_exit(&sched_lock, MTX_SPIN);
}
/*
OpenPOWER on IntegriCloud