From: Ian Jackson Subject: Re: [PATCH v5 05/10] libxl: convert libxl_device_nic_add to an async operation Date: Thu, 7 Jun 2012 15:26:32 +0100 Message-ID: <20432.47640.736331.500556@mariner.uk.xensource.com> References: <1338383275-21315-1-git-send-email-roger.pau@citrix.com> <1338383275-21315-6-git-send-email-roger.pau@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1338383275-21315-6-git-send-email-roger.pau@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: Roger Pau Monne Cc: "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org Roger Pau Monne writes ("[PATCH v5 05/10] libxl: convert libxl_device_nic_add to an async operation"): > This patch converts libxl_device_nic_add to an ao operation that > waits for device backend to reach state XenbusStateInitWait and then > marks the operation as completed. This is not really useful now, but > will be used by latter patches that will launch hotplug scripts after > we reached the desired xenbus state. > > Calls to libxl_device_nic_add have also been moved to occur after the > device model has been launched, so when hotplug scripts are called > from this functions the interfaces already exists. This is now a lot smaller, excellent. > -int libxl_device_nic_add(libxl_ctx *ctx, uint32_t domid, libxl_device_nic *nic) > +int libxl_device_nic_add(libxl_ctx *ctx, uint32_t domid, libxl_device_nic *nic, > + const libxl_asyncop_how *ao_how) > { > - GC_INIT(ctx); > + AO_CREATE(ctx, domid, ao_how); > + libxl__ao_device *device; Can we call that variable `aodev' ? Elsewhere `device' is a libxl_device_FOO. Ian.