From: Ian Jackson Subject: Re: [PATCH XEN v2 08/15] tools: Refactor /dev/xen/gnt{dev, shr} wrappers into libxengnttab. Date: Tue, 22 Sep 2015 13:41:15 +0100 Message-ID: <22017.19563.847324.14337@mariner.uk.xensource.com> References: <1436975173.32371.121.camel@citrix.com> <1436975223-11098-8-git-send-email-ian.campbell@citrix.com> <1442921112.10338.153.camel@citrix.com> <56013D4E.5060509@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <56013D4E.5060509@citrix.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: Andrew Cooper Cc: roger.pau@citrix.com, wei.liu2@citrix.com, Ian Campbell , stefano.stabellini@eu.citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Andrew Cooper writes ("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? Is a grant_ref_t uint32_t ? > Probably a good idea. We should also introduce/use domid_t consistently > through the new API as well. domid_it is a uint16_t. The problem with that is that there is no space for sentinel or magic values which are assigned meanings outside the hypervisor. > Given that it is 2015, I vote for -std=c99 and all the niceties it > brings, such as bool. We should certainly consider some GNU extensions. I don't know which are widely available, but we should consider: * Statement expressions * Some of the function and data attributes, particularly format, noreturn, unused. (Maybe via some compatibility macros.) * Anonymous struct/union members. * typeof Ian.