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