diff options
author | wkoszek <wkoszek@FreeBSD.org> | 2007-12-21 23:30:18 +0000 |
---|---|---|
committer | wkoszek <wkoszek@FreeBSD.org> | 2007-12-21 23:30:18 +0000 |
commit | 7d4fbe3a460f1f0264634f55f355da4e379ca391 (patch) | |
tree | 8c52e7ff152d1430a0847aac1236647ea6b6f1d2 /sys | |
parent | 2cec5c9b4a51d1be4fcd5a51af258d863c5ccaf7 (diff) | |
download | FreeBSD-src-7d4fbe3a460f1f0264634f55f355da4e379ca391.zip FreeBSD-src-7d4fbe3a460f1f0264634f55f355da4e379ca391.tar.gz |
Make SCHED_ULE buildable with gcc3.
Reviewed by: cognet (mentor), jeffr
Approved by: cognet (mentor), jeffr
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/sched_ule.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c index 6841bab..2bc0f3a 100644 --- a/sys/kern/sched_ule.c +++ b/sys/kern/sched_ule.c @@ -1758,6 +1758,23 @@ sched_switchin(struct tdq *tdq, struct thread *td) } /* + * 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. */ @@ -1794,23 +1811,6 @@ sched_switch_migrate(struct tdq *tdq, struct thread *td, int flags) } /* - * 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); -} - -/* * Release a thread that was blocked with thread_block_switch(). */ static inline void |