summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-07-03 08:29:58 -0500
committerSteven Rostedt <rostedt@goodmis.org>2015-01-16 18:11:46 -0500
commit5cf9e5617065e0e69c4baec919a0ea1cad2f054f (patch)
tree5ac428363e9708b52097c74155e4566e955ff493
parentf8ff870b13dcf038b12b8a9f389b6219ed9844a5 (diff)
downloadlinux-rt-5cf9e5617065e0e69c4baec919a0ea1cad2f054f.tar.gz
bug: BUG_ON/WARN_ON variants dependend on RT/!RT
Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r--include/asm-generic/bug.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h
index 7d10f962aa13..aee7fd2eefc5 100644
--- a/include/asm-generic/bug.h
+++ b/include/asm-generic/bug.h
@@ -202,6 +202,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