ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / include / asm-v850 / bug.h
1 /*
2  * include/asm-v850/bug.h -- Bug reporting
3  *
4  *  Copyright (C) 2003  NEC Electronics Corporation
5  *  Copyright (C) 2003  Miles Bader <miles@gnu.org>
6  *
7  * This file is subject to the terms and conditions of the GNU General
8  * Public License.  See the file COPYING in the main directory of this
9  * archive for more details.
10  *
11  * Written by Miles Bader <miles@gnu.org>
12  */
13
14 #ifndef __V850_BUG_H__
15 #define __V850_BUG_H__
16
17 extern void __bug (void) __attribute__ ((noreturn));
18 #define BUG()           __bug()
19 #define PAGE_BUG(page)  __bug()
20
21 #define BUG_ON(condition) do { if (unlikely((condition)!=0)) BUG(); } 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 /* __V850_BUG_H__ */