aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/thread_info.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/thread_info.h')
-rw-r--r--include/linux/thread_info.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h
index 2873baf5372a..eb1a108f17ca 100644
--- a/include/linux/thread_info.h
+++ b/include/linux/thread_info.h
@@ -107,7 +107,17 @@ static inline int test_ti_thread_flag(struct thread_info *ti, int flag)
#define test_thread_flag(flag) \
test_ti_thread_flag(current_thread_info(), flag)
-#define tif_need_resched() test_thread_flag(TIF_NEED_RESCHED)
+#ifdef CONFIG_PREEMPT_LAZY
+#define tif_need_resched() (test_thread_flag(TIF_NEED_RESCHED) || \
+ test_thread_flag(TIF_NEED_RESCHED_LAZY))
+#define tif_need_resched_now() (test_thread_flag(TIF_NEED_RESCHED))
+#define tif_need_resched_lazy() test_thread_flag(TIF_NEED_RESCHED_LAZY))
+
+#else
+#define tif_need_resched() test_thread_flag(TIF_NEED_RESCHED)
+#define tif_need_resched_now() test_thread_flag(TIF_NEED_RESCHED)
+#define tif_need_resched_lazy() 0
+#endif
#ifndef CONFIG_HAVE_ARCH_WITHIN_STACK_FRAMES
static inline int arch_within_stack_frames(const void * const stack,