Commit c15ac58e authored by Ingo Molnar's avatar Ingo Molnar Committed by Thomas Gleixner

rt: BUG_ON/WARN_ON variants dependend on RT/!RT

[ tglx: folded compile fix from Tsutomu Owa <tsutomu.owa@toshiba.co.jp> ]
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent c7f86f08
...@@ -3,6 +3,10 @@ ...@@ -3,6 +3,10 @@
#include <linux/compiler.h> #include <linux/compiler.h>
#ifndef __ASSEMBLY__
extern void __WARN_ON(const char *func, const char *file, const int line);
#endif /* __ASSEMBLY__ */
#ifdef CONFIG_BUG #ifdef CONFIG_BUG
#ifdef CONFIG_GENERIC_BUG #ifdef CONFIG_GENERIC_BUG
...@@ -141,4 +145,18 @@ extern void warn_slowpath_null(const char *file, const int line); ...@@ -141,4 +145,18 @@ extern void warn_slowpath_null(const char *file, const int line);
# define WARN_ON_SMP(x) do { } while (0) # define WARN_ON_SMP(x) do { } while (0)
#endif #endif
#ifdef CONFIG_PREEMPT_RT
# 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 #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment