From: Ian Jackson Subject: Re: [PATCH 08/11] libxl: Asynchronous/long-running operation infrastructure Date: Wed, 15 Feb 2012 12:51:35 +0000 Message-ID: <20283.43607.571172.475948@mariner.uk.xensource.com> References: <1327598457-28261-1-git-send-email-ian.jackson@eu.citrix.com> <1327598457-28261-9-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Roger Pau =?iso-8859-1?Q?Monn=E9?= Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org Roger Pau Monn=E9 writes ("Re: [Xen-devel] [PATCH 08/11] libxl: Asynchronou= s/long-running operation infrastructure"): > 2012/1/26 Ian Jackson : > > +int libxl__ao_inprogress(libxl__ao *ao) > > +{ > > + AO_GC; > > + int rc; > = > I've just started playing with this, but I've found that if you call > AO_INPROGRESS without adding any event it blocks forever, and I'm not > sure if that is a design decision or a bug. Anyway, sometimes like in > libxl__initiate_device_remove you might call AO_INPROGRESS without > adding any event, so I think it will be safe to add something like: How are you expecting this ao to complete ? If you haven't asked for an event callback then presumably libxl__ao_complete will never be called. > if (!CTX->watch_counter) > return 0; This is definitely wrong. Ian.