From: Ian Jackson Subject: Re: [PATCH 17/29] libxl: cancellation: Provide public ao cancellation API Date: Tue, 31 Mar 2015 19:26:48 +0100 Message-ID: <21786.59112.332728.79897@mariner.uk.xensource.com> References: <1423599016-32639-1-git-send-email-ian.jackson@eu.citrix.com> <1423599016-32639-18-git-send-email-ian.jackson@eu.citrix.com> <1427197521.21742.357.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1427197521.21742.357.camel@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: Ian Campbell Cc: Euan Harris , xen-devel@lists.xensource.com, Ian Jackson List-Id: xen-devel@lists.xenproject.org Ian Campbell writes ("Re: [Xen-devel] [PATCH 17/29] libxl: cancellation: Provide public ao cancellation API"): > On Tue, 2015-02-10 at 20:10 +0000, Ian Jackson wrote: > > +/* > > + * It is sometimes possible to cancel an asynchronous operation. > > + * > > + * libxl_ao_cancel searches for an ongoing asynchronous operation whose > > + * ao_how is identical to *how, and tries to cancel it. > > I can see that you have arranged for the pointer not to be required to > match, just the contents of the struct, which may be convenient for some > callers who haven't remembered the ao_how somewhere convenient, but is > it permissible to use the same pointer if it is convenient? The pointer is a const libxl_asyncop_how* (both at operation initiation and for libxl_ao_cancel), so libxl promises not to fiddle with the struct's contents. I think that it should therefore be obvious that you can use the same pointer, as well as another struct with the same contents (the latter being defined by the doc comment saying that libxl_ao_cancel looks for an identical *how). > Other than wondering about that this patch looks good, > Acked-by: Ian Campbell Thanks, Ian.