summaryrefslogtreecommitdiffstats
path: root/src/H5Dint.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Dint.c')
-rw-r--r--src/H5Dint.c311
1 files changed, 155 insertions, 156 deletions
diff --git a/src/H5Dint.c b/src/H5Dint.c
index 28d5367..62d0f09 100644
--- a/src/H5Dint.c
+++ b/src/H5Dint.c
@@ -20,7 +20,7 @@
#define H5D_PACKAGE /*suppress error about including H5Dpkg */
/* Interface initialization */
-#define H5_INTERFACE_INIT_FUNC H5D_init_interface
+#define H5_INTERFACE_INIT_FUNC H5D__init_interface
/***********/
@@ -57,17 +57,17 @@ typedef struct {
/********************/
/* General stuff */
-static herr_t H5D_init_storage(H5D_t *dataset, hbool_t full_overwrite,
- hsize_t old_dim[], hid_t dxpl_id);
-static herr_t H5D_get_dxpl_cache_real(hid_t dxpl_id, H5D_dxpl_cache_t *cache);
-static H5D_shared_t *H5D_new(hid_t dcpl_id, hbool_t creating,
+static herr_t H5D__get_dxpl_cache_real(hid_t dxpl_id, H5D_dxpl_cache_t *cache);
+static H5D_shared_t *H5D__new(hid_t dcpl_id, hbool_t creating,
hbool_t vl_type);
-static herr_t H5D_init_type(H5F_t *file, const H5D_t *dset, hid_t type_id,
+static herr_t H5D__init_type(H5F_t *file, const H5D_t *dset, hid_t type_id,
const H5T_t *type);
-static herr_t H5D_init_space(H5F_t *file, const H5D_t *dset, const H5S_t *space);
-static herr_t H5D_update_oh_info(H5F_t *file, hid_t dxpl_id, H5D_t *dset,
+static herr_t H5D__init_space(H5F_t *file, const H5D_t *dset, const H5S_t *space);
+static herr_t H5D__update_oh_info(H5F_t *file, hid_t dxpl_id, H5D_t *dset,
hid_t dapl_id);
-static herr_t H5D_open_oid(H5D_t *dataset, hid_t dapl_id, hid_t dxpl_id);
+static herr_t H5D__open_oid(H5D_t *dataset, hid_t dapl_id, hid_t dxpl_id);
+static herr_t H5D__init_storage(H5D_t *dataset, hbool_t full_overwrite,
+ hsize_t old_dim[], hid_t dxpl_id);
/*********************/
@@ -125,7 +125,7 @@ static H5D_shared_t H5D_def_dset;
herr_t
H5D_init(void)
{
- herr_t ret_value=SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* FUNC_ENTER() does all the work */
@@ -137,9 +137,9 @@ done:
/*--------------------------------------------------------------------------
NAME
- H5D_init_interface -- Initialize interface-specific information
+ H5D__init_interface -- Initialize interface-specific information
USAGE
- herr_t H5D_init_interface()
+ herr_t H5D__init_interface()
RETURNS
Non-negative on success/Negative on failure
@@ -151,12 +151,12 @@ NOTES
--------------------------------------------------------------------------*/
static herr_t
-H5D_init_interface(void)
+H5D__init_interface(void)
{
H5P_genplist_t *def_dcpl; /* Default Dataset Creation Property list */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Initialize the atom group for the dataset IDs */
if(H5I_register_type(H5I_DATASET, (size_t)H5I_DATASETID_HASHSIZE, H5D_RESERVED_ATOMS, (H5I_free_t)H5D_close)<H5I_FILE)
@@ -187,12 +187,12 @@ H5D_init_interface(void)
HDmemset(&H5D_def_dxpl_cache, 0, sizeof(H5D_dxpl_cache_t));
/* Get the default DXPL cache information */
- if(H5D_get_dxpl_cache_real(H5P_DATASET_XFER_DEFAULT, &H5D_def_dxpl_cache) < 0)
+ if(H5D__get_dxpl_cache_real(H5P_DATASET_XFER_DEFAULT, &H5D_def_dxpl_cache) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't retrieve default DXPL info")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D_init_interface() */
+} /* end H5D__init_interface() */
/*-------------------------------------------------------------------------
@@ -254,11 +254,11 @@ H5D_term_interface(void)
/*--------------------------------------------------------------------------
NAME
- H5D_get_dxpl_cache_real
+ H5D__get_dxpl_cache_real
PURPOSE
Get all the values for the DXPL cache.
USAGE
- herr_t H5D_get_dxpl_cache_real(dxpl_id, cache)
+ herr_t H5D__get_dxpl_cache_real(dxpl_id, cache)
hid_t dxpl_id; IN: DXPL to query
H5D_dxpl_cache_t *cache;IN/OUT: DXPL cache to fill with values
RETURNS
@@ -272,12 +272,12 @@ H5D_term_interface(void)
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5D_get_dxpl_cache_real(hid_t dxpl_id, H5D_dxpl_cache_t *cache)
+H5D__get_dxpl_cache_real(hid_t dxpl_id, H5D_dxpl_cache_t *cache)
{
H5P_genplist_t *dx_plist; /* Data transfer property list */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Check args */
HDassert(cache);
@@ -332,16 +332,16 @@ H5D_get_dxpl_cache_real(hid_t dxpl_id, H5D_dxpl_cache_t *cache)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5D_get_dxpl_cache_real() */
+} /* end H5D__get_dxpl_cache_real() */
/*--------------------------------------------------------------------------
NAME
- H5D_get_dxpl_cache
+ H5D__get_dxpl_cache
PURPOSE
Get all the values for the DXPL cache.
USAGE
- herr_t H5D_get_dxpl_cache(dxpl_id, cache)
+ herr_t H5D__get_dxpl_cache(dxpl_id, cache)
hid_t dxpl_id; IN: DXPL to query
H5D_dxpl_cache_t *cache;IN/OUT: DXPL cache to fill with values
RETURNS
@@ -358,11 +358,11 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5D_get_dxpl_cache(hid_t dxpl_id, H5D_dxpl_cache_t **cache)
+H5D__get_dxpl_cache(hid_t dxpl_id, H5D_dxpl_cache_t **cache)
{
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_PACKAGE
/* Check args */
assert(cache);
@@ -371,12 +371,12 @@ H5D_get_dxpl_cache(hid_t dxpl_id, H5D_dxpl_cache_t **cache)
if(dxpl_id==H5P_DATASET_XFER_DEFAULT)
*cache=&H5D_def_dxpl_cache;
else
- if(H5D_get_dxpl_cache_real(dxpl_id,*cache) < 0)
+ if(H5D__get_dxpl_cache_real(dxpl_id,*cache) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "Can't retrieve DXPL values")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5D_get_dxpl_cache() */
+} /* H5D__get_dxpl_cache() */
/*-------------------------------------------------------------------------
@@ -439,7 +439,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5D_get_space_status
+ * Function: H5D__get_space_status
*
* Purpose: Returns the status of data space allocation.
*
@@ -453,7 +453,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5D_get_space_status(H5D_t *dset, H5D_space_status_t *allocation, hid_t dxpl_id)
+H5D__get_space_status(H5D_t *dset, H5D_space_status_t *allocation, hid_t dxpl_id)
{
H5S_t *space; /* Dataset's dataspace */
hsize_t space_allocated; /* The number of bytes allocated for chunks */
@@ -463,7 +463,7 @@ H5D_get_space_status(H5D_t *dset, H5D_space_status_t *allocation, hid_t dxpl_id)
hsize_t full_size; /* The number of bytes in the dataset when fully populated */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
HDassert(dset);
@@ -488,7 +488,8 @@ H5D_get_space_status(H5D_t *dset, H5D_space_status_t *allocation, hid_t dxpl_id)
HGOTO_ERROR(H5E_DATASET, H5E_OVERFLOW, FAIL, "size of dataset's storage overflowed")
/* Difficult to error check, since the error value is 0 and 0 is a valid value... :-/ */
- space_allocated = H5D_get_storage_size(dset, dxpl_id);
+ if(H5D__get_storage_size(dset, dxpl_id, &space_allocated) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get size of dataset's storage")
/* Decide on how much of the space is allocated */
if(space_allocated == 0)
@@ -504,11 +505,11 @@ H5D_get_space_status(H5D_t *dset, H5D_space_status_t *allocation, hid_t dxpl_id)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D_get_space_status() */
+} /* end H5D__get_space_status() */
/*-------------------------------------------------------------------------
- * Function: H5D_new
+ * Function: H5D__new
*
* Purpose: Creates a new, empty dataset structure
*
@@ -522,13 +523,13 @@ done:
*-------------------------------------------------------------------------
*/
static H5D_shared_t *
-H5D_new(hid_t dcpl_id, hbool_t creating, hbool_t vl_type)
+H5D__new(hid_t dcpl_id, hbool_t creating, hbool_t vl_type)
{
H5D_shared_t *new_dset = NULL; /* New dataset object */
H5P_genplist_t *plist; /* Property list created */
H5D_shared_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Allocate new shared dataset structure */
if(NULL == (new_dset = H5FL_MALLOC(H5D_shared_t)))
@@ -565,11 +566,11 @@ done:
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D_new() */
+} /* end H5D__new() */
/*-------------------------------------------------------------------------
- * Function: H5D_init_type
+ * Function: H5D__init_type
*
* Purpose: Copy a datatype for a dataset's use, performing all the
* necessary adjustments, etc.
@@ -583,14 +584,14 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D_init_type(H5F_t *file, const H5D_t *dset, hid_t type_id, const H5T_t *type)
+H5D__init_type(H5F_t *file, const H5D_t *dset, hid_t type_id, const H5T_t *type)
{
htri_t relocatable; /* Flag whether the type is relocatable */
htri_t immutable; /* Flag whether the type is immutable */
hbool_t use_latest_format; /* Flag indicating the newest file format should be used */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Sanity checking */
HDassert(file);
@@ -639,11 +640,11 @@ H5D_init_type(H5F_t *file, const H5D_t *dset, hid_t type_id, const H5T_t *type)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D_init_type() */
+} /* end H5D__init_type() */
/*-------------------------------------------------------------------------
- * Function: H5D_init_space
+ * Function: H5D__init_space
*
* Purpose: Copy a dataspace for a dataset's use, performing all the
* necessary adjustments, etc.
@@ -657,12 +658,12 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D_init_space(H5F_t *file, const H5D_t *dset, const H5S_t *space)
+H5D__init_space(H5F_t *file, const H5D_t *dset, const H5S_t *space)
{
hbool_t use_latest_format; /* Flag indicating the newest file format should be used */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Sanity checking */
HDassert(file);
@@ -687,11 +688,11 @@ H5D_init_space(H5F_t *file, const H5D_t *dset, const H5S_t *space)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D_init_space() */
+} /* end H5D__init_space() */
/*-------------------------------------------------------------------------
- * Function: H5D_update_oh_info
+ * Function: H5D__update_oh_info
*
* Purpose: Create and fill object header for dataset
*
@@ -704,7 +705,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D_update_oh_info(H5F_t *file, hid_t dxpl_id, H5D_t *dset, hid_t dapl_id)
+H5D__update_oh_info(H5F_t *file, hid_t dxpl_id, H5D_t *dset, hid_t dapl_id)
{
H5O_t *oh = NULL; /* Pointer to dataset's object header */
size_t ohdr_size = H5D_MINHDR_SIZE; /* Size of dataset's object header */
@@ -718,7 +719,7 @@ H5D_update_oh_info(H5F_t *file, hid_t dxpl_id, H5D_t *dset, hid_t dapl_id)
hbool_t layout_init = FALSE; /* Flag to indicate that chunk information was initialized */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Sanity checking */
HDassert(file);
@@ -826,7 +827,7 @@ H5D_update_oh_info(H5F_t *file, hid_t dxpl_id, H5D_t *dset, hid_t dapl_id)
} /* end if */
/* Update/create the layout (and I/O pipeline & EFL) messages */
- if(H5D_layout_oh_create(file, dxpl_id, oh, dset, dapl_id) < 0)
+ if(H5D__layout_oh_create(file, dxpl_id, oh, dset, dapl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update layout/pline/efl header message")
/* Indicate that the layout information was initialized */
@@ -872,17 +873,17 @@ done:
/* Error cleanup */
if(ret_value < 0) {
if(dset->shared->layout.type == H5D_CHUNKED && layout_init) {
- if(H5D_chunk_dest(file, dxpl_id, dset) < 0)
+ if(H5D__chunk_dest(file, dxpl_id, dset) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTRELEASE, FAIL, "unable to destroy chunk cache")
} /* end if */
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D_update_oh_info() */
+} /* end H5D__update_oh_info() */
/*-------------------------------------------------------------------------
- * Function: H5D_create
+ * Function: H5D__create
*
* Purpose: Creates a new dataset with name NAME in file F and associates
* with it a datatype TYPE for each element as stored in the
@@ -902,7 +903,7 @@ done:
*-------------------------------------------------------------------------
*/
H5D_t *
-H5D_create(H5F_t *file, hid_t type_id, const H5S_t *space, hid_t dcpl_id,
+H5D__create(H5F_t *file, hid_t type_id, const H5S_t *space, hid_t dcpl_id,
hid_t dapl_id, hid_t dxpl_id)
{
const H5T_t *type; /* Datatype for dataset */
@@ -913,7 +914,7 @@ H5D_create(H5F_t *file, hid_t type_id, const H5S_t *space, hid_t dcpl_id,
H5G_loc_t dset_loc; /* Dataset location */
H5D_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(NULL)
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(file);
@@ -948,15 +949,15 @@ H5D_create(H5F_t *file, hid_t type_id, const H5S_t *space, hid_t dcpl_id,
H5G_loc_reset(&dset_loc);
/* Initialize the shared dataset space */
- if(NULL == (new_dset->shared = H5D_new(dcpl_id, TRUE, has_vl_type)))
+ if(NULL == (new_dset->shared = H5D__new(dcpl_id, TRUE, has_vl_type)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Copy & initialize datatype for dataset */
- if(H5D_init_type(file, new_dset, type_id, type) < 0)
+ if(H5D__init_type(file, new_dset, type_id, type) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "can't copy datatype")
/* Copy & initialize dataspace for dataset */
- if(H5D_init_space(file, new_dset, space) < 0)
+ if(H5D__init_space(file, new_dset, space) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "can't copy dataspace")
/* Set the dataset's checked_filters flag to enable writing */
@@ -1026,7 +1027,7 @@ H5D_create(H5F_t *file, hid_t type_id, const H5S_t *space, hid_t dcpl_id,
new_dset->shared->dcpl_cache.fill.alloc_time = H5D_ALLOC_TIME_EARLY;
/* Set the dataset's I/O operations */
- if(H5D_layout_set_io_ops(new_dset) < 0)
+ if(H5D__layout_set_io_ops(new_dset) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "unable to initialize I/O operations")
/* Create the layout information for the new dataset */
@@ -1034,7 +1035,7 @@ H5D_create(H5F_t *file, hid_t type_id, const H5S_t *space, hid_t dcpl_id,
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "unable to construct layout information")
/* Update the dataset's object header info. */
- if(H5D_update_oh_info(file, dxpl_id, new_dset, dapl_id) < 0)
+ if(H5D__update_oh_info(file, dxpl_id, new_dset, dapl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "can't update the metadata cache")
/* Indicate that the layout information was initialized */
@@ -1054,7 +1055,7 @@ done:
if(!ret_value && new_dset && new_dset->shared) {
if(new_dset->shared) {
if(new_dset->shared->layout.type == H5D_CHUNKED && layout_init) {
- if(H5D_chunk_dest(file, dxpl_id, new_dset) < 0)
+ if(H5D__chunk_dest(file, dxpl_id, new_dset) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTRELEASE, NULL, "unable to destroy chunk cache")
} /* end if */
if(new_dset->shared->space && H5S_close(new_dset->shared->space) < 0)
@@ -1080,7 +1081,7 @@ done:
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D_create() */
+} /* end H5D__create() */
/*
@@ -1128,7 +1129,7 @@ H5D_open(const H5G_loc_t *loc, hid_t dapl_id, hid_t dxpl_id)
H5E_clear_stack(NULL);
/* Open the dataset object */
- if(H5D_open_oid(dataset, dapl_id, dxpl_id) < 0)
+ if(H5D__open_oid(dataset, dapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_NOTFOUND, NULL, "not found")
/* Add the dataset to the list of opened objects in the file */
@@ -1184,7 +1185,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5D_open_oid
+ * Function: H5D__open_oid
*
* Purpose: Opens a dataset for access.
*
@@ -1196,7 +1197,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D_open_oid(H5D_t *dataset, hid_t dapl_id, hid_t dxpl_id)
+H5D__open_oid(H5D_t *dataset, hid_t dapl_id, hid_t dxpl_id)
{
H5P_genplist_t *plist; /* Property list */
H5O_fill_t *fill_prop; /* Pointer to dataset's fill value info */
@@ -1204,13 +1205,13 @@ H5D_open_oid(H5D_t *dataset, hid_t dapl_id, hid_t dxpl_id)
htri_t msg_exists; /* Whether a particular type of message exists */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, dataset->oloc.addr, FAIL)
+ FUNC_ENTER_STATIC_TAG(dxpl_id, dataset->oloc.addr, FAIL)
/* check args */
HDassert(dataset);
/* (Set the 'vl_type' parameter to FALSE since it doesn't matter from here) */
- if(NULL == (dataset->shared = H5D_new(H5P_DATASET_CREATE_DEFAULT, FALSE, FALSE)))
+ if(NULL == (dataset->shared = H5D__new(H5P_DATASET_CREATE_DEFAULT, FALSE, FALSE)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Open the dataset object */
@@ -1236,7 +1237,7 @@ H5D_open_oid(H5D_t *dataset, hid_t dapl_id, hid_t dxpl_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get dataset creation property list")
/* Get the layout/pline/efl message information */
- if(H5D_layout_oh_read(dataset, dxpl_id, dapl_id, plist) < 0)
+ if(H5D__layout_oh_read(dataset, dxpl_id, dapl_id, plist) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get layout/pline/efl info")
/* Point at dataset's copy, to cache it for later */
@@ -1305,7 +1306,7 @@ H5D_open_oid(H5D_t *dataset, hid_t dapl_id, hid_t dxpl_id)
if((H5F_INTENT(dataset->oloc.file) & H5F_ACC_RDWR)
&& !(*dataset->shared->layout.ops->is_space_alloc)(&dataset->shared->layout.storage)
&& H5F_HAS_FEATURE(dataset->oloc.file, H5FD_FEAT_ALLOCATE_EARLY)) {
- if(H5D_alloc_storage(dataset, dxpl_id, H5D_ALLOC_OPEN, FALSE, NULL) < 0)
+ if(H5D__alloc_storage(dataset, dxpl_id, H5D_ALLOC_OPEN, FALSE, NULL) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize file storage")
} /* end if */
@@ -1330,7 +1331,7 @@ done:
} /* end if */
FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
-} /* end H5D_open_oid() */
+} /* end H5D__open_oid() */
/*-------------------------------------------------------------------------
@@ -1361,13 +1362,13 @@ H5D_close(H5D_t *dataset)
/* Dump debugging info */
#ifdef H5D_CHUNK_DEBUG
- H5D_chunk_stats(dataset, FALSE);
+ H5D__chunk_stats(dataset, FALSE);
#endif /* H5D_CHUNK_DEBUG */
dataset->shared->fo_count--;
if(dataset->shared->fo_count == 0) {
/* Flush the dataset's information. Continue to close even if it fails. */
- if(H5D_flush_real(dataset, H5AC_dxpl_id) < 0)
+ if(H5D__flush_real(dataset, H5AC_dxpl_id) < 0)
HDONE_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to flush cached dataset info")
/* Free the data sieve buffer, if it's been allocated */
@@ -1404,7 +1405,7 @@ H5D_close(H5D_t *dataset)
/* Flush and destroy chunks in the cache. Continue to close even if
* it fails. */
- if(H5D_chunk_dest(dataset->oloc.file, H5AC_dxpl_id, dataset) < 0)
+ if(H5D__chunk_dest(dataset->oloc.file, H5AC_dxpl_id, dataset) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTRELEASE, FAIL, "unable to destroy chunk cache")
break;
@@ -1557,7 +1558,7 @@ H5D_typeof(const H5D_t *dset)
/*-------------------------------------------------------------------------
- * Function: H5D_alloc_storage
+ * Function: H5D__alloc_storage
*
* Purpose: Allocate storage for the raw data of a dataset.
*
@@ -1569,7 +1570,7 @@ H5D_typeof(const H5D_t *dset)
*-------------------------------------------------------------------------
*/
herr_t
-H5D_alloc_storage(H5D_t *dset/*in,out*/, hid_t dxpl_id, H5D_time_alloc_t time_alloc,
+H5D__alloc_storage(H5D_t *dset/*in,out*/, hid_t dxpl_id, H5D_time_alloc_t time_alloc,
hbool_t full_overwrite, hsize_t old_dim[])
{
H5F_t *f = dset->oloc.file; /* The dataset's file pointer */
@@ -1578,7 +1579,7 @@ H5D_alloc_storage(H5D_t *dset/*in,out*/, hid_t dxpl_id, H5D_time_alloc_t time_al
hbool_t addr_set = FALSE; /* Flag to indicate that the dataset's storage address was set */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/* check args */
HDassert(dset);
@@ -1598,7 +1599,7 @@ H5D_alloc_storage(H5D_t *dset/*in,out*/, hid_t dxpl_id, H5D_time_alloc_t time_al
/* Check if we have a zero-sized dataset */
if(layout->storage.u.contig.size > 0) {
/* Reserve space in the file for the entire array */
- if(H5D_contig_alloc(f, dxpl_id, &layout->storage.u.contig/*out*/) < 0)
+ if(H5D__contig_alloc(f, dxpl_id, &layout->storage.u.contig/*out*/) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to initialize contiguous storage")
/* Indicate that we should initialize storage space */
@@ -1615,7 +1616,7 @@ H5D_alloc_storage(H5D_t *dset/*in,out*/, hid_t dxpl_id, H5D_time_alloc_t time_al
case H5D_CHUNKED:
if(!(*dset->shared->layout.ops->is_space_alloc)(&dset->shared->layout.storage)) {
/* Create the root of the B-tree that describes chunked storage */
- if(H5D_chunk_create(dset /*in,out*/, dxpl_id) < 0)
+ if(H5D__chunk_create(dset /*in,out*/, dxpl_id) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to initialize chunked storage")
/* Indicate that we set the storage addr */
@@ -1679,7 +1680,7 @@ H5D_alloc_storage(H5D_t *dset/*in,out*/, hid_t dxpl_id, H5D_time_alloc_t time_al
* this is icky. -QAK
*/
if(!(dset->shared->dcpl_cache.fill.alloc_time == H5D_ALLOC_TIME_INCR && time_alloc == H5D_ALLOC_WRITE))
- if(H5D_init_storage(dset, full_overwrite, old_dim, dxpl_id) < 0)
+ if(H5D__init_storage(dset, full_overwrite, old_dim, dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize dataset with fill value")
} /* end if */
else {
@@ -1693,7 +1694,7 @@ H5D_alloc_storage(H5D_t *dset/*in,out*/, hid_t dxpl_id, H5D_time_alloc_t time_al
* the fill value _is_ set, do that now */
if(dset->shared->dcpl_cache.fill.fill_time == H5D_FILL_TIME_ALLOC ||
(dset->shared->dcpl_cache.fill.fill_time == H5D_FILL_TIME_IFSET && fill_status == H5D_FILL_VALUE_USER_DEFINED)) {
- if(H5D_init_storage(dset, full_overwrite, old_dim, dxpl_id) < 0)
+ if(H5D__init_storage(dset, full_overwrite, old_dim, dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize dataset with fill value")
} /* end if */
} /* end else */
@@ -1708,17 +1709,17 @@ H5D_alloc_storage(H5D_t *dset/*in,out*/, hid_t dxpl_id, H5D_time_alloc_t time_al
*/
if(time_alloc != H5D_ALLOC_CREATE && addr_set)
/* Mark the layout as dirty, for later writing to the file */
- if(H5D_mark(dset, dxpl_id, H5D_MARK_LAYOUT) < 0)
+ if(H5D__mark(dset, dxpl_id, H5D_MARK_LAYOUT) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to mark dataspace as dirty")
} /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D_alloc_storage() */
+} /* end H5D__alloc_storage() */
/*-------------------------------------------------------------------------
- * Function: H5D_init_storage
+ * Function: H5D__init_storage
*
* Purpose: Initialize the data for a new dataset. If a selection is
* defined for SPACE then initialize only that part of the
@@ -1732,12 +1733,12 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D_init_storage(H5D_t *dset, hbool_t full_overwrite, hsize_t old_dim[],
+H5D__init_storage(H5D_t *dset, hbool_t full_overwrite, hsize_t old_dim[],
hid_t dxpl_id)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(dset);
@@ -1746,7 +1747,7 @@ H5D_init_storage(H5D_t *dset, hbool_t full_overwrite, hsize_t old_dim[],
/* If we will be immediately overwriting the values, don't bother to clear them */
if(!full_overwrite) {
/* Fill the compact dataset storage */
- if(H5D_compact_fill(dset, dxpl_id) < 0)
+ if(H5D__compact_fill(dset, dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize compact dataset storage")
} /* end if */
break;
@@ -1755,7 +1756,7 @@ H5D_init_storage(H5D_t *dset, hbool_t full_overwrite, hsize_t old_dim[],
/* Don't write default fill values to external files */
/* If we will be immediately overwriting the values, don't bother to clear them */
if((dset->shared->dcpl_cache.efl.nused == 0 || dset->shared->dcpl_cache.fill.buf) && !full_overwrite)
- if(H5D_contig_fill(dset, dxpl_id) < 0)
+ if(H5D__contig_fill(dset, dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to allocate all chunks of dataset")
break;
@@ -1771,7 +1772,7 @@ H5D_init_storage(H5D_t *dset, hbool_t full_overwrite, hsize_t old_dim[],
if(old_dim == NULL)
old_dim = zero_dim;
- if(H5D_chunk_allocate(dset, dxpl_id, full_overwrite, old_dim) < 0)
+ if(H5D__chunk_allocate(dset, dxpl_id, full_overwrite, old_dim) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to allocate all chunks of dataset")
break;
} /* end block */
@@ -1787,68 +1788,66 @@ H5D_init_storage(H5D_t *dset, hbool_t full_overwrite, hsize_t old_dim[],
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D_init_storage() */
+} /* end H5D__init_storage() */
/*-------------------------------------------------------------------------
- * Function: H5D_get_storage_size
+ * Function: H5D__get_storage_size
*
* Purpose: Determines how much space has been reserved to store the raw
* data of a dataset.
*
- * Return: Success: Number of bytes reserved to hold raw data.
- *
- * Failure: 0
+ * Return: Non-negative on success, negative on failure
*
* Programmer: Robb Matzke
* Wednesday, April 21, 1999
*
*-------------------------------------------------------------------------
*/
-hsize_t
-H5D_get_storage_size(H5D_t *dset, hid_t dxpl_id)
+herr_t
+H5D__get_storage_size(H5D_t *dset, hid_t dxpl_id, hsize_t *storage_size)
{
- hsize_t ret_value;
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, dset->oloc.addr, 0)
+ FUNC_ENTER_PACKAGE_TAG(dxpl_id, dset->oloc.addr, FAIL)
switch(dset->shared->layout.type) {
case H5D_CHUNKED:
if((*dset->shared->layout.ops->is_space_alloc)(&dset->shared->layout.storage)) {
- if(H5D_chunk_allocated(dset, dxpl_id, &ret_value) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, 0, "can't retrieve chunked dataset allocated size")
+ if(H5D__chunk_allocated(dset, dxpl_id, storage_size) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't retrieve chunked dataset allocated size")
} /* end if */
else
- ret_value = 0;
+ *storage_size = 0;
break;
case H5D_CONTIGUOUS:
/* Datasets which are not allocated yet are using no space on disk */
if((*dset->shared->layout.ops->is_space_alloc)(&dset->shared->layout.storage))
- ret_value = dset->shared->layout.storage.u.contig.size;
+ *storage_size = dset->shared->layout.storage.u.contig.size;
else
- ret_value = 0;
+ *storage_size = 0;
break;
case H5D_COMPACT:
- ret_value = dset->shared->layout.storage.u.compact.size;
+ *storage_size = dset->shared->layout.storage.u.compact.size;
break;
case H5D_LAYOUT_ERROR:
case H5D_NLAYOUTS:
default:
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not a dataset type")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset type")
} /*lint !e788 All appropriate cases are covered */
done:
FUNC_LEAVE_NOAPI_TAG(ret_value, 0)
-} /* end H5D_get_storage_size() */
+} /* end H5D__get_storage_size() */
/*-------------------------------------------------------------------------
- * Function: H5D_get_offset
+ * Function: H5D__get_offset
*
- * Purpose: Private function for H5D_get_offset. Returns the address
+ * Purpose: Private function for H5D__get_offset. Returns the address
* of dataset in file.
*
* Return: Success: the address of dataset
@@ -1861,11 +1860,11 @@ done:
*-------------------------------------------------------------------------
*/
haddr_t
-H5D_get_offset(const H5D_t *dset)
+H5D__get_offset(const H5D_t *dset)
{
haddr_t ret_value = HADDR_UNDEF;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
HDassert(dset);
@@ -1890,11 +1889,11 @@ H5D_get_offset(const H5D_t *dset)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D_get_offset() */
+} /* end H5D__get_offset() */
/*-------------------------------------------------------------------------
- * Function: H5D_iterate
+ * Function: H5D__iterate
*
* Purpose: Internal version of H5Diterate()
*
@@ -1908,12 +1907,12 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5D_iterate(void *buf, hid_t type_id, const H5S_t *space, H5D_operator_t op,
+H5D__iterate(void *buf, hid_t type_id, const H5S_t *space, H5D_operator_t op,
void *operator_data)
{
herr_t ret_value;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(buf);
@@ -1925,7 +1924,7 @@ H5D_iterate(void *buf, hid_t type_id, const H5S_t *space, H5D_operator_t op,
ret_value = H5S_select_iterate(buf, type_id, space, op, operator_data);
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D_iterate() */
+} /* end H5D__iterate() */
/*-------------------------------------------------------------------------
@@ -1962,8 +1961,8 @@ H5D_vlen_reclaim(hid_t type_id, H5S_t *space, hid_t plist_id, void *buf)
if(H5T_vlen_get_alloc_info(plist_id,&vl_alloc_info) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to retrieve VL allocation info")
- /* Call H5D_iterate with args, etc. */
- ret_value = H5D_iterate(buf, type_id, space ,H5T_vlen_reclaim, vl_alloc_info);
+ /* Call H5D__iterate with args, etc. */
+ ret_value = H5D__iterate(buf, type_id, space ,H5T_vlen_reclaim, vl_alloc_info);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1971,7 +1970,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5D_vlen_get_buf_size_alloc
+ * Function: H5D__vlen_get_buf_size_alloc
*
* Purpose: This routine makes certain there is enough space in the temporary
* buffer for the new data to read in. All the VL data read in is actually
@@ -1986,12 +1985,12 @@ done:
*-------------------------------------------------------------------------
*/
void *
-H5D_vlen_get_buf_size_alloc(size_t size, void *info)
+H5D__vlen_get_buf_size_alloc(size_t size, void *info)
{
H5D_vlen_bufsize_t *vlen_bufsize = (H5D_vlen_bufsize_t *)info;
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Get a temporary pointer to space for the VL data */
if((vlen_bufsize->vl_tbuf = H5FL_BLK_REALLOC(vlen_vl_buf, vlen_bufsize->vl_tbuf, size)) != NULL)
@@ -2001,11 +2000,11 @@ H5D_vlen_get_buf_size_alloc(size_t size, void *info)
ret_value = vlen_bufsize->vl_tbuf;
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D_vlen_get_buf_size_alloc() */
+} /* end H5D__vlen_get_buf_size_alloc() */
/*-------------------------------------------------------------------------
- * Function: H5D_vlen_get_buf_size
+ * Function: H5D__vlen_get_buf_size
*
* Purpose: This routine checks the number of bytes required to store a single
* element from a dataset in memory, creating a selection with just the
@@ -2031,13 +2030,13 @@ H5D_vlen_get_buf_size_alloc(size_t size, void *info)
*/
/* ARGSUSED */
herr_t
-H5D_vlen_get_buf_size(void UNUSED *elem, hid_t type_id, unsigned UNUSED ndim, const hsize_t *point, void *op_data)
+H5D__vlen_get_buf_size(void UNUSED *elem, hid_t type_id, unsigned UNUSED ndim, const hsize_t *point, void *op_data)
{
H5D_vlen_bufsize_t *vlen_bufsize = (H5D_vlen_bufsize_t *)op_data;
H5T_t *dt; /* Datatype for operation */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
HDassert(op_data);
HDassert(H5I_DATATYPE == H5I_get_type(type_id));
@@ -2060,11 +2059,11 @@ H5D_vlen_get_buf_size(void UNUSED *elem, hid_t type_id, unsigned UNUSED ndim, co
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D_vlen_get_buf_size() */
+} /* end H5D__vlen_get_buf_size() */
/*-------------------------------------------------------------------------
- * Function: H5D_check_filters
+ * Function: H5D__check_filters
*
* Purpose: Check if the filters have be initialized for the dataset
*
@@ -2076,12 +2075,12 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5D_check_filters(H5D_t *dataset)
+H5D__check_filters(H5D_t *dataset)
{
H5O_fill_t *fill; /* Dataset's fill value */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(dataset);
@@ -2114,14 +2113,14 @@ H5D_check_filters(H5D_t *dataset)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D_check_filters() */
+} /* end H5D__check_filters() */
/*-------------------------------------------------------------------------
- * Function: H5D_set_extent
+ * Function: H5D__set_extent
*
* Purpose: Based on H5D_extend, allows change to a lower dimension,
- * calls H5S_set_extent and H5D_chunk_prune_by_extent instead
+ * calls H5S_set_extent and H5D__chunk_prune_by_extent instead
*
* Return: Non-negative on success, negative on failure
*
@@ -2131,7 +2130,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5D_set_extent(H5D_t *dset, const hsize_t *size, hid_t dxpl_id)
+H5D__set_extent(H5D_t *dset, const hsize_t *size, hid_t dxpl_id)
{
H5S_t *space; /* Dataset's dataspace */
int rank; /* Dataspace # of dimensions */
@@ -2139,7 +2138,7 @@ H5D_set_extent(H5D_t *dset, const hsize_t *size, hid_t dxpl_id)
htri_t changed; /* Whether the dataspace changed size */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, dset->oloc.addr, FAIL)
+ FUNC_ENTER_PACKAGE_TAG(dxpl_id, dset->oloc.addr, FAIL)
/* Check args */
HDassert(dset);
@@ -2156,7 +2155,7 @@ H5D_set_extent(H5D_t *dset, const hsize_t *size, hid_t dxpl_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "dataset has contiguous storage")
/* Check if the filters in the DCPL will need to encode, and if so, can they? */
- if(H5D_check_filters(dset) < 0)
+ if(H5D__check_filters(dset) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't apply filters")
/* Get the data space */
@@ -2190,15 +2189,15 @@ H5D_set_extent(H5D_t *dset, const hsize_t *size, hid_t dxpl_id)
*/
/* Update the index values for the cached chunks for this dataset */
if(H5D_CHUNKED == dset->shared->layout.type) {
- if(H5D_chunk_set_info(dset) < 0)
+ if(H5D__chunk_set_info(dset) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to update # of chunks")
- if(H5D_chunk_update_cache(dset, dxpl_id) < 0)
+ if(H5D__chunk_update_cache(dset, dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to update cached chunk indices")
} /* end if */
/* Allocate space for the new parts of the dataset, if appropriate */
if(expand && dset->shared->dcpl_cache.fill.alloc_time == H5D_ALLOC_TIME_EARLY)
- if(H5D_alloc_storage(dset, dxpl_id, H5D_ALLOC_EXTEND, FALSE, curr_dims) < 0)
+ if(H5D__alloc_storage(dset, dxpl_id, H5D_ALLOC_EXTEND, FALSE, curr_dims) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to extend dataset storage")
/*-------------------------------------------------------------------------
@@ -2210,22 +2209,22 @@ H5D_set_extent(H5D_t *dset, const hsize_t *size, hid_t dxpl_id)
if(shrink && H5D_CHUNKED == dset->shared->layout.type &&
(*dset->shared->layout.ops->is_space_alloc)(&dset->shared->layout.storage)) {
/* Remove excess chunks */
- if(H5D_chunk_prune_by_extent(dset, dxpl_id, curr_dims) < 0)
+ if(H5D__chunk_prune_by_extent(dset, dxpl_id, curr_dims) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to remove chunks")
} /* end if */
/* Mark the dataspace as dirty, for later writing to the file */
- if(H5D_mark(dset, dxpl_id, H5D_MARK_SPACE) < 0)
+ if(H5D__mark(dset, dxpl_id, H5D_MARK_SPACE) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to mark dataspace as dirty")
} /* end if */
done:
FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
-} /* end H5D_set_extent() */
+} /* end H5D__set_extent() */
/*-------------------------------------------------------------------------
- * Function: H5D_flush_sieve_buf
+ * Function: H5D__flush_sieve_buf
*
* Purpose: Flush any dataset sieve buffer info cached in memory
*
@@ -2238,11 +2237,11 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5D_flush_sieve_buf(H5D_t *dataset, hid_t dxpl_id)
+H5D__flush_sieve_buf(H5D_t *dataset, hid_t dxpl_id)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(dataset);
@@ -2262,11 +2261,11 @@ H5D_flush_sieve_buf(H5D_t *dataset, hid_t dxpl_id)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D_flush_sieve_buf() */
+} /* end H5D__flush_sieve_buf() */
/*-------------------------------------------------------------------------
- * Function: H5D_flush_real
+ * Function: H5D__flush_real
*
* Purpose: Flush any dataset information cached in memory
*
@@ -2279,12 +2278,12 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5D_flush_real(H5D_t *dataset, hid_t dxpl_id)
+H5D__flush_real(H5D_t *dataset, hid_t dxpl_id)
{
H5O_t *oh = NULL; /* Pointer to dataset's object header */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, dataset->oloc.addr, FAIL)
+ FUNC_ENTER_PACKAGE_TAG(dxpl_id, dataset->oloc.addr, FAIL)
/* Check args */
HDassert(dataset);
@@ -2299,7 +2298,7 @@ H5D_flush_real(H5D_t *dataset, hid_t dxpl_id)
/* Update the layout on disk, if it's been changed */
if(dataset->shared->layout_dirty) {
- if(H5D_layout_oh_write(dataset, dxpl_id, oh, update_flags) < 0)
+ if(H5D__layout_oh_write(dataset, dxpl_id, oh, update_flags) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to update layout/pline/efl info")
dataset->shared->layout_dirty = FALSE;
@@ -2333,11 +2332,11 @@ done:
HDONE_ERROR(H5E_DATASET, H5E_CANTUNPIN, FAIL, "unable to unpin dataset object header")
FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
-} /* end H5D_flush_real() */
+} /* end H5D__flush_real() */
/*-------------------------------------------------------------------------
- * Function: H5D_mark
+ * Function: H5D__mark
*
* Purpose: Mark some aspect of a dataset as dirty
*
@@ -2350,11 +2349,11 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5D_mark(H5D_t *dataset, hid_t dxpl_id, unsigned flags)
+H5D__mark(H5D_t *dataset, hid_t dxpl_id, unsigned flags)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Check args */
HDassert(dataset);
@@ -2367,11 +2366,11 @@ H5D_mark(H5D_t *dataset, hid_t dxpl_id, unsigned flags)
dataset->shared->layout_dirty = TRUE;
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D_mark() */
+} /* end H5D__mark() */
/*-------------------------------------------------------------------------
- * Function: H5D_flush_cb
+ * Function: H5D__flush_cb
*
* Purpose: Flush any dataset information cached in memory
*
@@ -2384,13 +2383,13 @@ H5D_mark(H5D_t *dataset, hid_t dxpl_id, unsigned flags)
*-------------------------------------------------------------------------
*/
static int
-H5D_flush_cb(void *_dataset, hid_t UNUSED id, void *_udata)
+H5D__flush_cb(void *_dataset, hid_t UNUSED id, void *_udata)
{
H5D_t *dataset = (H5D_t *)_dataset; /* Dataset pointer */
H5D_flush_ud_t *udata = (H5D_flush_ud_t *)_udata; /* User data for callback */
int ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Check args */
HDassert(dataset);
@@ -2398,13 +2397,13 @@ H5D_flush_cb(void *_dataset, hid_t UNUSED id, void *_udata)
/* Check for dataset in same file */
if(udata->f == dataset->oloc.file) {
/* Flush the dataset's information */
- if(H5D_flush_real(dataset, udata->dxpl_id) < 0)
+ if(H5D__flush_real(dataset, udata->dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, H5_ITER_ERROR, "unable to flush cached dataset info")
} /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D_flush_cb() */
+} /* end H5D__flush_cb() */
/*-------------------------------------------------------------------------
@@ -2436,7 +2435,7 @@ H5D_flush(const H5F_t *f, hid_t dxpl_id)
udata.dxpl_id = dxpl_id;
/* Iterate over all the open datasets */
- if(H5I_iterate(H5I_DATASET, H5D_flush_cb, &udata, FALSE) < 0)
+ if(H5I_iterate(H5I_DATASET, H5D__flush_cb, &udata, FALSE) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_BADITER, FAIL, "unable to flush cached dataset info")
done: