[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH XEN v2 08/15] tools: Refactor /dev/xen/gnt{dev, shr} wrappers into libxengnttab.
On 22/09/15 12:25, Ian Campbell wrote: Any thoughts/preferences on this library interface regarding: The use of a (perhaps to be added) grant_ref_t in preference to uint32_t as it is now? Probably a good idea. We should also introduce/use domid_t consistently through the new API as well. The use of bool rather than int for "writeable"? Depends if we go for -std=c89 or -std=c99.Given that it is 2015, I vote for -std=c99 and all the niceties it brings, such as bool. Mapping functions returning NULL on failure (rather than e.g MAP_FAILED)? (current code squashes any underlying MAP_FAILED into NULL, but of course that prevents mapping things at NULL, but then I'm not sure why we would want to support that). +1Anyone code choosing to try and map a grant ref at 0 can handcode the systemcalls itself. Sane software will be much happier with NULL as the failure check. ~Andrew _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |