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

[Xen-changelog] [xen master] libxl: Rename AO_ABORT to AO_CREATE_FAIL



commit 2a8c62608383b7c492026125ed529cb8656e7f25
Author:     Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
AuthorDate: Thu Jun 25 16:33:02 2015 +0100
Commit:     Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
CommitDate: Fri Jun 26 16:53:50 2015 +0100

    libxl: Rename AO_ABORT to AO_CREATE_FAIL
    
    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@xxxxxxxxxxxxx>
    Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 tools/libxl/libxl.c          |   10 +++++-----
 tools/libxl/libxl_event.c    |    4 ++--
 tools/libxl/libxl_internal.h |   12 ++++++------
 3 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index ed50d32..cfbae7c 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -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);
 }
 
 
/******************************************************************************/
diff --git a/tools/libxl/libxl_event.c b/tools/libxl/libxl_event.c
index 3b45148..4b234a3 100644
--- a/tools/libxl/libxl_event.c
+++ b/tools/libxl/libxl_event.c
@@ -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);
diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h
index de36c7a..e2c5299 100644
--- a/tools/libxl/libxl_internal.h
+++ b/tools/libxl/libxl_internal.h
@@ -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
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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