My mistake. This will be backed out shortly. splsched() actually does what we want, but it took me a while to figure out why. IPL_SCHED doesn't (and breaks some architectures).
In short. we enter msleep at any spl. sleep_setup goes to IPL_SCHED or stays (if we where higher). we call splsched() which does nothing (since we're already at the right level or higher) and returns whatever sleep_setup set the spl to (or higher). we set OLDIPL in the mutex to the return value from splsched() so that mtx_leave doesn't drop us below splsched. //art Owain Ainsworth <[EMAIL PROTECTED]> writes: > CVSROOT: /cvs > Module name: src > Changes by: [EMAIL PROTECTED] 2008/09/05 08:11:57 > > Modified files: > sys/kern : kern_synch.c > > Log message: > 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 [EMAIL PROTECTED] Tested by Paul de Weerd.