From: Ian Campbell Subject: [PATCH] xen: stringify assertion condition for printing sooner Date: Mon, 17 Jan 2011 14:15:24 +0000 Message-ID: <711cbaa038cae8c03cf8.1295273724@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: Ian Campbell List-Id: xen-devel@lists.xenproject.org # HG changeset patch # User Ian Campbell # Date 1295273568 0 # Node ID 711cbaa038cae8c03cf825165d2e07b0a3c94f89 # Parent 92e51f0053b5f5c05aa0e4948f6c35be364be11c 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 diff -r 92e51f0053b5 -r 711cbaa038ca xen/include/xen/lib.h --- a/xen/include/xen/lib.h Mon Jan 17 11:43:46 2011 +0000 +++ b/xen/include/xen/lib.h Mon Jan 17 14:12:48 2011 +0000 @@ -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