summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorBret Lambert <blambert@cvs.openbsd.org>2015-02-10 03:40:19 +0000
committerBret Lambert <blambert@cvs.openbsd.org>2015-02-10 03:40:19 +0000
commit9b4fc269bd59f971833ae9263c73c58e8b688c94 (patch)
tree99c73e11b1766b15731a84213e74febcc640d257 /sys/kern
parent248d41c3528c9109f9759f660b36deafd00259e9 (diff)
assert that we hold the scheduler lock in unsleep()
ok guenther@
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_synch.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c
index 9f8eff7e5f8..46728c7715a 100644
--- a/sys/kern/kern_synch.c
+++ b/sys/kern/kern_synch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_synch.c,v 1.117 2015/02/09 03:15:41 dlg Exp $ */
+/* $OpenBSD: kern_synch.c,v 1.118 2015/02/10 03:40:18 blambert Exp $ */
/* $NetBSD: kern_synch.c,v 1.37 1996/04/22 01:38:37 christos Exp $ */
/*
@@ -350,6 +350,8 @@ endtsleep(void *arg)
void
unsleep(struct proc *p)
{
+ SCHED_ASSERT_LOCKED();
+
if (p->p_wchan) {
TAILQ_REMOVE(&slpque[LOOKUP(p->p_wchan)], p, p_runq);
p->p_wchan = NULL;