diff options
author | Lai Jiangshan <laijs@cn.fujitsu.com> | 2009-03-06 06:40:20 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-03-06 06:48:55 -0500 |
commit | 5ed0cec0ac5f1b3759bdbe4d9df32ee4ff8afb5a (patch) | |
tree | a804da35b296f278865b194661cc6e75bfdaf11f /lib | |
parent | 7fc07d84108d54c5b94625c0e168f31b2d66976e (diff) |
sched: TIF_NEED_RESCHED -> need_reshed() cleanup
Impact: cleanup
Use test_tsk_need_resched(), set_tsk_need_resched(), need_resched()
instead of using TIF_NEED_RESCHED.
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <49B10BA4.9070209@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/kernel_lock.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/kernel_lock.c b/lib/kernel_lock.c index 01a3c22c1b5a..39f1029e3525 100644 --- a/lib/kernel_lock.c +++ b/lib/kernel_lock.c | |||
@@ -39,7 +39,7 @@ static __cacheline_aligned_in_smp DEFINE_SPINLOCK(kernel_flag); | |||
39 | int __lockfunc __reacquire_kernel_lock(void) | 39 | int __lockfunc __reacquire_kernel_lock(void) |
40 | { | 40 | { |
41 | while (!_raw_spin_trylock(&kernel_flag)) { | 41 | while (!_raw_spin_trylock(&kernel_flag)) { |
42 | if (test_thread_flag(TIF_NEED_RESCHED)) | 42 | if (need_resched()) |
43 | return -EAGAIN; | 43 | return -EAGAIN; |
44 | cpu_relax(); | 44 | cpu_relax(); |
45 | } | 45 | } |