diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2009-07-24 10:38:56 (GMT) |
---|---|---|
committer | Scott Wood <scottwood@freescale.com> | 2014-05-14 18:37:55 (GMT) |
commit | 61df8767db456420ddad8cb7c8c592f92f3e21ee (patch) | |
tree | 8f286b40e5ffc00876806def7835eefa7c96b30a /include/linux | |
parent | a854aecb5ad94a9af018ccb7b4795198ab3da52d (diff) | |
download | linux-fsl-qoriq-61df8767db456420ddad8cb7c8c592f92f3e21ee.tar.xz |
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>
Diffstat (limited to 'include/linux')
-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 f5d4723..f237ebd 100644 --- a/include/linux/preempt.h +++ b/include/linux/preempt.h @@ -70,11 +70,15 @@ do { \ dec_preempt_count(); \ } while (0) -#define preempt_enable_no_resched() sched_preempt_enable_no_resched() +#ifndef CONFIG_PREEMPT_RT_BASE +# define preempt_enable_no_resched() sched_preempt_enable_no_resched() +#else +# define preempt_enable_no_resched() preempt_enable() +#endif #define preempt_enable() \ do { \ - preempt_enable_no_resched(); \ + sched_preempt_enable_no_resched(); \ barrier(); \ preempt_check_resched(); \ } while (0) @@ -126,6 +130,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() barrier() +# define preempt_enable_nort() barrier() +#else +# define preempt_disable_rt() barrier() +# define preempt_enable_rt() barrier() +# define preempt_disable_nort() preempt_disable() +# define preempt_enable_nort() preempt_enable() +#endif + #ifdef CONFIG_PREEMPT_NOTIFIERS struct preempt_notifier; |