diff options
Diffstat (limited to 'src/H5VLcallback.c')
-rw-r--r-- | src/H5VLcallback.c | 46 |
1 files changed, 13 insertions, 33 deletions
diff --git a/src/H5VLcallback.c b/src/H5VLcallback.c index 427e447..4ab398f 100644 --- a/src/H5VLcallback.c +++ b/src/H5VLcallback.c @@ -153,9 +153,10 @@ static herr_t H5VL__introspect_get_conn_cls(void *obj, const H5VL_class_t *cls, const H5VL_class_t **conn_cls); static herr_t H5VL__introspect_opt_query(void *obj, const H5VL_class_t *cls, H5VL_subclass_t subcls, int opt_type, uint64_t *flags); -static herr_t H5VL__request_wait(void *req, const H5VL_class_t *cls, uint64_t timeout, H5ES_status_t *status); +static herr_t H5VL__request_wait(void *req, const H5VL_class_t *cls, uint64_t timeout, + H5VL_request_status_t *status); static herr_t H5VL__request_notify(void *req, const H5VL_class_t *cls, H5VL_request_notify_t cb, void *ctx); -static herr_t H5VL__request_cancel(void *req, const H5VL_class_t *cls); +static herr_t H5VL__request_cancel(void *req, const H5VL_class_t *cls, H5VL_request_status_t *status); static herr_t H5VL__request_specific(void *req, const H5VL_class_t *cls, H5VL_request_specific_t specific_type, va_list arguments); static herr_t H5VL__request_optional(void *req, const H5VL_class_t *cls, H5VL_request_optional_t opt_type, @@ -5941,16 +5942,13 @@ done: * * Purpose: Waits on an asychronous request through the VOL * - * Note: Releases the request if the operation has completed and the - * connector callback succeeds - * * Return: Success: Non-negative * Failure: Negative * *------------------------------------------------------------------------- */ static herr_t -H5VL__request_wait(void *req, const H5VL_class_t *cls, uint64_t timeout, H5ES_status_t *status) +H5VL__request_wait(void *req, const H5VL_class_t *cls, uint64_t timeout, H5VL_request_status_t *status) { herr_t ret_value = SUCCEED; /* Return value */ @@ -5978,16 +5976,13 @@ done: * * Purpose: Waits on an asychronous request through the VOL * - * Note: Releases the request if the operation has completed and the - * connector callback succeeds - * * Return: Success: Non-negative * Failure: Negative * *------------------------------------------------------------------------- */ herr_t -H5VL_request_wait(const H5VL_object_t *vol_obj, uint64_t timeout, H5ES_status_t *status) +H5VL_request_wait(const H5VL_object_t *vol_obj, uint64_t timeout, H5VL_request_status_t *status) { hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */ herr_t ret_value = SUCCEED; /* Return value */ @@ -6019,16 +6014,13 @@ done: * * Purpose: Waits on a request * - * Note: Releases the request if the operation has completed and the - * connector callback succeeds - * * Return: Success: Non-negative * Failure: Negative * *------------------------------------------------------------------------- */ herr_t -H5VLrequest_wait(void *req, hid_t connector_id, uint64_t timeout, H5ES_status_t *status /*out*/) +H5VLrequest_wait(void *req, hid_t connector_id, uint64_t timeout, H5VL_request_status_t *status /*out*/) { H5VL_class_t *cls; /* VOL connector's class struct */ herr_t ret_value = SUCCEED; /* Return value */ @@ -6054,8 +6046,6 @@ done: * Purpose: Registers a user callback to be invoked when an asynchronous * operation completes * - * Note: Releases the request, if connector callback succeeds - * * Return: Success: Non-negative * Failure: Negative * @@ -6090,8 +6080,6 @@ done: * Purpose: Registers a user callback to be invoked when an asynchronous * operation completes * - * Note: Releases the request, if connector callback succeeds - * * Return: Success: Non-negative * Failure: Negative * @@ -6131,8 +6119,6 @@ done: * Purpose: Registers a user callback to be invoked when an asynchronous * operation completes * - * Note: Releases the request, if connector callback succeeds - * * Return: Success: Non-negative * Failure: Negative * @@ -6164,15 +6150,13 @@ done: * * Purpose: Cancels an asynchronous request through the VOL * - * Note: Releases the request, if connector callback succeeds - * * Return: Success: Non-negative * Failure: Negative * *------------------------------------------------------------------------- */ static herr_t -H5VL__request_cancel(void *req, const H5VL_class_t *cls) +H5VL__request_cancel(void *req, const H5VL_class_t *cls, H5VL_request_status_t *status) { herr_t ret_value = SUCCEED; /* Return value */ @@ -6187,7 +6171,7 @@ H5VL__request_cancel(void *req, const H5VL_class_t *cls) HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'async cancel' method") /* Call the corresponding VOL callback */ - if ((cls->request_cls.cancel)(req) < 0) + if ((cls->request_cls.cancel)(req, status) < 0) HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "request cancel failed") done: @@ -6199,15 +6183,13 @@ done: * * Purpose: Cancels an asynchronous request through the VOL * - * Note: Releases the request, if connector callback succeeds - * * Return: Success: Non-negative * Failure: Negative * *------------------------------------------------------------------------- */ herr_t -H5VL_request_cancel(const H5VL_object_t *vol_obj) +H5VL_request_cancel(const H5VL_object_t *vol_obj, H5VL_request_status_t *status) { hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */ herr_t ret_value = SUCCEED; /* Return value */ @@ -6223,7 +6205,7 @@ H5VL_request_cancel(const H5VL_object_t *vol_obj) vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ - if (H5VL__request_cancel(vol_obj->data, vol_obj->connector->cls) < 0) + if (H5VL__request_cancel(vol_obj->data, vol_obj->connector->cls, status) < 0) HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "request cancel failed") done: @@ -6239,28 +6221,26 @@ done: * * Purpose: Cancels a request * - * Note: Releases the request, if connector callback succeeds - * * Return: Success: Non-negative * Failure: Negative * *------------------------------------------------------------------------- */ herr_t -H5VLrequest_cancel(void *req, hid_t connector_id) +H5VLrequest_cancel(void *req, hid_t connector_id, H5VL_request_status_t *status) { H5VL_class_t *cls; /* VOL connector's class struct */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API_NOINIT - H5TRACE2("e", "*xi", req, connector_id); + H5TRACE3("e", "*xi*#", req, connector_id, status); /* Get class pointer */ if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") /* Call the corresponding internal VOL routine */ - if (H5VL__request_cancel(req, cls) < 0) + if (H5VL__request_cancel(req, cls, status) < 0) HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "unable to cancel request") done: |