diff options
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 | } |