patch-2.4.27 linux-2.4.27/include/linux/kernel.h

Next file: linux-2.4.27/include/linux/libata.h
Previous file: linux-2.4.27/include/linux/if_arp.h
Back to the patch index
Back to the overall index

diff -urN linux-2.4.26/include/linux/kernel.h linux-2.4.27/include/linux/kernel.h
@@ -196,4 +196,11 @@
 
 #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)
+
 #endif /* _LINUX_KERNEL_H */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)