summaryrefslogtreecommitdiffstats
path: root/src/H5CX.c
diff options
context:
space:
mode:
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 */