ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / include / asm-um / bug.h
1 #ifndef __UM_BUG_H
2 #define __UM_BUG_H
3
4 #ifndef __ASSEMBLY__
5
6 #define BUG() do { \
7         panic("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \
8 } while (0)
9
10 #define BUG_ON(condition) do { \
11         if (unlikely((condition)!=0)) \
12                 BUG(); \
13 } while(0)
14
15 #define PAGE_BUG(page) do { \
16         BUG(); \
17 } while (0)
18
19 #define WARN_ON(condition) do { \
20         if (unlikely((condition)!=0)) { \
21                 printk("Badness in %s at %s:%d\n", __FUNCTION__, __FILE__, __LINE__); \
22                 dump_stack(); \
23         } \
24 } while (0)
25
26 extern int foo;
27
28 #endif
29
30 #endif