diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2009-07-24 12:38:56 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2009-07-24 12:38:56 +0200 |
commit | 769610edf15e38b8fa5f6beac8e6bfaeaff690d1 (patch) | |
tree | 68783402db6bc00581cc9466a9c9f662e875cfdc | |
parent | c15ac58e50a3e202f6c663b31c5536fdbaea9968 (diff) | |
download | lwn-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.h | 12 |
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; |