return AO_INPROGRESS;
out:
- return AO_ABORT(rc);
+ return AO_CREATE_FAIL(rc);
}
static void libxl__remus_setup_done(libxl__egc *egc,
return AO_INPROGRESS;
out_err:
- return AO_ABORT(rc);
+ return AO_CREATE_FAIL(rc);
}
int libxl_domain_pause(libxl_ctx *ctx, uint32_t domid)
if (lock) libxl__unlock_domain_userdata(lock);
- if (rc) return AO_ABORT(rc);
+ if (rc) return AO_CREATE_FAIL(rc);
return AO_INPROGRESS;
}
libxl__initiate_device_remove(egc, aodev); \
\
out: \
- if (rc) return AO_ABORT(rc); \
+ if (rc) return AO_CREATE_FAIL(rc); \
return AO_INPROGRESS; \
}
return AO_INPROGRESS;
out:
- return AO_ABORT(rc);
+ return AO_CREATE_FAIL(rc);
}
/******************************************************************************/
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);
* 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:
*
(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); \
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);
* 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