WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] xen: stringify assertion condition for printing

To: Jan Beulich <JBeulich@xxxxxxxxxx>, Ian Campbell <ian.campbell@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] xen: stringify assertion condition for printing sooner
From: Keir Fraser <keir@xxxxxxx>
Date: Mon, 17 Jan 2011 14:52:28 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 17 Jan 2011 06:53:23 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:user-agent:date:subject:from:to:cc :message-id:thread-topic:thread-index:in-reply-to:mime-version :content-type:content-transfer-encoding; bh=MJWwwCyFbzrLidEGpIp6dp2bWIKKcbe0I7kLnyzHXfg=; b=TMOgOWB417WOrxTLVKxSxnR8cQooMKhPS70+fd1TBDCVM7AiBHTuRaY+84u/da0ocl SWQmG51toSBu4LgxKXFD2BhqkaY2DgAc9f+m+7/Vf82I7u4uc5fWal9zKefx9lfECr6B jGSoVRSSTaFeXTquYdUGutSISbu9OlriGtVnU=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:user-agent:date:subject:from:to:cc:message-id:thread-topic :thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; b=jCI4JtReT7TMbKMsV7wvgrewiVF60+v5ZqYHCTqxZil2ba1OZwm6VcKvSFglXWy1F0 VyZbOS1WWlGw4Nra078uxs5XNTXdv1IzsJdWln/uvG17hNXRBleR/Ywcn/IgWgUKaDXs xrxJdVpCW1TAzz6ZdHc///46kaQzxhjnKt6T8=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4D346006020000780002CBF5@xxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acu2Vijp7mDK9tRfAU2hP102SPk+5Q==
Thread-topic: [Xen-devel] [PATCH] xen: stringify assertion condition for printing sooner
User-agent: Microsoft-Entourage/12.28.0.101117
On 17/01/2011 14:28, "Jan Beulich" <JBeulich@xxxxxxxxxx> wrote:

> 
>> 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
> 
> But then you should also remove the second stringification in
> include/asm-x86/bug.h:assert_failed(), so that it becomes
> 
> (XEN) Assertion '!in_atomic()' failed at softirq.c:61

I'll give the patch a spin and modify as necessary before I check it in.

 -- Keir

> Jan
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>