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] Fix non-debug build after c/s 23767:80e9fcdaef36

To: Tim Deegan <tim@xxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Fix non-debug build after c/s 23767:80e9fcdaef36
From: Keir Fraser <keir.xen@xxxxxxxxx>
Date: Mon, 22 Aug 2011 15:18:50 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 22 Aug 2011 07:19:52 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=user-agent:date:subject:from:to:cc:message-id:thread-topic :thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; bh=htwopEm9fjrOQ0dp2Js2+ApsVrxex4psaGWYD3yVQbk=; b=rUecvNwg+wd8qZY4oHJqTNJGojzYQunaJEkEHoRPldsHjf0ehEg5D79hf5GIShVI4/ Jld5NqbjJYXx0Zu7e4LhIKA09qwGuie0Kh/HqdiDZ+t5NYThMXetDefT8oyEY0Ky3e2L fEwVplceA/v2LZjRNQq9cTWcntHD793TSB2jQ=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20110822140733.GB96414@xxxxxxxxxxxxxxxxxxxxx>
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: Acxg1mm6rYYmL9SFSkG1uX4/ErNaGA==
Thread-topic: [Xen-devel] [PATCH] Fix non-debug build after c/s 23767:80e9fcdaef36
User-agent: Microsoft-Entourage/12.30.0.110427
On 22/08/2011 15:07, "Tim Deegan" <tim@xxxxxxx> wrote:

> At 15:02 +0100 on 22 Aug (1314025327), George Dunlap wrote:
>> That seems to compile just fine, and obviously makes the code a lot
>> cleaner.  The only thing is that this will still cause functions
>> inside ASSERTS (spin_is_locked() in this case) to be called; I thought
>> part of the reason for having ASSERTs in the debug build only was to
>> reduce the cost of all the checks (the other reason to avoid
>> unnecessary crashes on production builds)?
> 
> How about #define ASSERT(p) do { if (0 && (p)); } while (0) ?

Yes, if this also works then it is preferable.

 -- Keir

> Tim.
> 
>> On Mon, Aug 22, 2011 at 2:35 PM, Keir Fraser <keir.xen@xxxxxxxxx> wrote:
>>> George,
>>> 
>>> Would something like this work more generically for the non-debug case?
>>> 
>>> #define ASSERT(p) do { if (p); } while (0)
>>> 
>>>  -- Keir
>>> 



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