diff options
author | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2007-03-27 15:53:45 +0100 |
---|---|---|
committer | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2007-03-27 15:53:45 +0100 |
commit | 9726237543394a5cf7b96bd76a9ccdcbe075e7e6 (patch) | |
tree | 0380f065e34e2fa90a683c8eec976f9fbeb24fdf /xen/include/xen/lib.h | |
parent | aacef84b337c59c447472f9102f270e3887254cd (diff) | |
download | xen-9726237543394a5cf7b96bd76a9ccdcbe075e7e6.tar.gz xen-9726237543394a5cf7b96bd76a9ccdcbe075e7e6.tar.bz2 xen-9726237543394a5cf7b96bd76a9ccdcbe075e7e6.zip |
Add WARN() and generic WARN_ON().
Based on a patch by Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'xen/include/xen/lib.h')
-rw-r--r-- | xen/include/xen/lib.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/xen/include/xen/lib.h b/xen/include/xen/lib.h index f5f59441f1..3145542b25 100644 --- a/xen/include/xen/lib.h +++ b/xen/include/xen/lib.h @@ -10,8 +10,10 @@ #include <asm/bug.h> void __bug(char *file, int line) __attribute__((noreturn)); +void __warn(char *file, int line); -#define BUG_ON(_p) do { if (_p) BUG(); } while ( 0 ) +#define BUG_ON(p) do { if (p) BUG(); } while (0) +#define WARN_ON(p) do { if (p) WARN(); } while (0) /* Force a compilation error if condition is true */ #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2 * !!(condition)])) |