[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 1/5] xen: improve changes to xen_add_to_physmap



On Tue, 7 Aug 2012, Jan Beulich wrote:
> >>> On 07.08.12 at 14:40, Jean Guyader <jean.guyader@xxxxxxxxx> wrote:
> > You could probably do something like
> > 
> > #ifdef __GNUC__
> > # define UNION_NAME
> > #else
> > # define UNION_NAME u
> > #endif
> > union {
> >     /* Number of pages to go through for gmfn_range */
> >     uint16_t    size;
> >     /* IFF gmfn_foreign */
> >     domid_t foreign_domid;
> > } UNION_NAME;
> > 
> > It's not ideal but this way you keep the binary compatibility and you
> > also the code still cmopatible with GCC.
> 
> Ah, yes, something along those lines might be okay; we already
> have similar things e.g. for __DECL_REG() (note the additional
> use of __STRICT_ANSI__ there, though).

But it is strict ANSI.


> The most problematic
> thing here is the name space cluttering - UNION_NAME is certainly
> not good, but __DECL_REG really is too unspecific too (yet we
> got away with it so far).

OK, I'll got for this strategy.

Regarding the name, maybe it should be XEN_ADD_TO_PHYSMAP_FIELD?


#if (defined(__GNUC__) && !defined(__STRICT_ANSI__)) || (__STDC_VERSION__ >= 
201112L)
# define XEN_ADD_TO_PHYSMAP_ARG
#else
# define XEN_ADD_TO_PHYSMAP_ARG u
#endif


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.