diff options
author | Roger Pau Monne <roger.pau@citrix.com> | 2012-07-23 13:09:42 +0100 |
---|---|---|
committer | Roger Pau Monne <roger.pau@citrix.com> | 2012-07-23 13:09:42 +0100 |
commit | 225b2010db1b84c223c981a0cd09e548e5fcf93b (patch) | |
tree | c140f42ff2f297df239ab4a280703471eaf36a2e /tools/libxl/libxl.h | |
parent | 9770c75ba37df52ad363ac114a8da5bee487b7b1 (diff) | |
download | xen-225b2010db1b84c223c981a0cd09e548e5fcf93b.tar.gz xen-225b2010db1b84c223c981a0cd09e548e5fcf93b.tar.bz2 xen-225b2010db1b84c223c981a0cd09e548e5fcf93b.zip |
libxl: convert libxl_domain_destroy to an async op
This change introduces some new structures, and breaks the mutual
dependency that libxl_domain_destroy and libxl__destroy_device_model
had. This is done by checking if the domid passed to
libxl_domain_destroy has a stubdom, and then having the bulk of the
destroy machinery in a separate function (libxl__destroy_domid) that
doesn't check for stubdom presence, since we check for it in the upper
level function. The reason behind this change is the need to use
structures for ao operations, and it was impossible to have two
different self-referencing structs.
All uses of libxl_domain_destroy have been changed, and either
replaced by the new libxl_domain_destroy ao function or by the
internal libxl__domain_destroy that can be used 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.h')
-rw-r--r-- | tools/libxl/libxl.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h index c2d5c06154..5c819f19e1 100644 --- a/tools/libxl/libxl.h +++ b/tools/libxl/libxl.h @@ -527,7 +527,8 @@ int libxl_domain_remus_start(libxl_ctx *ctx, libxl_domain_remus_info *info, int libxl_domain_shutdown(libxl_ctx *ctx, uint32_t domid); int libxl_domain_reboot(libxl_ctx *ctx, uint32_t domid); -int libxl_domain_destroy(libxl_ctx *ctx, uint32_t domid); +int libxl_domain_destroy(libxl_ctx *ctx, uint32_t domid, + const libxl_asyncop_how *ao_how); int libxl_domain_preserve(libxl_ctx *ctx, uint32_t domid, libxl_domain_create_info *info, const char *name_suffix, libxl_uuid new_uuid); /* get max. number of cpus supported by hypervisor */ |