From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH 2/6] xl: Implement XENMEM_claim_pages support via 'claim_mode' global config Date: Fri, 12 Apr 2013 15:51:04 -0400 Message-ID: <20130412195104.GD19721@phenom.dumpdata.com> References: <1365623998-13710-1-git-send-email-konrad.wilk@oracle.com> <1365623998-13710-3-git-send-email-konrad.wilk@oracle.com> <20840.16881.907625.772933@mariner.uk.xensource.com> <20840.19597.331764.59016@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20840.19597.331764.59016@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson Cc: George Dunlap , Dan Magenheimer , "xen-devel@lists.xensource.com" , Ian Campbell List-Id: xen-devel@lists.xenproject.org > Of these I prefer 1. Opinions ? Whatever we do needs to be in 4.3. There is also option 5. Define a new macro: diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h index 4922313..4a6ee76 100644 --- a/tools/libxl/libxl.h +++ b/tools/libxl/libxl.h @@ -359,6 +359,11 @@ typedef struct { int val; } libxl_defbool; +#define DEFINE_BOOL(name, _val) \ + libxl_defbool name = { .val = _val } +#define DEFINE_FALSE_BOOL(name) DEFINE_BOOL(name, LIBXL__DEFBOOL_FALSE) +#define DEFINE_TRUE_BOOL(name) DEFINE_BOOL(name, LIBXL__DEFBOOL_TRUE) + void libxl_defbool_set(libxl_defbool *db, bool b); /* Resets to default */ void libxl_defbool_unset(libxl_defbool *db); And use DEFINE_FALSE_BOOL(claim_mode) in the xl.h file.