diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-07-03 08:29:58 -0500 |
---|---|---|
committer | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2015-12-23 23:36:30 +0100 |
commit | e8f7ab72978a0b47e152b43485600d54cb326d2b (patch) | |
tree | d7e07d7c818505ba11aefd897310bcbd8ec693d3 /include/asm-generic | |
parent | 254624b15abcb1b3b5ca48960dfedfe101de823d (diff) |
bug: BUG_ON/WARN_ON variants dependend on RT/!RT
Introduce RT/NON-RT WARN/BUG statements to avoid ifdefs in the code.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/asm-generic')
-rw-r--r-- | include/asm-generic/bug.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h index 630dd2372238..850e4d993a88 100644 --- a/include/asm-generic/bug.h +++ b/include/asm-generic/bug.h @@ -206,6 +206,20 @@ extern void warn_slowpath_null(const char *file, const int line); # define WARN_ON_SMP(x) ({0;}) #endif +#ifdef CONFIG_PREEMPT_RT_BASE +# define BUG_ON_RT(c) BUG_ON(c) +# define BUG_ON_NONRT(c) do { } while (0) +# define WARN_ON_RT(condition) WARN_ON(condition) +# define WARN_ON_NONRT(condition) do { } while (0) +# define WARN_ON_ONCE_NONRT(condition) do { } while (0) +#else +# define BUG_ON_RT(c) do { } while (0) +# define BUG_ON_NONRT(c) BUG_ON(c) +# define WARN_ON_RT(condition) do { } while (0) +# define WARN_ON_NONRT(condition) WARN_ON(condition) +# define WARN_ON_ONCE_NONRT(condition) WARN_ON_ONCE(condition) +#endif + #endif /* __ASSEMBLY__ */ #endif |