diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2009-07-24 12:38:56 +0200 |
---|---|---|
committer | Clark Williams <williams@redhat.com> | 2012-02-15 10:32:38 -0600 |
commit | 99ba37bd23c03f747e7cb2d77dd8e5a45af9b3d2 (patch) | |
tree | 62d31f9cdbd4149579ebd485c4987666c77ab6bd | |
parent | 38aabfb3a36d67b42a8ad4805e873579dbd8eb7b (diff) |
preempt: 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 | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/include/linux/preempt.h b/include/linux/preempt.h index 227b0f584719..29db25f50861 100644 --- a/include/linux/preempt.h +++ b/include/linux/preempt.h @@ -54,11 +54,15 @@ do { \ dec_preempt_count(); \ } while (0) -#define preempt_enable_no_resched() __preempt_enable_no_resched() +#ifndef CONFIG_PREEMPT_RT_BASE +# define preempt_enable_no_resched() __preempt_enable_no_resched() +#else +# define preempt_enable_no_resched() preempt_enable() +#endif #define preempt_enable() \ do { \ - preempt_enable_no_resched(); \ + __preempt_enable_no_resched(); \ barrier(); \ preempt_check_resched(); \ } while (0) @@ -104,6 +108,18 @@ do { \ #endif /* CONFIG_PREEMPT_COUNT */ +#ifdef CONFIG_PREEMPT_RT_FULL +# 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; |