aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/xen/lib.h
diff options
context:
space:
mode:
authorKeir Fraser <keir@xen.org>2011-01-18 09:01:57 +0000
committerKeir Fraser <keir@xen.org>2011-01-18 09:01:57 +0000
commit21b43fc5c06418d0e0feefe529c74037c9ed671a (patch)
tree34ec8979cc5eb2feeab59ee6ef276ec935ce1e7c /xen/include/xen/lib.h
parent86e440aebc540486dc37fa72f0e7b03dafd616e9 (diff)
downloadxen-21b43fc5c06418d0e0feefe529c74037c9ed671a.tar.gz
xen-21b43fc5c06418d0e0feefe529c74037c9ed671a.tar.bz2
xen-21b43fc5c06418d0e0feefe529c74037c9ed671a.zip
xen: stringify assertion condition for printing sooner.
So that: (XEN) Assertion '!(((*({ unsigned long __ptr; __asm__ ("" : "=r"(__ptr) : "0"(&per_cpu____preempt_count)); (typeof(&per_cpu____preempt_count)) (__ptr + (get_cpu_info()->per_cpu_offset)); }))) || ((irq_stat[(((get_cpu_info()->processor_id)1... becomes: (XEN) Assertion '"!in_atomic()"' failed at softirq.c:61 Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'xen/include/xen/lib.h')
-rw-r--r--xen/include/xen/lib.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/xen/include/xen/lib.h b/xen/include/xen/lib.h
index 7e25cb5a29..65e4fb8bdc 100644
--- a/xen/include/xen/lib.h
+++ b/xen/include/xen/lib.h
@@ -27,7 +27,7 @@ void __warn(char *file, int line);
#ifndef assert_failed
#define assert_failed(p) \
do { \
- printk("Assertion '%s' failed, line %d, file %s\n", #p , \
+ printk("Assertion '%s' failed, line %d, file %s\n", p , \
__LINE__, __FILE__); \
BUG(); \
} while (0)
@@ -35,7 +35,7 @@ do { \
#ifndef NDEBUG
#define ASSERT(p) \
- do { if ( unlikely(!(p)) ) assert_failed(p); } while (0)
+ do { if ( unlikely(!(p)) ) assert_failed(#p); } while (0)
#else
#define ASSERT(p) ((void)0)
#endif