From 8e2f8ec20a09aee6ae42c6e3549bf366e0ae955b Mon Sep 17 00:00:00 2001 From: Owain Ainsworth Date: Fri, 5 Sep 2008 14:11:58 +0000 Subject: 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. --- sys/kern/kern_synch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys') 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); } -- cgit v1.2.3