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

Re: [Xen-devel] [PATCH 17/29] libxl: cancellation: Provide public ao cancellation API



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 <ian.campbell@xxxxxxxxxx>

Thanks,
Ian.

_______________________________________________
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®.