diff options
| author | Linus Torvalds <torvalds@home.transmeta.com> | 2002-10-18 02:28:57 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-10-18 02:28:57 -0700 |
| commit | 0fffce8f72fa6c9706f65aa4fb564ccbf78a2ecc (patch) | |
| tree | 25e6fb24a2f270ad057634aa7be29560c15a9ab3 /include/linux/kernel.h | |
| parent | fcaf0e9cdbca53a61d131e6c50e437a11ab201c9 (diff) | |
Make a polite version of BUG_ON() - WARN_ON() which doesn't
kill the machine.
Damn I hate people who kill the machine for no good reason.
Diffstat (limited to 'include/linux/kernel.h')
| -rw-r--r-- | include/linux/kernel.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 2def6ba70584..afa757a3b0a1 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -200,6 +200,12 @@ struct sysinfo { }; #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) extern void BUILD_BUG(void); #define BUILD_BUG_ON(condition) do { if (condition) BUILD_BUG(); } while(0) |
