summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2009-07-24 12:38:56 +0200
committerThomas Gleixner <tglx@linutronix.de>2009-07-24 12:38:56 +0200
commit769610edf15e38b8fa5f6beac8e6bfaeaff690d1 (patch)
tree68783402db6bc00581cc9466a9c9f662e875cfdc
parentc15ac58e50a3e202f6c663b31c5536fdbaea9968 (diff)
downloadlwn-769610edf15e38b8fa5f6beac8e6bfaeaff690d1.tar.gz
lwn-769610edf15e38b8fa5f6beac8e6bfaeaff690d1.zip
core: Provide preempt_*_(no)rt variants
RT needs a few preempt_disable/enable points which are not necessary otherwise. Implement variants to avoid #ifdeffery. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r--include/linux/preempt.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/preempt.h b/include/linux/preempt.h
index 72b1a10a59b6..8d97e1d97142 100644
--- a/include/linux/preempt.h
+++ b/include/linux/preempt.h
@@ -93,6 +93,18 @@ do { \
#endif
+#ifdef CONFIG_PREEMPT_RT
+# define preempt_disable_rt() preempt_disable()
+# define preempt_enable_rt() preempt_enable()
+# define preempt_disable_nort() do { } while (0)
+# define preempt_enable_nort() do { } while (0)
+#else
+# define preempt_disable_rt() do { } while (0)
+# define preempt_enable_rt() do { } while (0)
+# define preempt_disable_nort() preempt_disable()
+# define preempt_enable_nort() preempt_enable()
+#endif
+
#ifdef CONFIG_PREEMPT_NOTIFIERS
struct preempt_notifier;