summaryrefslogtreecommitdiff
path: root/include/linux/torture.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/torture.h')
-rw-r--r--include/linux/torture.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/torture.h b/include/linux/torture.h
index a45702eb3e7b..907d266aaddc 100644
--- a/include/linux/torture.h
+++ b/include/linux/torture.h
@@ -96,4 +96,10 @@ void _torture_stop_kthread(char *m, struct task_struct **tp);
#define torture_stop_kthread(n, tp) \
_torture_stop_kthread("Stopping " #n " task", &(tp))
+#ifdef CONFIG_PREEMPT
+#define torture_preempt_schedule() preempt_schedule()
+#else
+#define torture_preempt_schedule()
+#endif
+
#endif /* __LINUX_TORTURE_H */