--- sched_ule.c.orig Fri Nov 9 03:00:36 2007 +++ sched_ule.c Fri Nov 9 03:01:12 2007 @@ -1762,6 +1762,23 @@ } /* + * Block a thread for switching. Similar to thread_block() but does not + * bump the spin count. + */ +static inline struct mtx * +thread_block_switch(struct thread *td) +{ + struct mtx *lock; + + THREAD_LOCK_ASSERT(td, MA_OWNED); + lock = td->td_lock; + td->td_lock = &blocked_lock; + mtx_unlock_spin(lock); + + return (lock); +} + +/* * Handle migration from sched_switch(). This happens only for * cpu binding. */ @@ -1795,23 +1812,6 @@ spinlock_exit(); #endif return (TDQ_LOCKPTR(tdn)); -} - -/* - * Block a thread for switching. Similar to thread_block() but does not - * bump the spin count. - */ -static inline struct mtx * -thread_block_switch(struct thread *td) -{ - struct mtx *lock; - - THREAD_LOCK_ASSERT(td, MA_OWNED); - lock = td->td_lock; - td->td_lock = &blocked_lock; - mtx_unlock_spin(lock); - - return (lock); } /*