Update of /cvsroot/linux-vax/kernel-2.5/include/asm-vax
In directory sc8-pr-cvs1:/tmp/cvs-serv13743/include/asm-vax
Modified Files:
bug.h
Log Message:
Define BUG_ON and WARN_ON
Index: bug.h
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.5/include/asm-vax/bug.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- bug.h 3 Aug 2003 12:45:07 -0000 1.1
+++ bug.h 10 Sep 2003 08:58:59 -0000 1.2
@@ -6,6 +6,15 @@
__asm__ __volatile__("bugw $0"); \
} while (0)
+#define BUG_ON(condition) do { if (unlikely((condition)!=0)) BUG(); } while(0)
+
+#define WARN_ON(condition) do { \
+ if (unlikely((condition)!=0)) { \
+ printk("Badness in %s at %s:%d\n", __FUNCTION__, __FILE__, __LINE__); \
+ dump_stack(); \
+ } \
+} while (0)
+
#define PAGE_BUG(page) do { \
BUG(); \
} while (0)
|