summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_synch.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_synch.c')
-rw-r--r--sys/kern/kern_synch.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c
index b49999b..540e8a9 100644
--- a/sys/kern/kern_synch.c
+++ b/sys/kern/kern_synch.c
@@ -902,7 +902,7 @@ setrunnable(struct thread *td)
{
struct proc *p = td->td_proc;
- mtx_lock_spin(&sched_lock);
+ mtx_assert(&sched_lock, MA_OWNED);
switch (p->p_state) {
case PRS_ZOMBIE:
panic("setrunnable(1)");
@@ -941,7 +941,6 @@ setrunnable(struct thread *td)
setrunqueue(td); /* XXXKSE */
maybe_resched(td);
}
- mtx_unlock_spin(&sched_lock);
}
/*
OpenPOWER on IntegriCloud