]> xenbits.xensource.com Git - xen.git/commitdiff
libxl: Rename AO_ABORT to AO_CREATE_FAIL
authorIan Jackson <ian.jackson@eu.citrix.com>
Thu, 25 Jun 2015 15:33:02 +0000 (16:33 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Fri, 26 Jun 2015 15:53:50 +0000 (16:53 +0100)
We are going to introduce a new meaning for aborting an ao, so rename
this to avoid confusion.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/libxl/libxl.c
tools/libxl/libxl_event.c
tools/libxl/libxl_internal.h

index ed50d32572c7a2e33c888ac1404b7525e2e630b0..cfbae7c64503fb11440a48b9fe2f49553995c1b0 100644 (file)
@@ -901,7 +901,7 @@ int libxl_domain_remus_start(libxl_ctx *ctx, libxl_domain_remus_info *info,
     return AO_INPROGRESS;
 
  out:
-    return AO_ABORT(rc);
+    return AO_CREATE_FAIL(rc);
 }
 
 static void libxl__remus_setup_done(libxl__egc *egc,
@@ -982,7 +982,7 @@ int libxl_domain_suspend(libxl_ctx *ctx, uint32_t domid, int fd, int flags,
     return AO_INPROGRESS;
 
  out_err:
-    return AO_ABORT(rc);
+    return AO_CREATE_FAIL(rc);
 }
 
 int libxl_domain_pause(libxl_ctx *ctx, uint32_t domid)
@@ -3008,7 +3008,7 @@ out:
 
     if (lock) libxl__unlock_domain_userdata(lock);
 
-    if (rc) return AO_ABORT(rc);
+    if (rc) return AO_CREATE_FAIL(rc);
     return AO_INPROGRESS;
 }
 
@@ -4198,7 +4198,7 @@ out:
         libxl__initiate_device_remove(egc, aodev);                      \
                                                                         \
     out:                                                                \
-        if (rc) return AO_ABORT(rc);                                    \
+        if (rc) return AO_CREATE_FAIL(rc);                                    \
         return AO_INPROGRESS;                                           \
     }
 
@@ -4609,7 +4609,7 @@ int libxl_device_events_handler(libxl_ctx *ctx,
     return AO_INPROGRESS;
 
 out:
-    return AO_ABORT(rc);
+    return AO_CREATE_FAIL(rc);
 }
 
 /******************************************************************************/
index 3b4514808cb5acb25697721de5449813bdffef0e..4b234a328bb9c40677937f4e4412069276bcf0b1 100644 (file)
@@ -1735,10 +1735,10 @@ void libxl__ao__destroy(libxl_ctx *ctx, libxl__ao *ao)
     free(ao);
 }
 
-void libxl__ao_abort(libxl__ao *ao)
+void libxl__ao_create_fail(libxl__ao *ao)
 {
     AO_GC;
-    LOG(DEBUG,"ao %p: abort",ao);
+    LOG(DEBUG,"ao %p: create fail",ao);
     assert(ao->magic == LIBXL__AO_MAGIC);
     assert(ao->in_initiator);
     assert(!ao->complete);
index de36c7aa2968182b0fd15de5ab16d76536393f5e..e2c52996a9562b31cbd5d940ca2bf285f8695a7f 100644 (file)
@@ -1953,8 +1953,8 @@ _hidden void libxl__egc_cleanup(libxl__egc *egc);
  *        libxl__ao_progress_gethow.
  *
  * - If the initiation is unsuccessful, the initiating function must
- *   call libxl__ao_abort before unlocking and returning whatever
- *   error code is appropriate (AO_ABORT macro).
+ *   call libxl__ao_create_fail before unlocking and returning whatever
+ *   error code is appropriate (AO_CREATE_FAIL macro).
  *
  * If initiation is successful:
  *
@@ -2011,10 +2011,10 @@ _hidden void libxl__egc_cleanup(libxl__egc *egc);
         (ao__rc);                                               \
    })
 
-#define AO_ABORT(rc) ({                                         \
+#define AO_CREATE_FAIL(rc) ({                                   \
         libxl_ctx *ao__ctx = libxl__gc_owner(&ao->gc);          \
         assert(rc);                                             \
-        libxl__ao_abort(ao);                                    \
+        libxl__ao_create_fail(ao);                              \
         libxl__ctx_unlock(ao__ctx); /* gc is now invalid */     \
         EGC_FREE;                                               \
         (rc);                                                   \
@@ -2035,7 +2035,7 @@ _hidden libxl__ao *libxl__ao_create(libxl_ctx*, uint32_t domid,
        const char *file, int line, const char *func);
 _hidden int libxl__ao_inprogress(libxl__ao *ao,
        const char *file, int line, const char *func); /* temporarily unlocks */
-_hidden void libxl__ao_abort(libxl__ao *ao);
+_hidden void libxl__ao_create_fail(libxl__ao *ao);
 _hidden void libxl__ao_complete(libxl__egc *egc, libxl__ao *ao, int rc);
 _hidden libxl__gc *libxl__ao_inprogress_gc(libxl__ao *ao);
 
@@ -2064,7 +2064,7 @@ _hidden void libxl__ao_complete_check_progress_reports(libxl__egc*, libxl__ao*);
  * The returned sub-ao is suitable for passing to gc-related functions
  * and macros such as libxl__ao_inprogress_gc, AO_GC, and STATE_AO_GC.
  *
- * It MUST NOT be used with AO_INPROGRESS, AO_ABORT,
+ * It MUST NOT be used with AO_INPROGRESS, AO_CREATE_FAIL,
  * libxl__ao_complete, libxl__ao_progress_report, and so on.
  *
  * The caller must ensure that all of the sub-ao's are freed before