summaryrefslogtreecommitdiffstats
path: root/src/H5CX.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@lbl.gov>2021-06-02 20:29:46 (GMT)
committerGitHub <noreply@github.com>2021-06-02 20:29:46 (GMT)
commit4b7f34acc16c7d071a5c1d4519ba2a01354e51db (patch)
tree944c634b581e30979afd91ef05fcef4db4a062da /src/H5CX.c
parent88a83d56c07f7c462d1866a2a2642a9f2e37dd22 (diff)
downloadhdf5-4b7f34acc16c7d071a5c1d4519ba2a01354e51db.zip
hdf5-4b7f34acc16c7d071a5c1d4519ba2a01354e51db.tar.gz
hdf5-4b7f34acc16c7d071a5c1d4519ba2a01354e51db.tar.bz2
Combo set of async and other changes (#161)
* Update API tracing for new H5VL_request_status_t typedef * Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure * Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation * Remove 'canceled' event status from Java constants * Be safer about releasing resources when inserting a newly opened/created object or file into an event set * Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate". * Remove H5ES_STATUS_CANCELED from Java wrappers also * Apply patch for dynamically registering optional VOL operations * (a) Add async APIs for H5O module as listed in jira issue ID-283. (b) Remove verification of name parameter in async related routines for H55A and H5L modules because it is checked in H5VL_setup* routine. (c) Modify h5dump expected output due to the async changes. * Corrections based on PR feedback. * Further changes to make based on PR feedback. * Remove H5Dwait & H5Fwait (moved to the async connector). Added H5atclose routine. Updated 'optional op' operations. * Fix missed merge marker, and reformatted line * Update API tracing infrastructure for H5atclose callback * Clean up some warnings * Normalize against develop branch * Correct level of indirection * Add doxygen info for H5is_library_terminating and regression tests for it and H5atclose * Relocate prototype (and doxygen info) for H5Aclose * Align w/changes on develop * Move group package initialization code to H5Gint.c, and update tracing macros * Change non-static function declarations to be static * Correct GCC diagnostic macro * Ensure that H5TSpublic.h header gets installed (#129) * Finish moving API routines that invoke VOL framework to main source files. * Fix position of H5Fmount and H5Funmount * Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information. * Add wrappers for dynamically registered optional operations * Fix typo * Update doxygen comment for H5atclose with additional detail. * Add H5VL\*_vararg versions of H5VL routines that use va_list parameters * Implement and test H5S_BLOCK * Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c. * Add H5Iregister_future routine and tests. * Correct return value for H5Lexists_async * Add H5_DLL macro to public H5ES API routines * Update supported -> flags parameter for introspect_query callback * Remove my email address. Update passthrough VOL connector ID. * Fix comment for post_open_api_common * Remove unused non-blocking VOL connector * Minor cleanup in async branch in preparation for merge to develop * Update CMake and the Autotools to use the new pass-through VOL ID * Finish another iteration on public H5ES routines, along with running the code reformatter * Another round of reformatting * Fix for SWMR daily test failures (#160) The H5I_register_using_existing_id() call did not initialize the future ID callbacks, causing the library to segfault when it tried to resolve those function pointers. * Added selective async APIs (#150) * Added selective async APIs Description: Added the following APIs: H5Ropen_attr_async H5Ropen_object_async H5Ropen_region_async H5Mcreate_async H5Mopen_async H5Mput_async H5Mget_async H5Mclose_async H5Tcommit_async H5Topen_async H5Tcopy_async H5Tclose_async - Updated an expected output file to include a new internal function in the error stack for the failure case. * Updated async APIs per reviews, including removing async version of H5Tcopy. * Removed statements that were added by mistake in the previous commit. * Fix compile issues in H5M and warnings elsewhere * Reformat code * Brings VOL_LIST changes from develop. (#163) * Remove H5Dwait and H5Fwait calls, which were incorrectly brought back in * Tiny cleanup of H5Lcreate_hard_async * Run source formatter * Allow for canceled operation in wait_cb * Attempt to fix switch on string value * Re-run source formatter * Add H5S_BLOCK testfile to CMake clean target * Add H5Pset_vol_async API routine and 'get_cap_flags' VOL introspection callback * Clean up warnings * Add H5P(set\|get)_vol_implicit_async API routines to allow \/ disallow implicit asynchronous operations (default is disallowed) * Run formatting script * Remove H5VL_REQUEST_WAIT\* * Warning cleanup * Eliminate strdup()s on statically allocated strings * Warning cleanup * Split H5VLrestore_lib_state into H5VLstart_lib_state and H5VLrestore_lib_state, and rename H5VLreset_lib_state to H5VLfinish_lib_state. * Duplicate strings when building err_info to return to applicatin * Move connector author routines into seperate header files, all included in the new hdf5dev.h header * Run bin/trace to add TRACE macros * Allow H5ES_NONE as a valid, but no-op, parameter to all H5ES API routines that accept an event set ID * Clean up formatting * Remove H5Pset/get_vol_implicit_async * Clean up warning * Remove H5Pget_vol_async and replace with more generic H5Pget_vol_cap_flags * Clean up warnings * Add H5ESfree_err_info convenience routine * Fix typo * Correct matching for cached VOL plugins * Add developer header file * Update for C99 compatibility * Add missing trace macro * Stop clang-format from messing with the trace macros. Don't set up VOL wrappers for 'infrastructure' objects like requests and blobs * Fix warning about formatting a directory * Clean up formatting for H5E_BEGIN_TRY / H5E_END_TRY * Reduce scope of H5ES__close * Enable CMake checks for various types on MacOS * Clean up properly when H5CX_retrieve_state() fails. Also clean up many compiler warnings. * Committing clang-format changes * Merge from develop * Fix mis-placed assert * Remove commented-out code * Re-add macro for unsetenv on Windows (I think it accidentally was merged out) * Strengthen sanity check from error report to assertion * Committing clang-format changes * Add units to the comments for a few fields * Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it. * Committing clang-format changes * Remove H5ESget_time_estimate * Committing clang-format changes * Create developer header for datatype routines and move type conversion register/unregister routines there. * Simplify internal H5VL_setup_name_args and H5VL_setup_idx_args routines * Add H5VLlink_optional_op, allowing dynamicly registered optional operations for the link VOL subclass, also added H5VL_loc_params argument to the link 'optional' callback to allow them to work correctly. * Run bin/format_source on current code * Add H5VLobject_optional_op, allowing dynamicly registered optional operations for the object VOL subclass, also added H5VL_loc_params argument to the object 'optional' callback to allow them to work correctly. * Run bin/format_source on current code * Committing clang-format changes * Revert "Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it." This reverts commit 5ac92014da2682bdba62d7a2524b8d90e38f6b19. * Committing clang-format changes * Convert attribute 'get' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. * Update tracing macros * Convert attribute 'specific' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. * Convert dataset 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to attribute 'get' and 'specific' operation parameters. * Convert datatype 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to H5O_refresh_metadata arguments. * Reduce warnings * Reduce warnings * Track change to datatype 'get' callback * Fix bug with file pointer getting invalidated when object closed * Reformat source * Convert file and group VOL classes 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also small cleanup to the attribute get name operation. Also moved 'mount' and 'unmount' operations to be group specific operations, instead of file specific, to better align with their behavior (mounted files are on groups, so a group is what is operated on). * Remove remainder of merge conflict marking * Convert link VOL class 'create' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. * Remove some unused local variables * Convert link VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor 'get name by idx' routines to return actual length of name with a parameter instead of the return value, and move some callback context structs for the link interface from the private header file into the source code module, to reduce their visibility scope. * Update tracing macros * Convert link VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. * Convert object VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. * Convert object VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor H5G_loc_exists, et al, to return 'exists' flag in a parameter and errors with the function return value, instead of overloading both into the return value. And, corrected logic error in test/links.c around non-existant objects in a file. * Convert request VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. * Convert blob VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also removes the H5VL_BLOB_GETSIZE operation, as it's unused in the library and the blob ID size for a container is now returned with H5VL_FILE_GET_CONT_INFO. * Add 'const' to several parameters that are only queried. * Convert all VOL classes' 'optional' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Convert several 'get' routines to return the length of an array in a parameter instead of combining it into the return value. Move several routines to be in less public namespace. Correct direct_chunk test to verify that parameters aren't modified on error. * Switch get/specific/optional VOL callback argument structures to be 'async-friendly'. Also other minor cleanups and bug-fixes. * Add H5Pset_dataset_io_hyperslab_selection / H5S_PLIST feature, to allow skipping H5Dget_space + H5Sselect_hyperslab for async operation * Add dynamic optional operations for request objects * Update dynamic operation test for optional request operations * Update a comment for an operation argument * Run trace and format_source scripts * Committing clang-format changes * Committing clang-format changes Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org> Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com> Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org> Co-authored-by: Dana Robinson <derobins@hdfgroup.org> Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'src/H5CX.c')
-rw-r--r--src/H5CX.c435
1 files changed, 233 insertions, 202 deletions
diff --git a/src/H5CX.c b/src/H5CX.c
index c304548..ca30bdd 100644
--- a/src/H5CX.c
+++ b/src/H5CX.c
@@ -761,13 +761,14 @@ H5CX__get_context(void)
static void
H5CX__push_common(H5CX_node_t *cnode)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
FUNC_ENTER_STATIC_NOERR
/* Sanity check */
HDassert(cnode);
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
+ HDassert(head);
/* Set non-zero context info */
cnode->ctx.dxpl_id = H5P_DATASET_XFER_DEFAULT;
@@ -834,7 +835,7 @@ done:
void
H5CX_push_special(void)
{
- H5CX_node_t *cnode; /* Context node */
+ H5CX_node_t *cnode = NULL; /* Context node */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -868,13 +869,13 @@ H5CX_push_special(void)
herr_t
H5CX_retrieve_state(H5CX_state_t **api_state)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
HDassert(api_state);
@@ -975,6 +976,16 @@ H5CX_retrieve_state(H5CX_state_t **api_state)
#endif /* H5_HAVE_PARALLEL */
done:
+ /* Cleanup on error */
+ if (ret_value < 0) {
+ if (*api_state) {
+ /* Release the (possibly partially allocated) API state struct */
+ if (H5CX_free_state(*api_state) < 0)
+ HDONE_ERROR(H5E_CONTEXT, H5E_CANTRELEASE, FAIL, "unable to release API state")
+ *api_state = NULL;
+ } /* end if */
+ } /* end if */
+
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5CX_retrieve_state() */
@@ -998,12 +1009,12 @@ done:
herr_t
H5CX_restore_state(const H5CX_state_t *api_state)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
HDassert(api_state);
@@ -1066,22 +1077,22 @@ H5CX_free_state(H5CX_state_t *api_state)
HDassert(api_state);
/* Release the DCPL */
- if (api_state->dcpl_id != H5P_DATASET_CREATE_DEFAULT)
+ if (0 != api_state->dcpl_id && H5P_DATASET_CREATE_DEFAULT != api_state->dcpl_id)
if (H5I_dec_ref(api_state->dcpl_id) < 0)
HGOTO_ERROR(H5E_CONTEXT, H5E_CANTDEC, FAIL, "can't decrement refcount on DCPL")
/* Release the DXPL */
- if (api_state->dxpl_id != H5P_DATASET_XFER_DEFAULT)
+ if (0 != api_state->dxpl_id && H5P_DATASET_XFER_DEFAULT != api_state->dxpl_id)
if (H5I_dec_ref(api_state->dxpl_id) < 0)
HGOTO_ERROR(H5E_CONTEXT, H5E_CANTDEC, FAIL, "can't decrement refcount on DXPL")
/* Release the LAPL */
- if (api_state->lapl_id != H5P_LINK_ACCESS_DEFAULT)
+ if (0 != api_state->lapl_id && H5P_LINK_ACCESS_DEFAULT != api_state->lapl_id)
if (H5I_dec_ref(api_state->lapl_id) < 0)
HGOTO_ERROR(H5E_CONTEXT, H5E_CANTDEC, FAIL, "can't decrement refcount on LAPL")
/* Release the LCPL */
- if (api_state->lcpl_id != H5P_LINK_CREATE_DEFAULT)
+ if (0 != api_state->lcpl_id && H5P_LINK_CREATE_DEFAULT != api_state->lcpl_id)
if (H5I_dec_ref(api_state->lcpl_id) < 0)
HGOTO_ERROR(H5E_CONTEXT, H5E_CANTDEC, FAIL, "can't decrement refcount on LCPL")
@@ -1124,15 +1135,19 @@ done:
hbool_t
H5CX_is_def_dxpl(void)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ hbool_t is_def_dxpl = FALSE; /* Flag to indicate DXPL is default */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
- FUNC_LEAVE_NOAPI((*head)->ctx.dxpl_id == H5P_DATASET_XFER_DEFAULT);
+ /* Set return value */
+ is_def_dxpl = ((*head)->ctx.dxpl_id == H5P_DATASET_XFER_DEFAULT);
+
+ FUNC_LEAVE_NOAPI(is_def_dxpl)
} /* end H5CX_is_def_dxpl() */
/*-------------------------------------------------------------------------
@@ -1150,13 +1165,13 @@ H5CX_is_def_dxpl(void)
void
H5CX_set_dxpl(hid_t dxpl_id)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(*head);
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
+ HDassert(head && *head);
/* Set the API context's DXPL to a new value */
(*head)->ctx.dxpl_id = dxpl_id;
@@ -1179,13 +1194,13 @@ H5CX_set_dxpl(hid_t dxpl_id)
void
H5CX_set_dcpl(hid_t dcpl_id)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(*head);
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
+ HDassert(head && *head);
/* Set the API context's DCPL to a new value */
(*head)->ctx.dcpl_id = dcpl_id;
@@ -1209,13 +1224,13 @@ H5CX_set_dcpl(hid_t dcpl_id)
herr_t
H5CX_set_libver_bounds(H5F_t *f)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
/* Set the API context value */
@@ -1245,13 +1260,13 @@ done:
void
H5CX_set_lcpl(hid_t lcpl_id)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(*head);
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
+ HDassert(head && *head);
/* Set the API context's LCPL to a new value */
(*head)->ctx.lcpl_id = lcpl_id;
@@ -1274,12 +1289,12 @@ H5CX_set_lcpl(hid_t lcpl_id)
void
H5CX_set_lapl(hid_t lapl_id)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
/* Set the API context's LAPL to a new value */
@@ -1314,15 +1329,15 @@ H5CX_set_apl(hid_t *acspl_id, const H5P_libclass_t *libclass,
#endif /* H5_HAVE_PARALLEL */
is_collective)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
HDassert(acspl_id);
HDassert(libclass);
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
/* Set access plist to the default property list of the appropriate class if it's the generic default */
@@ -1437,13 +1452,13 @@ H5CX_set_loc(hid_t
loc_id)
{
#ifdef H5_HAVE_PARALLEL
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
/* Set collective metadata read flag */
@@ -1491,13 +1506,13 @@ done:
herr_t
H5CX_set_vol_wrap_ctx(void *vol_wrap_ctx)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
/* Set the API context value */
@@ -1525,13 +1540,13 @@ done:
herr_t
H5CX_set_vol_connector_prop(const H5VL_connector_prop_t *vol_connector_prop)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
/* Set the API context value */
@@ -1559,15 +1574,19 @@ done:
hid_t
H5CX_get_dxpl(void)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ hid_t dxpl_id = H5I_INVALID_HID; /* DXPL ID for API operation */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
- FUNC_LEAVE_NOAPI((*head)->ctx.dxpl_id)
+ /* Set return value */
+ dxpl_id = (*head)->ctx.dxpl_id;
+
+ FUNC_LEAVE_NOAPI(dxpl_id)
} /* end H5CX_get_dxpl() */
/*-------------------------------------------------------------------------
@@ -1585,15 +1604,19 @@ H5CX_get_dxpl(void)
hid_t
H5CX_get_lapl(void)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ hid_t lapl_id = H5I_INVALID_HID; /* LAPL ID for API operation */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
- FUNC_LEAVE_NOAPI((*head)->ctx.lapl_id)
+ /* Set return value */
+ lapl_id = (*head)->ctx.lapl_id;
+
+ FUNC_LEAVE_NOAPI(lapl_id)
} /* end H5CX_get_lapl() */
/*-------------------------------------------------------------------------
@@ -1611,14 +1634,14 @@ H5CX_get_lapl(void)
herr_t
H5CX_get_vol_wrap_ctx(void **vol_wrap_ctx)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(vol_wrap_ctx);
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
/* Check for value that was set */
@@ -1647,14 +1670,14 @@ done:
herr_t
H5CX_get_vol_connector_prop(H5VL_connector_prop_t *vol_connector_prop)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(vol_connector_prop);
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
/* Check for value that was set */
@@ -1683,15 +1706,19 @@ done:
haddr_t
H5CX_get_tag(void)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ haddr_t tag = HADDR_UNDEF; /* Current object's tag (ohdr chunk #0 address) */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
- FUNC_LEAVE_NOAPI((*head)->ctx.tag)
+ /* Set return value */
+ tag = (*head)->ctx.tag;
+
+ FUNC_LEAVE_NOAPI(tag)
} /* end H5CX_get_tag() */
/*-------------------------------------------------------------------------
@@ -1709,15 +1736,19 @@ H5CX_get_tag(void)
H5AC_ring_t
H5CX_get_ring(void)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ H5AC_ring_t ring = H5AC_RING_INV; /* Current metadata cache ring for entries */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
- FUNC_LEAVE_NOAPI((*head)->ctx.ring)
+ /* Set return value */
+ ring = (*head)->ctx.ring;
+
+ FUNC_LEAVE_NOAPI(ring)
} /* end H5CX_get_ring() */
#ifdef H5_HAVE_PARALLEL
@@ -1737,12 +1768,12 @@ H5CX_get_ring(void)
hbool_t
H5CX_get_coll_metadata_read(void)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
FUNC_LEAVE_NOAPI((*head)->ctx.coll_metadata_read)
@@ -1765,15 +1796,15 @@ H5CX_get_coll_metadata_read(void)
herr_t
H5CX_get_mpi_coll_datatypes(MPI_Datatype *btype, MPI_Datatype *ftype)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(btype);
HDassert(ftype);
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
/* Set the API context values */
@@ -1799,12 +1830,12 @@ done:
hbool_t
H5CX_get_mpi_file_flushing(void)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
FUNC_LEAVE_NOAPI((*head)->ctx.mpi_file_flushing)
@@ -1826,12 +1857,12 @@ H5CX_get_mpi_file_flushing(void)
hbool_t
H5CX_get_mpio_rank0_bcast(void)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
FUNC_LEAVE_NOAPI((*head)->ctx.rank0_bcast)
@@ -1853,14 +1884,14 @@ H5CX_get_mpio_rank0_bcast(void)
herr_t
H5CX_get_btree_split_ratios(double split_ratio[3])
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(split_ratio);
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
@@ -1889,14 +1920,14 @@ done:
herr_t
H5CX_get_max_temp_buf(size_t *max_temp_buf)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(max_temp_buf);
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
@@ -1924,14 +1955,14 @@ done:
herr_t
H5CX_get_tconv_buf(void **tconv_buf)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(tconv_buf);
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
@@ -1959,14 +1990,14 @@ done:
herr_t
H5CX_get_bkgr_buf(void **bkgr_buf)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(bkgr_buf);
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
@@ -1994,14 +2025,14 @@ done:
herr_t
H5CX_get_bkgr_buf_type(H5T_bkg_t *bkgr_buf_type)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(bkgr_buf_type);
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
@@ -2029,14 +2060,14 @@ done:
herr_t
H5CX_get_vec_size(size_t *vec_size)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(vec_size);
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
@@ -2066,14 +2097,14 @@ done:
herr_t
H5CX_get_io_xfer_mode(H5FD_mpio_xfer_t *io_xfer_mode)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(io_xfer_mode);
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
@@ -2101,14 +2132,14 @@ done:
herr_t
H5CX_get_mpio_coll_opt(H5FD_mpio_collective_opt_t *mpio_coll_opt)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(mpio_coll_opt);
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
@@ -2136,14 +2167,14 @@ done:
herr_t
H5CX_get_mpio_local_no_coll_cause(uint32_t *mpio_local_no_coll_cause)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(mpio_local_no_coll_cause);
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
@@ -2172,14 +2203,14 @@ done:
herr_t
H5CX_get_mpio_global_no_coll_cause(uint32_t *mpio_global_no_coll_cause)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(mpio_global_no_coll_cause);
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
@@ -2208,14 +2239,14 @@ done:
herr_t
H5CX_get_mpio_chunk_opt_mode(H5FD_mpio_chunk_opt_t *mpio_chunk_opt_mode)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(mpio_chunk_opt_mode);
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
@@ -2244,14 +2275,14 @@ done:
herr_t
H5CX_get_mpio_chunk_opt_num(unsigned *mpio_chunk_opt_num)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(mpio_chunk_opt_num);
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
@@ -2280,14 +2311,14 @@ done:
herr_t
H5CX_get_mpio_chunk_opt_ratio(unsigned *mpio_chunk_opt_ratio)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(mpio_chunk_opt_ratio);
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
@@ -2317,14 +2348,14 @@ done:
herr_t
H5CX_get_err_detect(H5Z_EDC_t *err_detect)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(err_detect);
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
@@ -2352,14 +2383,14 @@ done:
herr_t
H5CX_get_filter_cb(H5Z_cb_t *filter_cb)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(filter_cb);
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
@@ -2387,14 +2418,14 @@ done:
herr_t
H5CX_get_data_transform(H5Z_data_xform_t **data_transform)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(data_transform);
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
@@ -2445,14 +2476,14 @@ done:
herr_t
H5CX_get_vlen_alloc_info(H5T_vlen_alloc_info_t *vl_alloc_info)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(vl_alloc_info);
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
@@ -2510,14 +2541,14 @@ done:
herr_t
H5CX_get_dt_conv_cb(H5T_conv_cb_t *dt_conv_cb)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(dt_conv_cb);
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
@@ -2545,14 +2576,14 @@ done:
herr_t
H5CX_get_encoding(H5T_cset_t *encoding)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(encoding);
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
HDassert(H5P_DEFAULT != (*head)->ctx.lcpl_id);
@@ -2580,14 +2611,14 @@ done:
herr_t
H5CX_get_intermediate_group(unsigned *crt_intermed_group)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(crt_intermed_group);
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
HDassert(H5P_DEFAULT != (*head)->ctx.lcpl_id);
@@ -2616,14 +2647,14 @@ done:
herr_t
H5CX_get_nlinks(size_t *nlinks)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(nlinks);
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
HDassert(H5P_DEFAULT != (*head)->ctx.dxpl_id);
@@ -2651,15 +2682,15 @@ done:
herr_t
H5CX_get_libver_bounds(H5F_libver_t *low_bound, H5F_libver_t *high_bound)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(low_bound);
HDassert(high_bound);
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
HDassert(H5P_DEFAULT != (*head)->ctx.fapl_id);
@@ -2690,14 +2721,14 @@ done:
herr_t
H5CX_get_dset_min_ohdr_flag(hbool_t *dset_min_ohdr_flag)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(dset_min_ohdr_flag);
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
HDassert(H5P_DEFAULT != (*head)->ctx.dcpl_id);
@@ -2726,14 +2757,14 @@ done:
herr_t
H5CX_get_ext_file_prefix(const char **extfile_prefix)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(extfile_prefix);
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
HDassert(H5P_DEFAULT != (*head)->ctx.dapl_id);
@@ -2784,14 +2815,14 @@ done:
herr_t
H5CX_get_vds_prefix(const char **vds_prefix)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(vds_prefix);
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
HDassert(H5P_DEFAULT != (*head)->ctx.dapl_id);
@@ -2842,12 +2873,12 @@ done:
void
H5CX_set_tag(haddr_t tag)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
(*head)->ctx.tag = tag;
@@ -2870,12 +2901,12 @@ H5CX_set_tag(haddr_t tag)
void
H5CX_set_ring(H5AC_ring_t ring)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
(*head)->ctx.ring = ring;
@@ -2900,12 +2931,12 @@ H5CX_set_ring(H5AC_ring_t ring)
void
H5CX_set_coll_metadata_read(hbool_t cmdr)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
(*head)->ctx.coll_metadata_read = cmdr;
@@ -2930,14 +2961,14 @@ H5CX_set_coll_metadata_read(hbool_t cmdr)
herr_t
H5CX_set_mpi_coll_datatypes(MPI_Datatype btype, MPI_Datatype ftype)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
/* Set the API context values */
@@ -2963,13 +2994,13 @@ done:
herr_t
H5CX_set_io_xfer_mode(H5FD_mpio_xfer_t io_xfer_mode)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
/* Set the API context value */
@@ -2997,13 +3028,13 @@ done:
herr_t
H5CX_set_mpio_coll_opt(H5FD_mpio_collective_opt_t mpio_coll_opt)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
/* Set the API context value */
@@ -3031,12 +3062,12 @@ done:
void
H5CX_set_mpi_file_flushing(hbool_t flushing)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
(*head)->ctx.mpi_file_flushing = flushing;
@@ -3060,12 +3091,12 @@ H5CX_set_mpi_file_flushing(hbool_t flushing)
void
H5CX_set_mpio_rank0_bcast(hbool_t rank0_bcast)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
(*head)->ctx.rank0_bcast = rank0_bcast;
@@ -3089,13 +3120,13 @@ H5CX_set_mpio_rank0_bcast(hbool_t rank0_bcast)
herr_t
H5CX_set_vlen_alloc_info(H5MM_allocate_t alloc_func, void *alloc_info, H5MM_free_t free_func, void *free_info)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
/* Set the API context value */
@@ -3126,13 +3157,13 @@ done:
herr_t
H5CX_set_nlinks(size_t nlinks)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
/* Set the API context value */
@@ -3162,12 +3193,12 @@ done:
void
H5CX_set_mpio_actual_chunk_opt(H5D_mpio_actual_chunk_opt_mode_t mpio_actual_chunk_opt)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
HDassert(!((*head)->ctx.dxpl_id == H5P_DEFAULT || (*head)->ctx.dxpl_id == H5P_DATASET_XFER_DEFAULT));
@@ -3193,12 +3224,12 @@ H5CX_set_mpio_actual_chunk_opt(H5D_mpio_actual_chunk_opt_mode_t mpio_actual_chun
void
H5CX_set_mpio_actual_io_mode(H5D_mpio_actual_io_mode_t mpio_actual_io_mode)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
HDassert(!((*head)->ctx.dxpl_id == H5P_DEFAULT || (*head)->ctx.dxpl_id == H5P_DATASET_XFER_DEFAULT));
@@ -3224,12 +3255,12 @@ H5CX_set_mpio_actual_io_mode(H5D_mpio_actual_io_mode_t mpio_actual_io_mode)
void
H5CX_set_mpio_local_no_coll_cause(uint32_t mpio_local_no_coll_cause)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
HDassert((*head)->ctx.dxpl_id != H5P_DEFAULT);
@@ -3258,12 +3289,12 @@ H5CX_set_mpio_local_no_coll_cause(uint32_t mpio_local_no_coll_cause)
void
H5CX_set_mpio_global_no_coll_cause(uint32_t mpio_global_no_coll_cause)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity checks */
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
HDassert((*head)->ctx.dxpl_id != H5P_DEFAULT);
@@ -3296,13 +3327,13 @@ H5CX_set_mpio_global_no_coll_cause(uint32_t mpio_global_no_coll_cause)
herr_t
H5CX_test_set_mpio_coll_chunk_link_hard(int mpio_coll_chunk_link_hard)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Sanity checks */
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
HDassert(!((*head)->ctx.dxpl_id == H5P_DEFAULT || (*head)->ctx.dxpl_id == H5P_DATASET_XFER_DEFAULT));
@@ -3329,13 +3360,13 @@ done:
herr_t
H5CX_test_set_mpio_coll_chunk_multi_hard(int mpio_coll_chunk_multi_hard)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Sanity checks */
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
HDassert(!((*head)->ctx.dxpl_id == H5P_DEFAULT || (*head)->ctx.dxpl_id == H5P_DATASET_XFER_DEFAULT));
@@ -3362,13 +3393,13 @@ done:
herr_t
H5CX_test_set_mpio_coll_chunk_link_num_true(int mpio_coll_chunk_link_num_true)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Sanity checks */
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
HDassert(!((*head)->ctx.dxpl_id == H5P_DEFAULT || (*head)->ctx.dxpl_id == H5P_DATASET_XFER_DEFAULT));
@@ -3396,13 +3427,13 @@ done:
herr_t
H5CX_test_set_mpio_coll_chunk_link_num_false(int mpio_coll_chunk_link_num_false)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Sanity checks */
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
HDassert(!((*head)->ctx.dxpl_id == H5P_DEFAULT || (*head)->ctx.dxpl_id == H5P_DATASET_XFER_DEFAULT));
@@ -3430,13 +3461,13 @@ done:
herr_t
H5CX_test_set_mpio_coll_chunk_multi_ratio_coll(int mpio_coll_chunk_multi_ratio_coll)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Sanity checks */
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
HDassert(!((*head)->ctx.dxpl_id == H5P_DEFAULT || (*head)->ctx.dxpl_id == H5P_DATASET_XFER_DEFAULT));
@@ -3464,13 +3495,13 @@ done:
herr_t
H5CX_test_set_mpio_coll_chunk_multi_ratio_ind(int mpio_coll_chunk_multi_ratio_ind)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Sanity checks */
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
HDassert(!((*head)->ctx.dxpl_id == H5P_DEFAULT || (*head)->ctx.dxpl_id == H5P_DATASET_XFER_DEFAULT));
@@ -3497,13 +3528,13 @@ done:
herr_t
H5CX_test_set_mpio_coll_rank0_bcast(hbool_t mpio_coll_rank0_bcast)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Sanity checks */
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
HDassert(!((*head)->ctx.dxpl_id == H5P_DEFAULT || (*head)->ctx.dxpl_id == H5P_DATASET_XFER_DEFAULT));
@@ -3530,14 +3561,14 @@ done:
herr_t
H5CX_get_ohdr_flags(uint8_t *ohdr_flags)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(ohdr_flags);
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
HDassert(H5P_DEFAULT != (*head)->ctx.dcpl_id);
@@ -3565,9 +3596,8 @@ done:
static H5CX_node_t *
H5CX__pop_common(hbool_t update_dxpl_props)
{
- H5CX_node_t **head =
- H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- H5CX_node_t *ret_value = NULL; /* Return value */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ H5CX_node_t * ret_value = NULL; /* Return value */
#ifdef H5_HAVE_PARALLEL
FUNC_ENTER_STATIC
@@ -3576,6 +3606,7 @@ H5CX__pop_common(hbool_t update_dxpl_props)
#endif
/* Sanity check */
+ head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
HDassert(head && *head);
/* Check for cached DXPL properties to return to application */