aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxl/libxl_internal.h
diff options
context:
space:
mode:
authorRoger Pau Monne <roger.pau@citrix.com>2012-07-26 16:47:31 +0100
committerRoger Pau Monne <roger.pau@citrix.com>2012-07-26 16:47:31 +0100
commit2d40cd6513387013f2d0409af1366f738ffa134d (patch)
tree48304b21f1066a3593328cb8e0584063099c8719 /tools/libxl/libxl_internal.h
parent962eb2acbb8af50f8cddc28ad4479fe9661ab65c (diff)
downloadxen-2d40cd6513387013f2d0409af1366f738ffa134d.tar.gz
xen-2d40cd6513387013f2d0409af1366f738ffa134d.tar.bz2
xen-2d40cd6513387013f2d0409af1366f738ffa134d.zip
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. As usual, libxl_device_nic_add callers have been modified, and the internal function libxl__device_disk_add has been used if the call was inside an already running ao. Signed-off-by: Roger Pau Monne <roger.pau@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'tools/libxl/libxl_internal.h')
-rw-r--r--tools/libxl/libxl_internal.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h
index 19a9cdc39c..e89f37c296 100644
--- a/tools/libxl/libxl_internal.h
+++ b/tools/libxl/libxl_internal.h
@@ -1933,6 +1933,11 @@ _hidden void libxl__device_disk_add(libxl__egc *egc, uint32_t domid,
libxl_device_disk *disk,
libxl__ao_device *aodev);
+/* AO operation to connect a nic device */
+_hidden void libxl__device_nic_add(libxl__egc *egc, uint32_t domid,
+ libxl_device_nic *nic,
+ libxl__ao_device *aodev);
+
/* Waits for the passed device to reach state XenbusStateInitWait.
* This is not really useful by itself, but is important when executing
* hotplug scripts, since we need to be sure the device is in the correct
@@ -2328,6 +2333,10 @@ _hidden void libxl__add_disks(libxl__egc *egc, libxl__ao *ao, uint32_t domid,
int start, libxl_domain_config *d_config,
libxl__ao_devices *aodevs);
+_hidden void libxl__add_nics(libxl__egc *egc, libxl__ao *ao, uint32_t domid,
+ int start, libxl_domain_config *d_config,
+ libxl__ao_devices *aodevs);
+
/*----- device model creation -----*/
/* First layer; wraps libxl__spawn_spawn. */