[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH RFC UNTESTED 30/28] squash! libxl: cancellation: Provide public ao cancellation API



[ In v4 of the series I will combine this fixup with the named patch
  using git-rebase -i --autosquash -iwj. ]

v4: Actually record aos on aos_inprogress.
    (Report from Koushik Chakravarty at Citrix.)

Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
 tools/libxl/libxl_event.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/libxl/libxl_event.c b/tools/libxl/libxl_event.c
index e28c465..ed2dbfc 100644
--- a/tools/libxl/libxl_event.c
+++ b/tools/libxl/libxl_event.c
@@ -1844,6 +1844,7 @@ void libxl__ao_abort(libxl__ao *ao)
     assert(!ao->complete);
     assert(!ao->progress_reports_outstanding);
     assert(!ao->cancelling);
+    LIBXL_LIST_REMOVE(ao, inprogress_entry);
     libxl__ao__destroy(CTX, ao);
 }
 
@@ -1864,7 +1865,7 @@ void libxl__ao_complete(libxl__egc *egc, libxl__ao *ao, 
int rc)
     assert(!ao->nested_progeny);
     ao->complete = 1;
     ao->rc = rc;
-
+    LIBXL_LIST_REMOVE(ao, inprogress_entry);
     libxl__ao_complete_check_progress_reports(egc, ao);
 }
 
@@ -1937,6 +1938,8 @@ libxl__ao *libxl__ao_create(libxl_ctx *ctx, uint32_t 
domid,
                "ao %p: create: how=%p callback=%p poller=%p",
                ao, how, ao->how.callback, ao->poller);
 
+    LIBXL_LIST_INSERT_HEAD(&ctx->aos_inprogress, ao, inprogress_entry);
+
     return ao;
 
  out:
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.