1 #ifndef _ASM_GENERIC_BUG_H
2 #define _ASM_GENERIC_BUG_H
4 #include <linux/compiler.h>
5 #include <linux/config.h>
8 extern const char *print_tainted(void);
14 printk("BUG: failure at %s:%d/%s()! (%s)\n", __FILE__, __LINE__, __FUNCTION__, print_tainted()); \
19 #ifndef HAVE_ARCH_BUG_ON
20 #define BUG_ON(condition) do { if (unlikely((condition)!=0)) BUG(); } while(0)
23 #ifndef HAVE_ARCH_WARN_ON
24 #define WARN_ON(condition) do { \
25 if (unlikely((condition)!=0)) { \
26 printk("BUG: warning at %s:%d/%s() (%s)\n", __FILE__, __LINE__, __FUNCTION__, print_tainted()); \
32 #else /* !CONFIG_BUG */
37 #ifndef HAVE_ARCH_BUG_ON
38 #define BUG_ON(condition) do { if (condition) ; } while(0)
41 #ifndef HAVE_ARCH_WARN_ON
42 #define WARN_ON(condition) do { if (condition) ; } while(0)