|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 2/6] xl: Implement XENMEM_claim_pages support via 'claim_mode' global config
On Fri, 2013-04-12 at 21:07 +0100, Konrad Rzeszutek Wilk wrote:
> On Fri, Apr 12, 2013 at 03:51:04PM -0400, Konrad Rzeszutek Wilk wrote:
> > > 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.
> >
>
> Correction (But now that I look at it, it is not that much nicer as you
> end up with LIBXL__DEFBOOL in the header file. <sigh>
If this is the right way to go (I'm not sure) then I thing you just want
to stop using defbool and use regular booleans, like the other xl
options do.
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |