summaryrefslogtreecommitdiffstats
path: root/src/H5Dint.c
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2012-04-18 21:32:55 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2012-04-18 21:32:55 (GMT)
commitb7a6535650cd0317e3aee1bb62a96664b38e5304 (patch)
treea88c6b8668f76983b9b0acf4cf0a57845c78d110 /src/H5Dint.c
parent33f70a817aba7a4dd020fb29a187c53ba05e157c (diff)
parenta07c8f924703bdf3d1654b59cabf847f5d0f2683 (diff)
downloadhdf5-b7a6535650cd0317e3aee1bb62a96664b38e5304.zip
hdf5-b7a6535650cd0317e3aee1bb62a96664b38e5304.tar.gz
hdf5-b7a6535650cd0317e3aee1bb62a96664b38e5304.tar.bz2
[svn-r22297] merge from trunk
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 e17c0f7..a70ce2b 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);
/*********************/
@@ -128,7 +128,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 */
@@ -140,9 +140,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
@@ -154,12 +154,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)
@@ -190,12 +190,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() */
/*-------------------------------------------------------------------------
@@ -257,11 +257,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
@@ -275,12 +275,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);
@@ -335,16 +335,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
@@ -361,11 +361,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);
@@ -374,12 +374,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() */
/*-------------------------------------------------------------------------
@@ -442,7 +442,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5D_get_space_status
+ * Function: H5D__get_space_status
*
* Purpose: Returns the status of data space allocation.
*
@@ -456,7 +456,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 */
@@ -466,7 +466,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);
@@ -491,7 +491,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)
@@ -507,11 +508,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
*
@@ -525,13 +526,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)))
@@ -568,11 +569,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.
@@ -586,14 +587,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);
@@ -642,11 +643,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.
@@ -660,12 +661,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);
@@ -690,11 +691,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
*
@@ -707,7 +708,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 */
@@ -721,7 +722,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);
@@ -829,7 +830,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 */
@@ -875,17 +876,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
@@ -905,7 +906,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 */
@@ -916,7 +917,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);
@@ -951,15 +952,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 */
@@ -1029,7 +1030,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 */
@@ -1037,7 +1038,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 */
@@ -1057,7 +1058,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)
@@ -1083,7 +1084,7 @@ done:
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D_create() */
+} /* end H5D__create() */
/*
@@ -1131,7 +1132,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 */
@@ -1187,7 +1188,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5D_open_oid
+ * Function: H5D__open_oid
*
* Purpose: Opens a dataset for access.
*
@@ -1199,7 +1200,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 */
@@ -1207,13 +1208,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 */
@@ -1239,7 +1240,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 */
@@ -1308,7 +1309,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 */
@@ -1333,7 +1334,7 @@ done:
} /* end if */
FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
-} /* end H5D_open_oid() */
+} /* end H5D__open_oid() */
/*-------------------------------------------------------------------------
@@ -1364,13 +1365,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 */
@@ -1407,7 +1408,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;
@@ -1560,7 +1561,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.
*
@@ -1572,7 +1573,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 */
@@ -1581,7 +1582,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);
@@ -1601,7 +1602,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 */
@@ -1618,7 +1619,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 */
@@ -1682,7 +1683,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 {
@@ -1696,7 +1697,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 */
@@ -1711,17 +1712,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
@@ -1735,12 +1736,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);
@@ -1749,7 +1750,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;
@@ -1758,7 +1759,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;
@@ -1774,7 +1775,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 */
@@ -1790,68 +1791,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
@@ -1864,11 +1863,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);
@@ -1893,11 +1892,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()
*
@@ -1911,12 +1910,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);
@@ -1928,7 +1927,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() */
/*-------------------------------------------------------------------------
@@ -1965,8 +1964,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)
@@ -1974,7 +1973,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
@@ -1989,12 +1988,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)
@@ -2004,11 +2003,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
@@ -2034,13 +2033,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) || H5I_DATATYPE_PUBLIC == H5I_get_type(type_id));
@@ -2063,11 +2062,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
*
@@ -2079,12 +2078,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);
@@ -2117,14 +2116,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
*
@@ -2134,7 +2133,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 */
@@ -2142,7 +2141,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);
@@ -2159,7 +2158,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 */
@@ -2193,15 +2192,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")
/*-------------------------------------------------------------------------
@@ -2213,22 +2212,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
*
@@ -2241,11 +2240,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);
@@ -2265,11 +2264,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
*
@@ -2282,12 +2281,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);
@@ -2302,7 +2301,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;
@@ -2336,11 +2335,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
*
@@ -2353,11 +2352,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);
@@ -2370,11 +2369,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
*
@@ -2387,13 +2386,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);
@@ -2401,13 +2400,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() */
/*-------------------------------------------------------------------------
@@ -2439,7 +2438,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: