summaryrefslogtreecommitdiffstats
path: root/src/H5Dbtree.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2012-04-16 21:20:26 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2012-04-16 21:20:26 (GMT)
commita07c8f924703bdf3d1654b59cabf847f5d0f2683 (patch)
tree976dad3d894cfab9b88972a9e85d6bdfcf248f0d /src/H5Dbtree.c
parentbdb6e538ac8c4eae6413b2a7583289644dc9c90f (diff)
downloadhdf5-a07c8f924703bdf3d1654b59cabf847f5d0f2683.zip
hdf5-a07c8f924703bdf3d1654b59cabf847f5d0f2683.tar.gz
hdf5-a07c8f924703bdf3d1654b59cabf847f5d0f2683.tar.bz2
[svn-r22287] Description:
Clean up more FUNC_ENTER/FUNC_LEAVE macros and move H5D & H5T code toward the final design (as exemplified by the H5EA & H5FA code). Tested on: Mac OSX/64 10.7.3 (amazon) w/debug & parallel
Diffstat (limited to 'src/H5Dbtree.c')
-rw-r--r--src/H5Dbtree.c326
1 files changed, 163 insertions, 163 deletions
diff --git a/src/H5Dbtree.c b/src/H5Dbtree.c
index b5cfcce..50af977 100644
--- a/src/H5Dbtree.c
+++ b/src/H5Dbtree.c
@@ -97,58 +97,58 @@ typedef struct H5D_btree_dbg_t {
/* Local Prototypes */
/********************/
-static herr_t H5D_btree_shared_create(const H5F_t *f, H5O_storage_chunk_t *store,
+static herr_t H5D__btree_shared_create(const H5F_t *f, H5O_storage_chunk_t *store,
unsigned ndims);
/* B-tree iterator callbacks */
-static int H5D_btree_idx_iterate_cb(H5F_t *f, hid_t dxpl_id, const void *left_key,
+static int H5D__btree_idx_iterate_cb(H5F_t *f, hid_t dxpl_id, const void *left_key,
haddr_t addr, const void *right_key, void *_udata);
/* B-tree callbacks */
-static H5RC_t *H5D_btree_get_shared(const H5F_t *f, const void *_udata);
-static herr_t H5D_btree_new_node(H5F_t *f, hid_t dxpl_id, H5B_ins_t, void *_lt_key,
+static H5RC_t *H5D__btree_get_shared(const H5F_t *f, const void *_udata);
+static herr_t H5D__btree_new_node(H5F_t *f, hid_t dxpl_id, H5B_ins_t, void *_lt_key,
void *_udata, void *_rt_key, haddr_t *addr_p /*out*/);
-static int H5D_btree_cmp2(void *_lt_key, void *_udata, void *_rt_key);
-static int H5D_btree_cmp3(void *_lt_key, void *_udata, void *_rt_key);
-static htri_t H5D_btree_found(H5F_t *f, hid_t dxpl_id, haddr_t addr,
+static int H5D__btree_cmp2(void *_lt_key, void *_udata, void *_rt_key);
+static int H5D__btree_cmp3(void *_lt_key, void *_udata, void *_rt_key);
+static htri_t H5D__btree_found(H5F_t *f, hid_t dxpl_id, haddr_t addr,
const void *_lt_key, void *_udata);
-static H5B_ins_t H5D_btree_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr,
+static H5B_ins_t H5D__btree_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr,
void *_lt_key, hbool_t *lt_key_changed, void *_md_key, void *_udata,
void *_rt_key, hbool_t *rt_key_changed, haddr_t *new_node/*out*/);
-static H5B_ins_t H5D_btree_remove( H5F_t *f, hid_t dxpl_id, haddr_t addr,
+static H5B_ins_t H5D__btree_remove( H5F_t *f, hid_t dxpl_id, haddr_t addr,
void *_lt_key, hbool_t *lt_key_changed, void *_udata, void *_rt_key,
hbool_t *rt_key_changed);
-static herr_t H5D_btree_decode_key(const H5B_shared_t *shared, const uint8_t *raw,
+static herr_t H5D__btree_decode_key(const H5B_shared_t *shared, const uint8_t *raw,
void *_key);
-static herr_t H5D_btree_encode_key(const H5B_shared_t *shared, uint8_t *raw,
+static herr_t H5D__btree_encode_key(const H5B_shared_t *shared, uint8_t *raw,
const void *_key);
-static herr_t H5D_btree_debug_key(FILE *stream, int indent, int fwidth,
+static herr_t H5D__btree_debug_key(FILE *stream, int indent, int fwidth,
const void *key, const void *udata);
/* Chunked layout indexing callbacks */
-static herr_t H5D_btree_idx_init(const H5D_chk_idx_info_t *idx_info,
+static herr_t H5D__btree_idx_init(const H5D_chk_idx_info_t *idx_info,
const H5S_t *space, haddr_t dset_ohdr_addr);
-static herr_t H5D_btree_idx_create(const H5D_chk_idx_info_t *idx_info);
-static hbool_t H5D_btree_idx_is_space_alloc(const H5O_storage_chunk_t *storage);
-static herr_t H5D_btree_idx_insert(const H5D_chk_idx_info_t *idx_info,
+static herr_t H5D__btree_idx_create(const H5D_chk_idx_info_t *idx_info);
+static hbool_t H5D__btree_idx_is_space_alloc(const H5O_storage_chunk_t *storage);
+static herr_t H5D__btree_idx_insert(const H5D_chk_idx_info_t *idx_info,
H5D_chunk_ud_t *udata);
-static herr_t H5D_btree_idx_get_addr(const H5D_chk_idx_info_t *idx_info,
+static herr_t H5D__btree_idx_get_addr(const H5D_chk_idx_info_t *idx_info,
H5D_chunk_ud_t *udata);
-static int H5D_btree_idx_iterate(const H5D_chk_idx_info_t *idx_info,
+static int H5D__btree_idx_iterate(const H5D_chk_idx_info_t *idx_info,
H5D_chunk_cb_func_t chunk_cb, void *chunk_udata);
-static herr_t H5D_btree_idx_remove(const H5D_chk_idx_info_t *idx_info,
+static herr_t H5D__btree_idx_remove(const H5D_chk_idx_info_t *idx_info,
H5D_chunk_common_ud_t *udata);
-static herr_t H5D_btree_idx_delete(const H5D_chk_idx_info_t *idx_info);
-static herr_t H5D_btree_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src,
+static herr_t H5D__btree_idx_delete(const H5D_chk_idx_info_t *idx_info);
+static herr_t H5D__btree_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src,
const H5D_chk_idx_info_t *idx_info_dst);
-static herr_t H5D_btree_idx_copy_shutdown(H5O_storage_chunk_t *storage_src,
+static herr_t H5D__btree_idx_copy_shutdown(H5O_storage_chunk_t *storage_src,
H5O_storage_chunk_t *storage_dst, hid_t dxpl_id);
-static herr_t H5D_btree_idx_size(const H5D_chk_idx_info_t *idx_info,
+static herr_t H5D__btree_idx_size(const H5D_chk_idx_info_t *idx_info,
hsize_t *size);
-static herr_t H5D_btree_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr);
-static herr_t H5D_btree_idx_dump(const H5O_storage_chunk_t *storage,
+static herr_t H5D__btree_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr);
+static herr_t H5D__btree_idx_dump(const H5O_storage_chunk_t *storage,
FILE *stream);
-static herr_t H5D_btree_idx_dest(const H5D_chk_idx_info_t *idx_info);
+static herr_t H5D__btree_idx_dest(const H5D_chk_idx_info_t *idx_info);
/*********************/
@@ -157,21 +157,21 @@ static herr_t H5D_btree_idx_dest(const H5D_chk_idx_info_t *idx_info);
/* v1 B-tree indexed chunk I/O ops */
const H5D_chunk_ops_t H5D_COPS_BTREE[1] = {{
- H5D_btree_idx_init,
- H5D_btree_idx_create,
- H5D_btree_idx_is_space_alloc,
- H5D_btree_idx_insert,
- H5D_btree_idx_get_addr,
+ H5D__btree_idx_init,
+ H5D__btree_idx_create,
+ H5D__btree_idx_is_space_alloc,
+ H5D__btree_idx_insert,
+ H5D__btree_idx_get_addr,
NULL,
- H5D_btree_idx_iterate,
- H5D_btree_idx_remove,
- H5D_btree_idx_delete,
- H5D_btree_idx_copy_setup,
- H5D_btree_idx_copy_shutdown,
- H5D_btree_idx_size,
- H5D_btree_idx_reset,
- H5D_btree_idx_dump,
- H5D_btree_idx_dest
+ H5D__btree_idx_iterate,
+ H5D__btree_idx_remove,
+ H5D__btree_idx_delete,
+ H5D__btree_idx_copy_setup,
+ H5D__btree_idx_copy_shutdown,
+ H5D__btree_idx_size,
+ H5D__btree_idx_reset,
+ H5D__btree_idx_dump,
+ H5D__btree_idx_dest
}};
@@ -183,19 +183,19 @@ const H5D_chunk_ops_t H5D_COPS_BTREE[1] = {{
H5B_class_t H5B_BTREE[1] = {{
H5B_CHUNK_ID, /*id */
sizeof(H5D_btree_key_t), /*sizeof_nkey */
- H5D_btree_get_shared, /*get_shared */
- H5D_btree_new_node, /*new */
- H5D_btree_cmp2, /*cmp2 */
- H5D_btree_cmp3, /*cmp3 */
- H5D_btree_found, /*found */
- H5D_btree_insert, /*insert */
+ H5D__btree_get_shared, /*get_shared */
+ H5D__btree_new_node, /*new */
+ H5D__btree_cmp2, /*cmp2 */
+ H5D__btree_cmp3, /*cmp3 */
+ H5D__btree_found, /*found */
+ H5D__btree_insert, /*insert */
FALSE, /*follow min branch? */
FALSE, /*follow max branch? */
H5B_LEFT, /*critical key */
- H5D_btree_remove, /*remove */
- H5D_btree_decode_key, /*decode */
- H5D_btree_encode_key, /*encode */
- H5D_btree_debug_key, /*debug */
+ H5D__btree_remove, /*remove */
+ H5D__btree_decode_key, /*decode */
+ H5D__btree_encode_key, /*encode */
+ H5D__btree_debug_key, /*debug */
}};
@@ -205,7 +205,7 @@ H5B_class_t H5B_BTREE[1] = {{
/*-------------------------------------------------------------------------
- * Function: H5D_btree_get_shared
+ * Function: H5D__btree_get_shared
*
* Purpose: Returns the shared B-tree info for the specified UDATA.
*
@@ -220,11 +220,11 @@ H5B_class_t H5B_BTREE[1] = {{
*/
/* ARGSUSED */
static H5RC_t *
-H5D_btree_get_shared(const H5F_t UNUSED *f, const void *_udata)
+H5D__btree_get_shared(const H5F_t UNUSED *f, const void *_udata)
{
const H5D_chunk_common_ud_t *udata = (const H5D_chunk_common_ud_t *) _udata;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(udata);
HDassert(udata->storage);
@@ -233,11 +233,11 @@ H5D_btree_get_shared(const H5F_t UNUSED *f, const void *_udata)
/* Return the pointer to the ref-count object */
FUNC_LEAVE_NOAPI(udata->storage->u.btree.shared)
-} /* end H5D_btree_get_shared() */
+} /* end H5D__btree_get_shared() */
/*-------------------------------------------------------------------------
- * Function: H5D_btree_new_node
+ * Function: H5D__btree_new_node
*
* Purpose: Adds a new entry to an i-storage B-tree. We can assume that
* the domain represented by UDATA doesn't intersect the domain
@@ -255,7 +255,7 @@ H5D_btree_get_shared(const H5F_t UNUSED *f, const void *_udata)
*-------------------------------------------------------------------------
*/
static herr_t
-H5D_btree_new_node(H5F_t *f, hid_t dxpl_id, H5B_ins_t op,
+H5D__btree_new_node(H5F_t *f, hid_t dxpl_id, H5B_ins_t op,
void *_lt_key, void *_udata, void *_rt_key,
haddr_t *addr_p/*out*/)
{
@@ -265,7 +265,7 @@ H5D_btree_new_node(H5F_t *f, hid_t dxpl_id, H5B_ins_t op,
unsigned u;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* check args */
HDassert(f);
@@ -307,11 +307,11 @@ H5D_btree_new_node(H5F_t *f, hid_t dxpl_id, H5B_ins_t op,
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D_btree_new_node() */
+} /* end H5D__btree_new_node() */
/*-------------------------------------------------------------------------
- * Function: H5D_btree_cmp2
+ * Function: H5D__btree_cmp2
*
* Purpose: Compares two keys sort of like strcmp(). The UDATA pointer
* is only to supply extra information not carried in the keys
@@ -330,14 +330,14 @@ done:
*-------------------------------------------------------------------------
*/
static int
-H5D_btree_cmp2(void *_lt_key, void *_udata, void *_rt_key)
+H5D__btree_cmp2(void *_lt_key, void *_udata, void *_rt_key)
{
H5D_btree_key_t *lt_key = (H5D_btree_key_t *) _lt_key;
H5D_btree_key_t *rt_key = (H5D_btree_key_t *) _rt_key;
H5D_chunk_common_ud_t *udata = (H5D_chunk_common_ud_t *) _udata;
int ret_value;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(lt_key);
HDassert(rt_key);
@@ -348,11 +348,11 @@ H5D_btree_cmp2(void *_lt_key, void *_udata, void *_rt_key)
ret_value = H5V_vector_cmp_u(udata->layout->ndims, lt_key->offset, rt_key->offset);
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D_btree_cmp2() */
+} /* end H5D__btree_cmp2() */
/*-------------------------------------------------------------------------
- * Function: H5D_btree_cmp3
+ * Function: H5D__btree_cmp3
*
* Purpose: Compare the requested datum UDATA with the left and right
* keys of the B-tree.
@@ -379,14 +379,14 @@ H5D_btree_cmp2(void *_lt_key, void *_udata, void *_rt_key)
*-------------------------------------------------------------------------
*/
static int
-H5D_btree_cmp3(void *_lt_key, void *_udata, void *_rt_key)
+H5D__btree_cmp3(void *_lt_key, void *_udata, void *_rt_key)
{
H5D_btree_key_t *lt_key = (H5D_btree_key_t *) _lt_key;
H5D_btree_key_t *rt_key = (H5D_btree_key_t *) _rt_key;
H5D_chunk_common_ud_t *udata = (H5D_chunk_common_ud_t *) _udata;
int ret_value = 0;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(lt_key);
HDassert(rt_key);
@@ -416,11 +416,11 @@ H5D_btree_cmp3(void *_lt_key, void *_udata, void *_rt_key)
} /* end else */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D_btree_cmp3() */
+} /* end H5D__btree_cmp3() */
/*-------------------------------------------------------------------------
- * Function: H5D_btree_found
+ * Function: H5D__btree_found
*
* Purpose: This function is called when the B-tree search engine has
* found the leaf entry that points to a chunk of storage that
@@ -445,7 +445,7 @@ H5D_btree_cmp3(void *_lt_key, void *_udata, void *_rt_key)
*/
/* ARGSUSED */
static htri_t
-H5D_btree_found(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, haddr_t addr, const void *_lt_key,
+H5D__btree_found(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, haddr_t addr, const void *_lt_key,
void *_udata)
{
H5D_chunk_ud_t *udata = (H5D_chunk_ud_t *) _udata;
@@ -453,7 +453,7 @@ H5D_btree_found(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, haddr_t addr, const void
unsigned u;
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Check arguments */
HDassert(f);
@@ -474,11 +474,11 @@ H5D_btree_found(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, haddr_t addr, const void
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D_btree_found() */
+} /* end H5D__btree_found() */
/*-------------------------------------------------------------------------
- * Function: H5D_btree_insert
+ * Function: H5D__btree_insert
*
* Purpose: This function is called when the B-tree insert engine finds
* the node to use to insert new data. The UDATA argument
@@ -507,7 +507,7 @@ done:
*/
/* ARGSUSED */
static H5B_ins_t
-H5D_btree_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key,
+H5D__btree_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key,
hbool_t *lt_key_changed,
void *_md_key, void *_udata, void *_rt_key,
hbool_t UNUSED *rt_key_changed,
@@ -521,7 +521,7 @@ H5D_btree_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key,
unsigned u;
H5B_ins_t ret_value;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* check args */
HDassert(f);
@@ -533,7 +533,7 @@ H5D_btree_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key,
HDassert(rt_key);
HDassert(new_node_p);
- cmp = H5D_btree_cmp3(lt_key, udata, rt_key);
+ cmp = H5D__btree_cmp3(lt_key, udata, rt_key);
HDassert(cmp <= 0);
if(cmp < 0) {
@@ -611,11 +611,11 @@ H5D_btree_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key,
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D_btree_insert() */
+} /* end H5D__btree_insert() */
/*-------------------------------------------------------------------------
- * Function: H5D_btree_remove
+ * Function: H5D__btree_remove
*
* Purpose: Removes chunks that are no longer necessary in the B-tree.
*
@@ -629,7 +629,7 @@ done:
*/
/* ARGSUSED */
static H5B_ins_t
-H5D_btree_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key /*in,out */ ,
+H5D__btree_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key /*in,out */ ,
hbool_t *lt_key_changed /*out */ ,
void UNUSED * _udata /*in,out */ ,
void UNUSED * _rt_key /*in,out */ ,
@@ -638,7 +638,7 @@ H5D_btree_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key /*in,out *
H5D_btree_key_t *lt_key = (H5D_btree_key_t *)_lt_key;
H5B_ins_t ret_value=H5B_INS_REMOVE; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Remove raw data chunk from file */
H5_CHECK_OVERFLOW(lt_key->nbytes, uint32_t, hsize_t);
@@ -651,11 +651,11 @@ H5D_btree_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key /*in,out *
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D_btree_remove() */
+} /* end H5D__btree_remove() */
/*-------------------------------------------------------------------------
- * Function: H5D_btree_decode_key
+ * Function: H5D__btree_decode_key
*
* Purpose: Decodes a raw key into a native key for the B-tree
*
@@ -667,13 +667,13 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D_btree_decode_key(const H5B_shared_t *shared, const uint8_t *raw, void *_key)
+H5D__btree_decode_key(const H5B_shared_t *shared, const uint8_t *raw, void *_key)
{
H5D_btree_key_t *key = (H5D_btree_key_t *) _key;
size_t ndims;
unsigned u;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* check args */
HDassert(shared);
@@ -689,11 +689,11 @@ H5D_btree_decode_key(const H5B_shared_t *shared, const uint8_t *raw, void *_key)
UINT64DECODE(raw, key->offset[u]);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5D_btree_decode_key() */
+} /* end H5D__btree_decode_key() */
/*-------------------------------------------------------------------------
- * Function: H5D_btree_encode_key
+ * Function: H5D__btree_encode_key
*
* Purpose: Encode a key from native format to raw format.
*
@@ -705,13 +705,13 @@ H5D_btree_decode_key(const H5B_shared_t *shared, const uint8_t *raw, void *_key)
*-------------------------------------------------------------------------
*/
static herr_t
-H5D_btree_encode_key(const H5B_shared_t *shared, uint8_t *raw, const void *_key)
+H5D__btree_encode_key(const H5B_shared_t *shared, uint8_t *raw, const void *_key)
{
const H5D_btree_key_t *key = (const H5D_btree_key_t *)_key;
size_t ndims;
unsigned u;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* check args */
HDassert(shared);
@@ -727,11 +727,11 @@ H5D_btree_encode_key(const H5B_shared_t *shared, uint8_t *raw, const void *_key)
UINT64ENCODE(raw, key->offset[u]);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5D_btree_encode_key() */
+} /* end H5D__btree_encode_key() */
/*-------------------------------------------------------------------------
- * Function: H5D_btree_debug_key
+ * Function: H5D__btree_debug_key
*
* Purpose: Prints a key.
*
@@ -744,14 +744,14 @@ H5D_btree_encode_key(const H5B_shared_t *shared, uint8_t *raw, const void *_key)
*/
/* ARGSUSED */
static herr_t
-H5D_btree_debug_key(FILE *stream, int indent, int fwidth, const void *_key,
+H5D__btree_debug_key(FILE *stream, int indent, int fwidth, const void *_key,
const void *_udata)
{
const H5D_btree_key_t *key = (const H5D_btree_key_t *)_key;
const H5D_btree_dbg_t *udata = (const H5D_btree_dbg_t *)_udata;
unsigned u;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(key);
@@ -763,11 +763,11 @@ H5D_btree_debug_key(FILE *stream, int indent, int fwidth, const void *_key,
HDfputs("}\n", stream);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5D_btree_debug_key() */
+} /* end H5D__btree_debug_key() */
/*-------------------------------------------------------------------------
- * Function: H5D_btree_shared_create
+ * Function: H5D__btree_shared_create
*
* Purpose: Create & initialize B-tree shared info
*
@@ -779,13 +779,13 @@ H5D_btree_debug_key(FILE *stream, int indent, int fwidth, const void *_key,
*-------------------------------------------------------------------------
*/
static herr_t
-H5D_btree_shared_create(const H5F_t *f, H5O_storage_chunk_t *store, unsigned ndims)
+H5D__btree_shared_create(const H5F_t *f, H5O_storage_chunk_t *store, unsigned ndims)
{
H5B_shared_t *shared; /* Shared B-tree node info */
size_t sizeof_rkey; /* Size of raw (disk) key */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Set the raw key size */
sizeof_rkey = 4 + /*storage size */
@@ -805,11 +805,11 @@ H5D_btree_shared_create(const H5F_t *f, H5O_storage_chunk_t *store, unsigned ndi
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D_btree_shared_create() */
+} /* end H5D__btree_shared_create() */
/*-------------------------------------------------------------------------
- * Function: H5D_btree_idx_init
+ * Function: H5D__btree_idx_init
*
* Purpose: Initialize the indexing information for a dataset.
*
@@ -821,12 +821,12 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D_btree_idx_init(const H5D_chk_idx_info_t *idx_info, const H5S_t UNUSED *space,
+H5D__btree_idx_init(const H5D_chk_idx_info_t *idx_info, const H5S_t UNUSED *space,
haddr_t dset_ohdr_addr)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Check args */
HDassert(idx_info);
@@ -839,16 +839,16 @@ H5D_btree_idx_init(const H5D_chk_idx_info_t *idx_info, const H5S_t UNUSED *space
idx_info->storage->u.btree.dset_ohdr_addr = dset_ohdr_addr;
/* Allocate the shared structure */
- if(H5D_btree_shared_create(idx_info->f, idx_info->storage, idx_info->layout->ndims) < 0)
+ if(H5D__btree_shared_create(idx_info->f, idx_info->storage, idx_info->layout->ndims) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't create wrapper for shared B-tree info")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D_btree_idx_init() */
+} /* end H5D__btree_idx_init() */
/*-------------------------------------------------------------------------
- * Function: H5D_btree_idx_create
+ * Function: H5D__btree_idx_create
*
* Purpose: Creates a new indexed-storage B-tree and initializes the
* layout struct with information about the storage. The
@@ -866,12 +866,12 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D_btree_idx_create(const H5D_chk_idx_info_t *idx_info)
+H5D__btree_idx_create(const H5D_chk_idx_info_t *idx_info)
{
H5D_chunk_common_ud_t udata; /* User data for B-tree callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Check args */
HDassert(idx_info);
@@ -891,11 +891,11 @@ H5D_btree_idx_create(const H5D_chk_idx_info_t *idx_info)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D_btree_idx_create() */
+} /* end H5D__btree_idx_create() */
/*-------------------------------------------------------------------------
- * Function: H5D_btree_idx_is_space_alloc
+ * Function: H5D__btree_idx_is_space_alloc
*
* Purpose: Query if space is allocated for index method
*
@@ -907,11 +907,11 @@ done:
*-------------------------------------------------------------------------
*/
static hbool_t
-H5D_btree_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
+H5D__btree_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
{
hbool_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Check args */
HDassert(storage);
@@ -920,11 +920,11 @@ H5D_btree_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
ret_value = (hbool_t)H5F_addr_defined(storage->idx_addr);
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D_btree_idx_is_space_alloc() */
+} /* end H5D__btree_idx_is_space_alloc() */
/*-------------------------------------------------------------------------
- * Function: H5D_btree_idx_insert
+ * Function: H5D__btree_idx_insert
*
* Purpose: Create the chunk it if it doesn't exist, or reallocate the
* chunk if its size changed.
@@ -937,11 +937,11 @@ H5D_btree_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
*-------------------------------------------------------------------------
*/
static herr_t
-H5D_btree_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata)
+H5D__btree_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(idx_info);
HDassert(idx_info->f);
@@ -960,11 +960,11 @@ H5D_btree_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5D_btree_idx_insert() */
+} /* H5D__btree_idx_insert() */
/*-------------------------------------------------------------------------
- * Function: H5D_btree_idx_get_addr
+ * Function: H5D__btree_idx_get_addr
*
* Purpose: Get the file address of a chunk if file space has been
* assigned. Save the retrieved information in the udata
@@ -978,11 +978,11 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D_btree_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata)
+H5D__btree_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(idx_info);
HDassert(idx_info->f);
@@ -999,11 +999,11 @@ H5D_btree_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5D_btree_idx_get_addr() */
+} /* H5D__btree_idx_get_addr() */
/*-------------------------------------------------------------------------
- * Function: H5D_btree_idx_iterate_cb
+ * Function: H5D__btree_idx_iterate_cb
*
* Purpose: Translate the B-tree specific chunk record into a generic
* form and make the callback to the generic chunk callback
@@ -1019,7 +1019,7 @@ done:
*/
/* ARGSUSED */
static int
-H5D_btree_idx_iterate_cb(H5F_t UNUSED *f, hid_t UNUSED dxpl_id,
+H5D__btree_idx_iterate_cb(H5F_t UNUSED *f, hid_t UNUSED dxpl_id,
const void *_lt_key, haddr_t addr, const void UNUSED *_rt_key,
void *_udata)
{
@@ -1028,7 +1028,7 @@ H5D_btree_idx_iterate_cb(H5F_t UNUSED *f, hid_t UNUSED dxpl_id,
H5D_chunk_rec_t chunk_rec; /* Generic chunk record for callback */
int ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Sanity check for memcpy() */
HDcompile_assert(offsetof(H5D_chunk_rec_t, nbytes) == offsetof(H5D_btree_key_t, nbytes));
@@ -1047,11 +1047,11 @@ H5D_btree_idx_iterate_cb(H5F_t UNUSED *f, hid_t UNUSED dxpl_id,
HERROR(H5E_DATASET, H5E_CALLBACK, "failure in generic chunk iterator callback");
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5D_btree_idx_iterate_cb() */
+} /* H5D__btree_idx_iterate_cb() */
/*-------------------------------------------------------------------------
- * Function: H5D_btree_idx_iterate
+ * Function: H5D__btree_idx_iterate
*
* Purpose: Iterate over the chunks in an index, making a callback
* for each one.
@@ -1064,13 +1064,13 @@ H5D_btree_idx_iterate_cb(H5F_t UNUSED *f, hid_t UNUSED dxpl_id,
*-------------------------------------------------------------------------
*/
static int
-H5D_btree_idx_iterate(const H5D_chk_idx_info_t *idx_info,
+H5D__btree_idx_iterate(const H5D_chk_idx_info_t *idx_info,
H5D_chunk_cb_func_t chunk_cb, void *chunk_udata)
{
H5D_btree_it_ud_t udata; /* User data for B-tree iterator callback */
int ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(idx_info);
HDassert(idx_info->f);
@@ -1089,15 +1089,15 @@ H5D_btree_idx_iterate(const H5D_chk_idx_info_t *idx_info,
udata.udata = chunk_udata;
/* Iterate over existing chunks */
- if((ret_value = H5B_iterate(idx_info->f, idx_info->dxpl_id, H5B_BTREE, idx_info->storage->idx_addr, H5D_btree_idx_iterate_cb, &udata)) < 0)
+ if((ret_value = H5B_iterate(idx_info->f, idx_info->dxpl_id, H5B_BTREE, idx_info->storage->idx_addr, H5D__btree_idx_iterate_cb, &udata)) < 0)
HERROR(H5E_DATASET, H5E_BADITER, "unable to iterate over chunk B-tree");
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D_btree_idx_iterate() */
+} /* end H5D__btree_idx_iterate() */
/*-------------------------------------------------------------------------
- * Function: H5D_btree_idx_remove
+ * Function: H5D__btree_idx_remove
*
* Purpose: Remove chunk from index.
*
@@ -1109,11 +1109,11 @@ H5D_btree_idx_iterate(const H5D_chk_idx_info_t *idx_info,
*-------------------------------------------------------------------------
*/
static herr_t
-H5D_btree_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t *udata)
+H5D__btree_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t *udata)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(idx_info);
HDassert(idx_info->f);
@@ -1131,11 +1131,11 @@ H5D_btree_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t *
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5D_btree_idx_remove() */
+} /* H5D__btree_idx_remove() */
/*-------------------------------------------------------------------------
- * Function: H5D_btree_idx_delete
+ * Function: H5D__btree_idx_delete
*
* Purpose: Delete index and raw data storage for entire dataset
* (i.e. all chunks)
@@ -1149,11 +1149,11 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D_btree_idx_delete(const H5D_chk_idx_info_t *idx_info)
+H5D__btree_idx_delete(const H5D_chk_idx_info_t *idx_info)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Sanity checks */
HDassert(idx_info);
@@ -1171,7 +1171,7 @@ H5D_btree_idx_delete(const H5D_chk_idx_info_t *idx_info)
tmp_storage = *idx_info->storage;
/* Set up the shared structure */
- if(H5D_btree_shared_create(idx_info->f, &tmp_storage, idx_info->layout->ndims) < 0)
+ if(H5D__btree_shared_create(idx_info->f, &tmp_storage, idx_info->layout->ndims) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create wrapper for shared B-tree info")
/* Set up B-tree user data */
@@ -1192,11 +1192,11 @@ H5D_btree_idx_delete(const H5D_chk_idx_info_t *idx_info)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D_btree_idx_delete() */
+} /* end H5D__btree_idx_delete() */
/*-------------------------------------------------------------------------
- * Function: H5D_btree_idx_copy_setup
+ * Function: H5D__btree_idx_copy_setup
*
* Purpose: Set up any necessary information for copying chunks
*
@@ -1208,12 +1208,12 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D_btree_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src,
+H5D__btree_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src,
const H5D_chk_idx_info_t *idx_info_dst)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_TAG(idx_info_dst->dxpl_id, H5AC__COPIED_TAG, FAIL)
+ FUNC_ENTER_STATIC_TAG(idx_info_dst->dxpl_id, H5AC__COPIED_TAG, FAIL)
HDassert(idx_info_src);
HDassert(idx_info_src->f);
@@ -1228,23 +1228,23 @@ H5D_btree_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src,
HDassert(!H5F_addr_defined(idx_info_dst->storage->idx_addr));
/* Create shared B-tree info for each file */
- if(H5D_btree_shared_create(idx_info_src->f, idx_info_src->storage, idx_info_src->layout->ndims) < 0)
+ if(H5D__btree_shared_create(idx_info_src->f, idx_info_src->storage, idx_info_src->layout->ndims) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't create wrapper for source shared B-tree info")
- if(H5D_btree_shared_create(idx_info_dst->f, idx_info_dst->storage, idx_info_dst->layout->ndims) < 0)
+ if(H5D__btree_shared_create(idx_info_dst->f, idx_info_dst->storage, idx_info_dst->layout->ndims) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't create wrapper for destination shared B-tree info")
/* Create the root of the B-tree that describes chunked storage in the dest. file */
- if(H5D_btree_idx_create(idx_info_dst) < 0)
+ if(H5D__btree_idx_create(idx_info_dst) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to initialize chunked storage")
HDassert(H5F_addr_defined(idx_info_dst->storage->idx_addr));
done:
FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
-} /* end H5D_btree_idx_copy_setup() */
+} /* end H5D__btree_idx_copy_setup() */
/*-------------------------------------------------------------------------
- * Function: H5D_btree_idx_copy_shutdown
+ * Function: H5D__btree_idx_copy_shutdown
*
* Purpose: Shutdown any information from copying chunks
*
@@ -1256,13 +1256,13 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D_btree_idx_copy_shutdown(H5O_storage_chunk_t *storage_src,
+H5D__btree_idx_copy_shutdown(H5O_storage_chunk_t *storage_src,
H5O_storage_chunk_t *storage_dst,
hid_t UNUSED dxpl_id)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(storage_src);
HDassert(storage_dst);
@@ -1275,11 +1275,11 @@ H5D_btree_idx_copy_shutdown(H5O_storage_chunk_t *storage_src,
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D_btree_idx_copy_shutdown() */
+} /* end H5D__btree_idx_copy_shutdown() */
/*-------------------------------------------------------------------------
- * Function: H5D_btree_idx_size
+ * Function: H5D__btree_idx_size
*
* Purpose: Retrieve the amount of index storage for chunked dataset
*
@@ -1292,14 +1292,14 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D_btree_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *index_size)
+H5D__btree_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *index_size)
{
H5D_chunk_common_ud_t udata; /* User-data for loading B-tree nodes */
H5B_info_t bt_info; /* B-tree info */
hbool_t shared_init = FALSE; /* Whether shared B-tree info is initialized */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Check args */
HDassert(idx_info);
@@ -1310,7 +1310,7 @@ H5D_btree_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *index_size)
HDassert(index_size);
/* Initialize the shared info for the B-tree traversal */
- if(H5D_btree_shared_create(idx_info->f, idx_info->storage, idx_info->layout->ndims) < 0)
+ if(H5D__btree_shared_create(idx_info->f, idx_info->storage, idx_info->layout->ndims) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't create wrapper for shared B-tree info")
shared_init = TRUE;
@@ -1335,11 +1335,11 @@ done:
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D_btree_idx_size() */
+} /* end H5D__btree_idx_size() */
/*-------------------------------------------------------------------------
- * Function: H5D_btree_idx_reset
+ * Function: H5D__btree_idx_reset
*
* Purpose: Reset indexing information.
*
@@ -1351,9 +1351,9 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D_btree_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
+H5D__btree_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(storage);
@@ -1363,11 +1363,11 @@ H5D_btree_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
storage->u.btree.shared = NULL;
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5D_btree_idx_reset() */
+} /* end H5D__btree_idx_reset() */
/*-------------------------------------------------------------------------
- * Function: H5D_btree_idx_dump
+ * Function: H5D__btree_idx_dump
*
* Purpose: Dump indexing information to a stream.
*
@@ -1379,9 +1379,9 @@ H5D_btree_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
*-------------------------------------------------------------------------
*/
static herr_t
-H5D_btree_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream)
+H5D__btree_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(storage);
HDassert(stream);
@@ -1389,11 +1389,11 @@ H5D_btree_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream)
HDfprintf(stream, " Address: %a\n", storage->idx_addr);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5D_btree_idx_dump() */
+} /* end H5D__btree_idx_dump() */
/*-------------------------------------------------------------------------
- * Function: H5D_btree_idx_dest
+ * Function: H5D__btree_idx_dest
*
* Purpose: Release indexing information in memory.
*
@@ -1405,11 +1405,11 @@ H5D_btree_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream)
*-------------------------------------------------------------------------
*/
static herr_t
-H5D_btree_idx_dest(const H5D_chk_idx_info_t *idx_info)
+H5D__btree_idx_dest(const H5D_chk_idx_info_t *idx_info)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(idx_info);
HDassert(idx_info->f);
@@ -1425,7 +1425,7 @@ H5D_btree_idx_dest(const H5D_chk_idx_info_t *idx_info)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D_btree_idx_dest() */
+} /* end H5D__btree_idx_dest() */
/*-------------------------------------------------------------------------
@@ -1456,7 +1456,7 @@ H5D_btree_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream, int indent
storage.idx_type = H5D_CHUNK_BTREE;
/* Allocate the shared structure */
- if(H5D_btree_shared_create(f, &storage, ndims) < 0)
+ if(H5D__btree_shared_create(f, &storage, ndims) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't create wrapper for shared B-tree info")
shared_init = TRUE;