summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwain Ainsworth <oga@cvs.openbsd.org>2008-09-05 14:11:58 +0000
committerOwain Ainsworth <oga@cvs.openbsd.org>2008-09-05 14:11:58 +0000
commit8e2f8ec20a09aee6ae42c6e3549bf366e0ae955b (patch)
treeeb9c6d71329377e50b1ba5deb7780cbffc083f69
parent58893ccd95f261fac3a2526daf5bd177ab2f6c9d (diff)
When munging the WANTIPL of the mutex to prevent undoing the sched_lock,
use the constant for IPL_SCHED, and not splsched(), which doesn't do what we want. ok art@. Tested by Paul de Weerd.
-rw-r--r--sys/kern/kern_synch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c
index d1dc798669e..529ad02fb5a 100644
--- a/sys/kern/kern_synch.c
+++ b/sys/kern/kern_synch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_synch.c,v 1.83 2007/11/30 16:44:44 oga Exp $ */
+/* $OpenBSD: kern_synch.c,v 1.84 2008/09/05 14:11:57 oga Exp $ */
/* $NetBSD: kern_synch.c,v 1.37 1996/04/22 01:38:37 christos Exp $ */
/*
@@ -156,7 +156,7 @@ msleep(void *ident, struct mutex *mtx, int priority, const char *wmesg, int tim
* correct when the sched_lock is a mutex.
*/
spl = MUTEX_OLDIPL(mtx);
- MUTEX_OLDIPL(mtx) = splsched();
+ MUTEX_OLDIPL(mtx) = IPL_SCHED;
mtx_leave(mtx);
}