VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git] / include / asm-sparc64 / bug.h
1 /* $Id$ */
2
3 #ifndef _SPARC64_BUG_H
4 #define _SPARC64_BUG_H
5
6 #include <linux/compiler.h>
7
8 #ifdef CONFIG_DEBUG_BUGVERBOSE
9 extern void do_BUG(const char *file, int line);
10 #define BUG() do {                                      \
11         do_BUG(__FILE__, __LINE__);                     \
12         __builtin_trap();                               \
13 } while (0)
14 #else
15 #define BUG()           __builtin_trap()
16 #endif
17
18 #define BUG_ON(condition) do { \
19         if (unlikely((condition)!=0)) \
20                 BUG(); \
21 } while(0)
22
23 #define PAGE_BUG(page) do { \
24         BUG(); \
25 } while (0)
26
27 #define WARN_ON(condition) do { \
28         if (unlikely((condition)!=0)) { \
29                 printk("Badness in %s at %s:%d\n", __FUNCTION__, __FILE__, __LINE__); \
30                 dump_stack(); \
31         } \
32 } while (0)
33
34 #endif