[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2] tools/libxl: libxl_get_scheduler should return an int
Julien Grall writes ("Re: [PATCH v2] tools/libxl: libxl_get_scheduler should return an int"): > On 03/21/2014 02:28 PM, Ian Jackson wrote: > > But then I don't understand why you changed this too. Either of these > > changes would suffice by itself, and the former is marginally less > > fiddly. > > The variable sched is a libxl_scheduler in this function. I can't modify > the type because it's used with lixbl_scheduler_from_string (see > xl_cmdimpl.c:6703). Ah. I think libxl_scheduler_from_string should be changed too. Having enums in APIs is not a good idea. One reason is that on some architectures the size or passing convention can depend on the range of the enum. So backporting a patch that adds a new _value_ to an enum can result in ABI breakage, even if the new value is never actually used! I realise that this is rather counterintuitive and I'm sorry I didn't spot this when it went in. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |