[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen staging] libxl_domain: Convert libxl_domain_resume to use libxl__domain_resume
commit ffc664dcb09654c9d34df68f3faf4d0b00642140 Author: Anthony PERARD <anthony.perard@xxxxxxxxxx> AuthorDate: Sun May 26 13:38:06 2019 +0100 Commit: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> CommitDate: Fri Sep 20 10:42:42 2019 +0100 libxl_domain: Convert libxl_domain_resume to use libxl__domain_resume Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx> Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> --- tools/libxl/libxl_domain.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/tools/libxl/libxl_domain.c b/tools/libxl/libxl_domain.c index 80797c5ed2..d78ffa6b60 100644 --- a/tools/libxl/libxl_domain.c +++ b/tools/libxl/libxl_domain.c @@ -174,15 +174,32 @@ int libxl_domain_rename(libxl_ctx *ctx, uint32_t domid, return rc; } +static void domain_resume_done(libxl__egc *egc, + libxl__dm_resume_state *, + int rc); + int libxl_domain_resume(libxl_ctx *ctx, uint32_t domid, int suspend_cancel, const libxl_asyncop_how *ao_how) { AO_CREATE(ctx, domid, ao_how); - int rc = libxl__domain_resume_deprecated(gc, domid, suspend_cancel); - libxl__ao_complete(egc, ao, rc); + libxl__dm_resume_state *dmrs; + + GCNEW(dmrs); + dmrs->ao = ao; + dmrs->domid = domid; + dmrs->callback = domain_resume_done; + libxl__domain_resume(egc, dmrs, suspend_cancel); return AO_INPROGRESS; } +static void domain_resume_done(libxl__egc *egc, + libxl__dm_resume_state *dmrs, + int rc) +{ + STATE_AO_GC(dmrs->ao); + libxl__ao_complete(egc, ao, rc); +} + /* * Preserves a domain but rewrites xenstore etc to make it unique so * that the domain can be restarted. -- generated by git-patchbot for /home/xen/git/xen.git#staging _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |