2 * include/asm-v850/bug.h -- Bug reporting
4 * Copyright (C) 2003 NEC Electronics Corporation
5 * Copyright (C) 2003 Miles Bader <miles@gnu.org>
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.
11 * Written by Miles Bader <miles@gnu.org>
14 #ifndef __V850_BUG_H__
15 #define __V850_BUG_H__
17 extern void __bug (void) __attribute__ ((noreturn));
19 #define PAGE_BUG(page) __bug()
21 #define BUG_ON(condition) do { if (unlikely((condition)!=0)) BUG(); } while(0)
23 #define WARN_ON(condition) do { \
24 if (unlikely((condition)!=0)) { \
25 printk("Badness in %s at %s:%d\n", __FUNCTION__, __FILE__, __LINE__); \
30 #endif /* __V850_BUG_H__ */