From f9486b531fe603aa141aa0546cdf09247b86120a Mon Sep 17 00:00:00 2001 From: Vailin Choi Date: Wed, 21 Aug 2013 13:10:25 -0500 Subject: [svn-r24048] Bring revisions #23986 - 23988 from trunk to revise_chunks. h5committested. --- src/H5Adense.c | 88 +++++++++++----------- src/H5B2cache.c | 223 ++++++++++++++++++++++++++++--------------------------- src/H5B2stat.c | 2 +- src/H5Bcache.c | 74 +++++++++--------- src/H5Dchunk.c | 1 - src/H5Eprivate.h | 5 +- src/H5FDmulti.c | 2 - src/H5G.c | 7 -- src/H5Gent.c | 2 +- src/H5Pocpl.c | 1 - src/H5dbg.c | 2 +- 11 files changed, 200 insertions(+), 207 deletions(-) diff --git a/src/H5Adense.c b/src/H5Adense.c index c357c65..4429616 100644 --- a/src/H5Adense.c +++ b/src/H5Adense.c @@ -294,7 +294,7 @@ done: /*------------------------------------------------------------------------- - * Function: H5A_dense_fnd_cb + * Function: H5A__dense_fnd_cb * * Purpose: Callback when an attribute is located in an index * @@ -307,11 +307,11 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5A_dense_fnd_cb(const H5A_t *attr, hbool_t *took_ownership, void *_user_attr) +H5A__dense_fnd_cb(const H5A_t *attr, hbool_t *took_ownership, void *_user_attr) { H5A_t const **user_attr = (H5A_t const **)_user_attr; /* User data from v2 B-tree attribute lookup */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC_NOERR /* * Check arguments. @@ -324,7 +324,7 @@ H5A_dense_fnd_cb(const H5A_t *attr, hbool_t *took_ownership, void *_user_attr) *took_ownership = TRUE; FUNC_LEAVE_NOAPI(SUCCEED) -} /* end H5A_dense_fnd_cb() */ +} /* end H5A__dense_fnd_cb() */ /*------------------------------------------------------------------------- @@ -398,7 +398,7 @@ H5A_dense_open(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, udata.name_hash = H5_checksum_lookup3(name, HDstrlen(name), 0); udata.flags = 0; udata.corder = 0; - udata.found_op = H5A_dense_fnd_cb; /* v2 B-tree comparison callback */ + udata.found_op = H5A__dense_fnd_cb; /* v2 B-tree comparison callback */ udata.found_op_data = &ret_value; /* Find & copy the attribute in the 'name' index */ @@ -590,7 +590,7 @@ done: /*------------------------------------------------------------------------- - * Function: H5A_dense_write_bt2_cb2 + * Function: H5A__dense_write_bt2_cb2 * * Purpose: v2 B-tree 'modify' callback to update the record for a creation * order index @@ -604,12 +604,12 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5A_dense_write_bt2_cb2(void *_record, void *_op_data, hbool_t *changed) +H5A__dense_write_bt2_cb2(void *_record, void *_op_data, hbool_t *changed) { H5A_dense_bt2_corder_rec_t *record = (H5A_dense_bt2_corder_rec_t *)_record; /* Record from B-tree */ H5O_fheap_id_t *new_heap_id = (H5O_fheap_id_t *)_op_data; /* "op data" from v2 B-tree modify */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC_NOERR /* * Check arguments. @@ -624,11 +624,11 @@ H5A_dense_write_bt2_cb2(void *_record, void *_op_data, hbool_t *changed) *changed = TRUE; FUNC_LEAVE_NOAPI(SUCCEED) -} /* end H5A_dense_write_bt2_cb2() */ +} /* end H5A__dense_write_bt2_cb2() */ /*------------------------------------------------------------------------- - * Function: H5A_dense_write_bt2_cb + * Function: H5A__dense_write_bt2_cb * * Purpose: v2 B-tree 'modify' callback to update the data for an attribute * @@ -641,7 +641,7 @@ H5A_dense_write_bt2_cb2(void *_record, void *_op_data, hbool_t *changed) *------------------------------------------------------------------------- */ static herr_t -H5A_dense_write_bt2_cb(void *_record, void *_op_data, hbool_t *changed) +H5A__dense_write_bt2_cb(void *_record, void *_op_data, hbool_t *changed) { H5A_dense_bt2_name_rec_t *record = (H5A_dense_bt2_name_rec_t *)_record; /* Record from B-tree */ H5A_bt2_od_wrt_t *op_data = (H5A_bt2_od_wrt_t *)_op_data; /* "op data" from v2 B-tree modify */ @@ -651,7 +651,7 @@ H5A_dense_write_bt2_cb(void *_record, void *_op_data, hbool_t *changed) H5O_proxy_t *oh_proxy = NULL; /* Attribute's object header proxy */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* * Check arguments. @@ -695,7 +695,7 @@ H5A_dense_write_bt2_cb(void *_record, void *_op_data, hbool_t *changed) udata.found_op_data = NULL; /* Modify record for creation order index */ - if(H5B2_modify(bt2_corder, op_data->dxpl_id, &udata, H5A_dense_write_bt2_cb2, &op_data->attr->sh_loc.u.heap_id) < 0) + if(H5B2_modify(bt2_corder, op_data->dxpl_id, &udata, H5A__dense_write_bt2_cb2, &op_data->attr->sh_loc.u.heap_id) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "unable to modify record in v2 B-tree") } /* end if */ @@ -748,7 +748,7 @@ done: HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close wrapped buffer") FUNC_LEAVE_NOAPI(ret_value) -} /* end H5A_dense_write_bt2_cb() */ +} /* end H5A__dense_write_bt2_cb() */ /*------------------------------------------------------------------------- @@ -842,7 +842,7 @@ H5A_dense_write(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, H5A_t *attr) op_data.corder_bt2_addr = ainfo->corder_bt2_addr; /* Modify attribute through 'name' tracking v2 B-tree */ - if(H5B2_modify(bt2_name, dxpl_id, &udata, H5A_dense_write_bt2_cb, &op_data) < 0) + if(H5B2_modify(bt2_name, dxpl_id, &udata, H5A__dense_write_bt2_cb, &op_data) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "unable to modify record in v2 B-tree") done: @@ -861,7 +861,7 @@ done: /*------------------------------------------------------------------------- - * Function: H5A_dense_copy_fh_cb + * Function: H5A__dense_copy_fh_cb * * Purpose: Callback for fractal heap operator, to make copy of attribute * for calling routine @@ -875,12 +875,12 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5A_dense_copy_fh_cb(const void *obj, size_t UNUSED obj_len, void *_udata) +H5A__dense_copy_fh_cb(const void *obj, size_t UNUSED obj_len, void *_udata) { H5A_fh_ud_cp_t *udata = (H5A_fh_ud_cp_t *)_udata; /* User data for fractal heap 'op' callback */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Decode attribute information & keep a copy */ /* (we make a copy instead of calling the user/library callback directly in @@ -901,7 +901,7 @@ H5A_dense_copy_fh_cb(const void *obj, size_t UNUSED obj_len, void *_udata) done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5A_dense_copy_fh_cb() */ +} /* end H5A__dense_copy_fh_cb() */ /*------------------------------------------------------------------------- @@ -978,7 +978,7 @@ H5A_dense_rename(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, udata.name_hash = H5_checksum_lookup3(old_name, HDstrlen(old_name), 0); udata.flags = 0; udata.corder = 0; - udata.found_op = H5A_dense_fnd_cb; /* v2 B-tree comparison callback */ + udata.found_op = H5A__dense_fnd_cb; /* v2 B-tree comparison callback */ udata.found_op_data = &attr_copy; /* Get copy of attribute through 'name' tracking v2 B-tree */ @@ -1060,7 +1060,7 @@ done: /*------------------------------------------------------------------------- - * Function: H5A_dense_iterate_bt2_cb + * Function: H5A__dense_iterate_bt2_cb * * Purpose: v2 B-tree callback for dense attribute storage iterator * @@ -1073,13 +1073,13 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5A_dense_iterate_bt2_cb(const void *_record, void *_bt2_udata) +H5A__dense_iterate_bt2_cb(const void *_record, void *_bt2_udata) { const H5A_dense_bt2_name_rec_t *record = (const H5A_dense_bt2_name_rec_t *)_record; /* Record from B-tree */ H5A_bt2_ud_it_t *bt2_udata = (H5A_bt2_ud_it_t *)_bt2_udata; /* User data for callback */ herr_t ret_value = H5_ITER_CONT; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check for skipping attributes */ if(bt2_udata->skip > 0) @@ -1102,7 +1102,7 @@ H5A_dense_iterate_bt2_cb(const void *_record, void *_bt2_udata) fh_udata.attr = NULL; /* Call fractal heap 'op' routine, to copy the attribute information */ - if(H5HF_op(fheap, bt2_udata->dxpl_id, &record->id, H5A_dense_copy_fh_cb, &fh_udata) < 0) + if(H5HF_op(fheap, bt2_udata->dxpl_id, &record->id, H5A__dense_copy_fh_cb, &fh_udata) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTOPERATE, H5_ITER_ERROR, "heap op callback failed") /* Check which type of callback to make */ @@ -1153,7 +1153,7 @@ H5A_dense_iterate_bt2_cb(const void *_record, void *_bt2_udata) done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5A_dense_iterate_bt2_cb() */ +} /* end H5A__dense_iterate_bt2_cb() */ /*------------------------------------------------------------------------- @@ -1262,7 +1262,7 @@ H5A_dense_iterate(H5F_t *f, hid_t dxpl_id, hid_t loc_id, /* Iterate over the records in the v2 B-tree's "native" order */ /* (by hash of name) */ - if((ret_value = H5B2_iterate(bt2, dxpl_id, H5A_dense_iterate_bt2_cb, &udata)) < 0) + if((ret_value = H5B2_iterate(bt2, dxpl_id, H5A__dense_iterate_bt2_cb, &udata)) < 0) HERROR(H5E_ATTR, H5E_BADITER, "attribute iteration failed"); /* Update the last attribute examined, if requested */ @@ -1296,7 +1296,7 @@ done: /*------------------------------------------------------------------------- - * Function: H5A_dense_remove_bt2_cb + * Function: H5A__dense_remove_bt2_cb * * Purpose: v2 B-tree callback for dense attribute storage record removal * @@ -1309,7 +1309,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5A_dense_remove_bt2_cb(const void *_record, void *_udata) +H5A__dense_remove_bt2_cb(const void *_record, void *_udata) { const H5A_dense_bt2_name_rec_t *record = (const H5A_dense_bt2_name_rec_t *)_record; H5A_bt2_ud_rm_t *udata = (H5A_bt2_ud_rm_t *)_udata; /* User data for callback */ @@ -1317,7 +1317,7 @@ H5A_dense_remove_bt2_cb(const void *_record, void *_udata) H5B2_t *bt2_corder = NULL; /* v2 B-tree handle for creation order index */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check for removing the link from the creation order index */ if(H5F_addr_defined(udata->corder_bt2_addr)) { @@ -1356,7 +1356,7 @@ done: HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close v2 B-tree for creation order index") FUNC_LEAVE_NOAPI(ret_value) -} /* end H5A_dense_remove_bt2_cb() */ +} /* end H5A__dense_remove_bt2_cb() */ /*------------------------------------------------------------------------- @@ -1428,13 +1428,13 @@ H5A_dense_remove(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, udata.common.shared_fheap = shared_fheap; udata.common.name = name; udata.common.name_hash = H5_checksum_lookup3(name, HDstrlen(name), 0); - udata.common.found_op = H5A_dense_fnd_cb; /* v2 B-tree comparison callback */ + udata.common.found_op = H5A__dense_fnd_cb; /* v2 B-tree comparison callback */ udata.common.found_op_data = &attr_copy; udata.corder_bt2_addr = ainfo->corder_bt2_addr; udata.parent = parent; /* Remove the record from the name index v2 B-tree */ - if(H5B2_remove(bt2_name, dxpl_id, &udata, H5A_dense_remove_bt2_cb, &udata) < 0) + if(H5B2_remove(bt2_name, dxpl_id, &udata, H5A__dense_remove_bt2_cb, &udata) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTREMOVE, FAIL, "unable to remove attribute from name index v2 B-tree") done: @@ -1453,7 +1453,7 @@ done: /*------------------------------------------------------------------------- - * Function: H5A_dense_remove_by_idx_bt2_cb + * Function: H5A__dense_remove_by_idx_bt2_cb * * Purpose: v2 B-tree callback for dense attribute storage record removal by index * @@ -1466,7 +1466,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5A_dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata) +H5A__dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata) { H5HF_t *fheap; /* Fractal heap handle */ H5B2_t *bt2 = NULL; /* v2 B-tree handle for index */ @@ -1477,7 +1477,7 @@ H5A_dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata) hbool_t use_sh_loc; /* Whether to use the attribute's shared location or the separate one */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Set up the user data for fractal heap 'op' callback */ fh_udata.f = bt2_udata->f; @@ -1494,7 +1494,7 @@ H5A_dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata) /* Check whether to make a copy of the attribute or just need the shared location info */ if(H5F_addr_defined(bt2_udata->other_bt2_addr) || !(record->flags & H5O_MSG_FLAG_SHARED)) { /* Call fractal heap 'op' routine, to make copy of attribute to remove */ - if(H5HF_op(fheap, bt2_udata->dxpl_id, &record->id, H5A_dense_copy_fh_cb, &fh_udata) < 0) + if(H5HF_op(fheap, bt2_udata->dxpl_id, &record->id, H5A__dense_copy_fh_cb, &fh_udata) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTOPERATE, FAIL, "attribute removal callback failed") HDassert(fh_udata.attr); @@ -1576,7 +1576,7 @@ done: H5O_msg_free(H5O_ATTR_ID, fh_udata.attr); FUNC_LEAVE_NOAPI(ret_value) -} /* end H5A_dense_remove_by_idx_bt2_cb() */ +} /* end H5A__dense_remove_by_idx_bt2_cb() */ /*------------------------------------------------------------------------- @@ -1678,7 +1678,7 @@ H5A_dense_remove_by_idx(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, udata.parent = parent; /* Remove the record from the name index v2 B-tree */ - if(H5B2_remove_by_idx(bt2, dxpl_id, order, n, NULL, H5A_dense_remove_by_idx_bt2_cb, &udata) < 0) + if(H5B2_remove_by_idx(bt2, dxpl_id, order, n, NULL, H5A__dense_remove_by_idx_bt2_cb, &udata) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTREMOVE, FAIL, "unable to remove attribute from v2 B-tree index") } /* end if */ else { @@ -1803,7 +1803,7 @@ done: /*------------------------------------------------------------------------- - * Function: H5A_dense_delete_bt2_cb + * Function: H5A__dense_delete_bt2_cb * * Purpose: v2 B-tree callback for dense attribute storage deletion * @@ -1816,14 +1816,14 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5A_dense_delete_bt2_cb(const void *_record, void *_bt2_udata) +H5A__dense_delete_bt2_cb(const void *_record, void *_bt2_udata) { const H5A_dense_bt2_name_rec_t *record = (const H5A_dense_bt2_name_rec_t *)_record; /* Record from B-tree */ H5A_bt2_ud_common_t *bt2_udata = (H5A_bt2_ud_common_t *)_bt2_udata; /* User data for callback */ H5A_t *attr = NULL; /* Attribute being removed */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check for shared attribute */ if(record->flags & H5O_MSG_FLAG_SHARED) { @@ -1848,7 +1848,7 @@ H5A_dense_delete_bt2_cb(const void *_record, void *_bt2_udata) fh_udata.attr = NULL; /* Call fractal heap 'op' routine, to copy the attribute information */ - if(H5HF_op(bt2_udata->fheap, bt2_udata->dxpl_id, &record->id, H5A_dense_copy_fh_cb, &fh_udata) < 0) + if(H5HF_op(bt2_udata->fheap, bt2_udata->dxpl_id, &record->id, H5A__dense_copy_fh_cb, &fh_udata) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTOPERATE, FAIL, "heap op callback failed") attr = fh_udata.attr; @@ -1864,7 +1864,7 @@ done: H5O_msg_free_real(H5O_MSG_ATTR, attr); FUNC_LEAVE_NOAPI(ret_value) -} /* end H5A_dense_delete_bt2_cb() */ +} /* end H5A__dense_delete_bt2_cb() */ /*------------------------------------------------------------------------- @@ -1911,7 +1911,7 @@ H5A_dense_delete(H5F_t *f, hid_t dxpl_id, H5O_ainfo_t *ainfo, void *parent) udata.found_op_data = NULL; /* Delete name index v2 B-tree */ - if(H5B2_delete(f, dxpl_id, ainfo->name_bt2_addr, NULL, parent, H5A_dense_delete_bt2_cb, &udata) < 0) + if(H5B2_delete(f, dxpl_id, ainfo->name_bt2_addr, NULL, parent, H5A__dense_delete_bt2_cb, &udata) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete v2 B-tree for name index") ainfo->name_bt2_addr = HADDR_UNDEF; diff --git a/src/H5B2cache.c b/src/H5B2cache.c index 536af65..d06d9c0 100644 --- a/src/H5B2cache.c +++ b/src/H5B2cache.c @@ -69,24 +69,24 @@ /********************/ /* Metadata cache callbacks */ -static H5B2_hdr_t *H5B2_cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); -static herr_t H5B2_cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B2_hdr_t *hdr, unsigned UNUSED * flags_ptr); -static herr_t H5B2_cache_hdr_dest(H5F_t *f, H5B2_hdr_t *hdr); -static herr_t H5B2_cache_hdr_clear(H5F_t *f, H5B2_hdr_t *hdr, hbool_t destroy); -static herr_t H5B2_cache_hdr_notify(H5AC_notify_action_t action, H5B2_hdr_t *hdr); -static herr_t H5B2_cache_hdr_size(const H5F_t *f, const H5B2_hdr_t *hdr, size_t *size_ptr); -static H5B2_internal_t *H5B2_cache_internal_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); -static herr_t H5B2_cache_internal_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B2_internal_t *i, unsigned UNUSED * flags_ptr); -static herr_t H5B2_cache_internal_dest(H5F_t *f, H5B2_internal_t *internal); -static herr_t H5B2_cache_internal_clear(H5F_t *f, H5B2_internal_t *i, hbool_t destroy); -static herr_t H5B2_cache_internal_notify(H5AC_notify_action_t action, H5B2_internal_t *internal); -static herr_t H5B2_cache_internal_size(const H5F_t *f, const H5B2_internal_t *i, size_t *size_ptr); -static H5B2_leaf_t *H5B2_cache_leaf_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); -static herr_t H5B2_cache_leaf_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B2_leaf_t *l, unsigned UNUSED * flags_ptr); -static herr_t H5B2_cache_leaf_dest(H5F_t *f, H5B2_leaf_t *leaf); -static herr_t H5B2_cache_leaf_clear(H5F_t *f, H5B2_leaf_t *l, hbool_t destroy); -static herr_t H5B2_cache_leaf_notify(H5AC_notify_action_t action, H5B2_leaf_t *leaf); -static herr_t H5B2_cache_leaf_size(const H5F_t *f, const H5B2_leaf_t *l, size_t *size_ptr); +static H5B2_hdr_t *H5B2__cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); +static herr_t H5B2__cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B2_hdr_t *hdr, unsigned UNUSED * flags_ptr); +static herr_t H5B2__cache_hdr_dest(H5F_t *f, H5B2_hdr_t *hdr); +static herr_t H5B2__cache_hdr_clear(H5F_t *f, H5B2_hdr_t *hdr, hbool_t destroy); +static herr_t H5B2__cache_hdr_notify(H5AC_notify_action_t action, H5B2_hdr_t *hdr); +static herr_t H5B2__cache_hdr_size(const H5F_t *f, const H5B2_hdr_t *hdr, size_t *size_ptr); +static H5B2_internal_t *H5B2__cache_internal_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); +static herr_t H5B2__cache_internal_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B2_internal_t *i, unsigned UNUSED * flags_ptr); +static herr_t H5B2__cache_internal_dest(H5F_t *f, H5B2_internal_t *internal); +static herr_t H5B2__cache_internal_clear(H5F_t *f, H5B2_internal_t *i, hbool_t destroy); +static herr_t H5B2__cache_internal_notify(H5AC_notify_action_t action, H5B2_internal_t *internal); +static herr_t H5B2__cache_internal_size(const H5F_t *f, const H5B2_internal_t *i, size_t *size_ptr); +static H5B2_leaf_t *H5B2__cache_leaf_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); +static herr_t H5B2__cache_leaf_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B2_leaf_t *l, unsigned UNUSED * flags_ptr); +static herr_t H5B2__cache_leaf_dest(H5F_t *f, H5B2_leaf_t *leaf); +static herr_t H5B2__cache_leaf_clear(H5F_t *f, H5B2_leaf_t *l, hbool_t destroy); +static herr_t H5B2__cache_leaf_notify(H5AC_notify_action_t action, H5B2_leaf_t *leaf); +static herr_t H5B2__cache_leaf_size(const H5F_t *f, const H5B2_leaf_t *l, size_t *size_ptr); /*********************/ @@ -96,34 +96,34 @@ static herr_t H5B2_cache_leaf_size(const H5F_t *f, const H5B2_leaf_t *l, size_t /* H5B2 inherits cache-like properties from H5AC */ const H5AC_class_t H5AC_BT2_HDR[1] = {{ H5AC_BT2_HDR_ID, - (H5AC_load_func_t)H5B2_cache_hdr_load, - (H5AC_flush_func_t)H5B2_cache_hdr_flush, - (H5AC_dest_func_t)H5B2_cache_hdr_dest, - (H5AC_clear_func_t)H5B2_cache_hdr_clear, - (H5AC_notify_func_t)H5B2_cache_hdr_notify, - (H5AC_size_func_t)H5B2_cache_hdr_size, + (H5AC_load_func_t)H5B2__cache_hdr_load, + (H5AC_flush_func_t)H5B2__cache_hdr_flush, + (H5AC_dest_func_t)H5B2__cache_hdr_dest, + (H5AC_clear_func_t)H5B2__cache_hdr_clear, + (H5AC_notify_func_t)H5B2__cache_hdr_notify, + (H5AC_size_func_t)H5B2__cache_hdr_size, }}; /* H5B2 inherits cache-like properties from H5AC */ const H5AC_class_t H5AC_BT2_INT[1] = {{ H5AC_BT2_INT_ID, - (H5AC_load_func_t)H5B2_cache_internal_load, - (H5AC_flush_func_t)H5B2_cache_internal_flush, - (H5AC_dest_func_t)H5B2_cache_internal_dest, - (H5AC_clear_func_t)H5B2_cache_internal_clear, - (H5AC_notify_func_t)H5B2_cache_internal_notify, - (H5AC_size_func_t)H5B2_cache_internal_size, + (H5AC_load_func_t)H5B2__cache_internal_load, + (H5AC_flush_func_t)H5B2__cache_internal_flush, + (H5AC_dest_func_t)H5B2__cache_internal_dest, + (H5AC_clear_func_t)H5B2__cache_internal_clear, + (H5AC_notify_func_t)H5B2__cache_internal_notify, + (H5AC_size_func_t)H5B2__cache_internal_size, }}; /* H5B2 inherits cache-like properties from H5AC */ const H5AC_class_t H5AC_BT2_LEAF[1] = {{ H5AC_BT2_LEAF_ID, - (H5AC_load_func_t)H5B2_cache_leaf_load, - (H5AC_flush_func_t)H5B2_cache_leaf_flush, - (H5AC_dest_func_t)H5B2_cache_leaf_dest, - (H5AC_clear_func_t)H5B2_cache_leaf_clear, - (H5AC_notify_func_t)H5B2_cache_leaf_notify, - (H5AC_size_func_t)H5B2_cache_leaf_size, + (H5AC_load_func_t)H5B2__cache_leaf_load, + (H5AC_flush_func_t)H5B2__cache_leaf_flush, + (H5AC_dest_func_t)H5B2__cache_leaf_dest, + (H5AC_clear_func_t)H5B2__cache_leaf_clear, + (H5AC_notify_func_t)H5B2__cache_leaf_notify, + (H5AC_size_func_t)H5B2__cache_leaf_size, }}; @@ -139,7 +139,7 @@ const H5AC_class_t H5AC_BT2_LEAF[1] = {{ /*------------------------------------------------------------------------- - * Function: H5B2_cache_hdr_load + * Function: H5B2__cache_hdr_load * * Purpose: Loads a B-tree header from the disk. * @@ -153,7 +153,7 @@ const H5AC_class_t H5AC_BT2_LEAF[1] = {{ *------------------------------------------------------------------------- */ static H5B2_hdr_t * -H5B2_cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) +H5B2__cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) { H5B2_hdr_t *hdr = NULL; /* B-tree header */ H5B2_hdr_cache_ud_t *udata = (H5B2_hdr_cache_ud_t *)_udata; @@ -168,7 +168,7 @@ H5B2_cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) const uint8_t *p; /* Pointer into raw data buffer */ H5B2_hdr_t *ret_value; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check arguments */ HDassert(f); @@ -259,11 +259,11 @@ done: HDONE_ERROR(H5E_BTREE, H5E_CANTRELEASE, NULL, "can't release v2 B-tree header") FUNC_LEAVE_NOAPI(ret_value) -} /* end H5B2_cache_hdr_load() */ /*lint !e818 Can't make udata a pointer to const */ +} /* end H5B2__cache_hdr_load() */ /*lint !e818 Can't make udata a pointer to const */ /*------------------------------------------------------------------------- - * Function: H5B2_cache_hdr_flush + * Function: H5B2__cache_hdr_flush * * Purpose: Flushes a dirty B-tree header to disk. * @@ -276,14 +276,14 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B2_cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, +H5B2__cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B2_hdr_t *hdr, unsigned UNUSED * flags_ptr) { H5WB_t *wb = NULL; /* Wrapped buffer for header data */ uint8_t hdr_buf[H5B2_HDR_BUF_SIZE]; /* Buffer for header */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* check arguments */ HDassert(f); @@ -375,7 +375,7 @@ H5B2_cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, } /* end if */ if(destroy) - if(H5B2_cache_hdr_dest(f, hdr) < 0) + if(H5B2__cache_hdr_dest(f, hdr) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree header") done: @@ -384,11 +384,11 @@ done: HDONE_ERROR(H5E_BTREE, H5E_CLOSEERROR, FAIL, "can't close wrapped buffer") FUNC_LEAVE_NOAPI(ret_value) -} /* H5B2_cache_hdr_flush() */ +} /* H5B2__cache_hdr_flush() */ /*------------------------------------------------------------------------- - * Function: H5B2_cache_hdr_dest + * Function: H5B2__cache_hdr_dest * * Purpose: Destroys a B-tree header in memory. * @@ -401,11 +401,11 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B2_cache_hdr_dest(H5F_t *f, H5B2_hdr_t *hdr) +H5B2__cache_hdr_dest(H5F_t *f, H5B2_hdr_t *hdr) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check arguments */ HDassert(hdr); @@ -428,11 +428,11 @@ H5B2_cache_hdr_dest(H5F_t *f, H5B2_hdr_t *hdr) done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5B2_cache_hdr_dest() */ +} /* end H5B2__cache_hdr_dest() */ /*------------------------------------------------------------------------- - * Function: H5B2_cache_hdr_clear + * Function: H5B2__cache_hdr_clear * * Purpose: Mark a B-tree header in memory as non-dirty. * @@ -445,11 +445,11 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B2_cache_hdr_clear(H5F_t *f, H5B2_hdr_t *hdr, hbool_t destroy) +H5B2__cache_hdr_clear(H5F_t *f, H5B2_hdr_t *hdr, hbool_t destroy) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* * Check arguments. @@ -460,16 +460,16 @@ H5B2_cache_hdr_clear(H5F_t *f, H5B2_hdr_t *hdr, hbool_t destroy) hdr->cache_info.is_dirty = FALSE; if(destroy) - if(H5B2_cache_hdr_dest(f, hdr) < 0) + if(H5B2__cache_hdr_dest(f, hdr) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree header") done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5B2_cache_hdr_clear() */ +} /* end H5B2__cache_hdr_clear() */ /*------------------------------------------------------------------------- - * Function: H5B2_cache_hdr_notify + * Function: H5B2__cache_hdr_notify * * Purpose: Handle cache action notifications * @@ -482,11 +482,11 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B2_cache_hdr_notify(H5AC_notify_action_t action, H5B2_hdr_t *hdr) +H5B2__cache_hdr_notify(H5AC_notify_action_t action, H5B2_hdr_t *hdr) { herr_t ret_value = SUCCEED; - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* * Check arguments. @@ -518,11 +518,11 @@ H5B2_cache_hdr_notify(H5AC_notify_action_t action, H5B2_hdr_t *hdr) done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5B2_cache_hdr_notify() */ +} /* end H5B2__cache_hdr_notify() */ /*------------------------------------------------------------------------- - * Function: H5B2_cache_hdr_size + * Function: H5B2__cache_hdr_size * * Purpose: Compute the size in bytes of a B-tree header * on disk, and return it in *size_ptr. On failure, @@ -537,7 +537,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B2_cache_hdr_size(const H5F_t UNUSED *f, const H5B2_hdr_t *hdr, size_t *size_ptr) +H5B2__cache_hdr_size(const H5F_t UNUSED *f, const H5B2_hdr_t *hdr, size_t *size_ptr) { FUNC_ENTER_NOAPI_NOINIT_NOERR @@ -550,11 +550,11 @@ H5B2_cache_hdr_size(const H5F_t UNUSED *f, const H5B2_hdr_t *hdr, size_t *size_p *size_ptr = hdr->hdr_size; FUNC_LEAVE_NOAPI(SUCCEED) -} /* H5B2_cache_hdr_size() */ +} /* H5B2__cache_hdr_size() */ /*------------------------------------------------------------------------- - * Function: H5B2_cache_internal_load + * Function: H5B2__cache_internal_load * * Purpose: Loads a B-tree internal node from the disk. * @@ -568,7 +568,7 @@ H5B2_cache_hdr_size(const H5F_t UNUSED *f, const H5B2_hdr_t *hdr, size_t *size_p *------------------------------------------------------------------------- */ static H5B2_internal_t * -H5B2_cache_internal_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) +H5B2__cache_internal_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) { H5B2_internal_cache_ud_t *udata = (H5B2_internal_cache_ud_t *)_udata; /* Pointer to user data */ H5B2_internal_t *internal = NULL; /* Internal node read */ @@ -580,7 +580,7 @@ H5B2_cache_internal_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) unsigned u; /* Local index variable */ H5B2_internal_t *ret_value; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check arguments */ HDassert(f); @@ -685,11 +685,11 @@ done: HDONE_ERROR(H5E_BTREE, H5E_CANTFREE, NULL, "unable to destroy B-tree internal node") FUNC_LEAVE_NOAPI(ret_value) -} /* H5B2_cache_internal_load() */ /*lint !e818 Can't make udata a pointer to const */ +} /* H5B2__cache_internal_load() */ /*lint !e818 Can't make udata a pointer to const */ /*------------------------------------------------------------------------- - * Function: H5B2_cache_internal_flush + * Function: H5B2__cache_internal_flush * * Purpose: Flushes a dirty B-tree internal node to disk. * @@ -702,11 +702,11 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B2_cache_internal_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B2_internal_t *internal, unsigned UNUSED * flags_ptr) +H5B2__cache_internal_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B2_internal_t *internal, unsigned UNUSED * flags_ptr) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* check arguments */ HDassert(f); @@ -777,16 +777,16 @@ H5B2_cache_internal_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr } /* end if */ if(destroy) - if(H5B2_cache_internal_dest(f, internal) < 0) + if(H5B2__cache_internal_dest(f, internal) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree internal node") done: FUNC_LEAVE_NOAPI(ret_value) -} /* H5B2_cache_internal_flush() */ +} /* H5B2__cache_internal_flush() */ /*------------------------------------------------------------------------- - * Function: H5B2_cache_internal_dest + * Function: H5B2__cache_internal_dest * * Purpose: Destroys a B-tree internal node in memory. * @@ -799,11 +799,11 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B2_cache_internal_dest(H5F_t *f, H5B2_internal_t *internal) +H5B2__cache_internal_dest(H5F_t *f, H5B2_internal_t *internal) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check arguments */ HDassert(f); @@ -851,11 +851,11 @@ H5B2_cache_internal_dest(H5F_t *f, H5B2_internal_t *internal) done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5B2_cache_internal_dest() */ +} /* end H5B2__cache_internal_dest() */ /*------------------------------------------------------------------------- - * Function: H5B2_cache_internal_clear + * Function: H5B2__cache_internal_clear * * Purpose: Mark a B-tree internal node in memory as non-dirty. * @@ -868,11 +868,11 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B2_cache_internal_clear(H5F_t *f, H5B2_internal_t *internal, hbool_t destroy) +H5B2__cache_internal_clear(H5F_t *f, H5B2_internal_t *internal, hbool_t destroy) { herr_t ret_value = SUCCEED; - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* * Check arguments. @@ -883,16 +883,16 @@ H5B2_cache_internal_clear(H5F_t *f, H5B2_internal_t *internal, hbool_t destroy) internal->cache_info.is_dirty = FALSE; if(destroy) - if(H5B2_cache_internal_dest(f, internal) < 0) + if(H5B2__cache_internal_dest(f, internal) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree internal node") done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5B2_cache_internal_clear() */ +} /* end H5B2__cache_internal_clear() */ /*------------------------------------------------------------------------- - * Function: H5B2_cache_internal_notify + * Function: H5B2__cache_internal_notify * * Purpose: Handle cache action notifications * @@ -905,7 +905,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B2_cache_internal_notify(H5AC_notify_action_t action, H5B2_internal_t *internal) +H5B2__cache_internal_notify(H5AC_notify_action_t action, H5B2_internal_t *internal) { herr_t ret_value = SUCCEED; @@ -941,11 +941,14 @@ H5B2_cache_internal_notify(H5AC_notify_action_t action, H5B2_internal_t *interna done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5B2_cache_internal_notify() */ +} /* end H5B2__cache_internal_notify() */ /*------------------------------------------------------------------------- * Function: H5B2_cache_internal_size +======= + * Function: H5B2__cache_internal_size +>>>>>>> .merge-right.r23988 * * Purpose: Compute the size in bytes of a B-tree internal node * on disk, and return it in *size_ptr. On failure, @@ -960,9 +963,9 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B2_cache_internal_size(const H5F_t UNUSED *f, const H5B2_internal_t *internal, size_t *size_ptr) +H5B2__cache_internal_size(const H5F_t UNUSED *f, const H5B2_internal_t *internal, size_t *size_ptr) { - FUNC_ENTER_NOAPI_NOINIT_NOERR + FUNC_ENTER_STATIC_NOERR /* check arguments */ HDassert(internal); @@ -973,11 +976,11 @@ H5B2_cache_internal_size(const H5F_t UNUSED *f, const H5B2_internal_t *internal, *size_ptr = internal->hdr->node_size; FUNC_LEAVE_NOAPI(SUCCEED) -} /* H5B2_cache_internal_size() */ +} /* H5B2__cache_internal_size() */ /*------------------------------------------------------------------------- - * Function: H5B2_cache_leaf_load + * Function: H5B2__cache_leaf_load * * Purpose: Loads a B-tree leaf from the disk. * @@ -991,7 +994,7 @@ H5B2_cache_internal_size(const H5F_t UNUSED *f, const H5B2_internal_t *internal, *------------------------------------------------------------------------- */ static H5B2_leaf_t * -H5B2_cache_leaf_load(H5F_t UNUSED *f, hid_t dxpl_id, haddr_t addr, void *_udata) +H5B2__cache_leaf_load(H5F_t UNUSED *f, hid_t dxpl_id, haddr_t addr, void *_udata) { H5B2_leaf_cache_ud_t *udata = (H5B2_leaf_cache_ud_t *)_udata; H5B2_leaf_t *leaf = NULL; /* Pointer to lead node loaded */ @@ -1002,7 +1005,7 @@ H5B2_cache_leaf_load(H5F_t UNUSED *f, hid_t dxpl_id, haddr_t addr, void *_udata) unsigned u; /* Local index variable */ H5B2_leaf_t *ret_value; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check arguments */ HDassert(f); @@ -1087,11 +1090,11 @@ done: HDONE_ERROR(H5E_BTREE, H5E_CANTFREE, NULL, "unable to destroy B-tree leaf node") FUNC_LEAVE_NOAPI(ret_value) -} /* H5B2_cache_leaf_load() */ /*lint !e818 Can't make udata a pointer to const */ +} /* H5B2__cache_leaf_load() */ /*lint !e818 Can't make udata a pointer to const */ /*------------------------------------------------------------------------- - * Function: H5B2_cache_leaf_flush + * Function: H5B2__cache_leaf_flush * * Purpose: Flushes a dirty B-tree leaf node to disk. * @@ -1104,11 +1107,11 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B2_cache_leaf_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B2_leaf_t *leaf, unsigned UNUSED * flags_ptr) +H5B2__cache_leaf_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B2_leaf_t *leaf, unsigned UNUSED * flags_ptr) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* check arguments */ HDassert(f); @@ -1165,16 +1168,16 @@ H5B2_cache_leaf_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5 } /* end if */ if(destroy) - if(H5B2_cache_leaf_dest(f, leaf) < 0) + if(H5B2__cache_leaf_dest(f, leaf) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree leaf node") done: FUNC_LEAVE_NOAPI(ret_value) -} /* H5B2_cache_leaf_flush() */ +} /* H5B2__cache_leaf_flush() */ /*------------------------------------------------------------------------- - * Function: H5B2_cache_leaf_dest + * Function: H5B2__cache_leaf_dest * * Purpose: Destroys a B-tree leaf node in memory. * @@ -1187,11 +1190,11 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B2_cache_leaf_dest(H5F_t *f, H5B2_leaf_t *leaf) +H5B2__cache_leaf_dest(H5F_t *f, H5B2_leaf_t *leaf) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check arguments */ HDassert(f); @@ -1239,11 +1242,11 @@ H5B2_cache_leaf_dest(H5F_t *f, H5B2_leaf_t *leaf) done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5B2_cache_leaf_dest() */ +} /* end H5B2__cache_leaf_dest() */ /*------------------------------------------------------------------------- - * Function: H5B2_cache_leaf_clear + * Function: H5B2__cache_leaf_clear * * Purpose: Mark a B-tree leaf node in memory as non-dirty. * @@ -1256,11 +1259,11 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B2_cache_leaf_clear(H5F_t *f, H5B2_leaf_t *leaf, hbool_t destroy) +H5B2__cache_leaf_clear(H5F_t *f, H5B2_leaf_t *leaf, hbool_t destroy) { herr_t ret_value = SUCCEED; - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* * Check arguments. @@ -1271,16 +1274,16 @@ H5B2_cache_leaf_clear(H5F_t *f, H5B2_leaf_t *leaf, hbool_t destroy) leaf->cache_info.is_dirty = FALSE; if(destroy) - if(H5B2_cache_leaf_dest(f, leaf) < 0) + if(H5B2__cache_leaf_dest(f, leaf) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree leaf node") done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5B2_cache_leaf_clear() */ +} /* end H5B2__cache_leaf_clear() */ /*------------------------------------------------------------------------- - * Function: H5B2_cache_leaf_notify + * Function: H5B2__cache_leaf_notify * * Purpose: Handle cache action notifications * @@ -1293,7 +1296,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B2_cache_leaf_notify(H5AC_notify_action_t action, H5B2_leaf_t *leaf) +H5B2__cache_leaf_notify(H5AC_notify_action_t action, H5B2_leaf_t *leaf) { herr_t ret_value = SUCCEED; @@ -1329,11 +1332,11 @@ H5B2_cache_leaf_notify(H5AC_notify_action_t action, H5B2_leaf_t *leaf) done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5B2_cache_leaf_notify() */ +} /* end H5B2__cache_leaf_notify() */ /*------------------------------------------------------------------------- - * Function: H5B2_cache_leaf_size + * Function: H5B2__cache_leaf_size * * Purpose: Compute the size in bytes of a B-tree leaf node * on disk, and return it in *size_ptr. On failure, @@ -1348,9 +1351,9 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B2_cache_leaf_size(const H5F_t UNUSED *f, const H5B2_leaf_t *leaf, size_t *size_ptr) +H5B2__cache_leaf_size(const H5F_t UNUSED *f, const H5B2_leaf_t *leaf, size_t *size_ptr) { - FUNC_ENTER_NOAPI_NOERR + FUNC_ENTER_STATIC_NOERR /* check arguments */ HDassert(leaf); @@ -1361,5 +1364,5 @@ H5B2_cache_leaf_size(const H5F_t UNUSED *f, const H5B2_leaf_t *leaf, size_t *siz *size_ptr = leaf->hdr->node_size; FUNC_LEAVE_NOAPI(SUCCEED) -} /* H5B2_cache_leaf_size() */ +} /* H5B2__cache_leaf_size() */ diff --git a/src/H5B2stat.c b/src/H5B2stat.c index d536456..34b809c 100644 --- a/src/H5B2stat.c +++ b/src/H5B2stat.c @@ -85,7 +85,7 @@ herr_t H5B2_stat_info(H5B2_t *bt2, H5B2_stat_t *info) { - FUNC_ENTER_NOAPI_NOERR + FUNC_ENTER_NOAPI_NOINIT_NOERR /* Check arguments. */ HDassert(info); diff --git a/src/H5Bcache.c b/src/H5Bcache.c index dab2cf9..0afe251 100644 --- a/src/H5Bcache.c +++ b/src/H5Bcache.c @@ -55,12 +55,12 @@ /********************/ /* Metadata cache callbacks */ -static H5B_t *H5B_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); -static herr_t H5B_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B_t *b, unsigned UNUSED * flags_ptr); -static herr_t H5B_dest(H5F_t *f, H5B_t *bt); -static herr_t H5B_clear(H5F_t *f, H5B_t *b, hbool_t destroy); -static herr_t H5B_compute_size(const H5F_t *f, const H5B_t *bt, size_t *size_ptr); -static herr_t H5B_notify(H5AC_notify_action_t action, H5B_t *bt); +static H5B_t *H5B__load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); +static herr_t H5B__flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B_t *b, unsigned UNUSED * flags_ptr); +static herr_t H5B__dest(H5F_t *f, H5B_t *bt); +static herr_t H5B__clear(H5F_t *f, H5B_t *b, hbool_t destroy); +static herr_t H5B__compute_size(const H5F_t *f, const H5B_t *bt, size_t *size_ptr); +static herr_t H5B__notify(H5AC_notify_action_t action, H5B_t *bt); /*********************/ @@ -70,12 +70,12 @@ static herr_t H5B_notify(H5AC_notify_action_t action, H5B_t *bt); /* H5B inherits cache-like properties from H5AC */ const H5AC_class_t H5AC_BT[1] = {{ H5AC_BT_ID, - (H5AC_load_func_t)H5B_load, - (H5AC_flush_func_t)H5B_flush, - (H5AC_dest_func_t)H5B_dest, - (H5AC_clear_func_t)H5B_clear, - (H5AC_notify_func_t)H5B_notify, - (H5AC_size_func_t)H5B_compute_size, + (H5AC_load_func_t)H5B__load, + (H5AC_flush_func_t)H5B__flush, + (H5AC_dest_func_t)H5B__dest, + (H5AC_clear_func_t)H5B__clear, + (H5AC_notify_func_t)H5B__notify, + (H5AC_size_func_t)H5B__compute_size, }}; /*******************/ @@ -85,7 +85,7 @@ const H5AC_class_t H5AC_BT[1] = {{ /*------------------------------------------------------------------------- - * Function: H5B_load + * Function: H5B__load * * Purpose: Loads a B-tree node from the disk. * @@ -99,7 +99,7 @@ const H5AC_class_t H5AC_BT[1] = {{ *------------------------------------------------------------------------- */ static H5B_t * -H5B_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) +H5B__load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) { H5B_t *bt = NULL; /* Pointer to the deserialized B-tree node */ H5B_cache_ud_t *udata = (H5B_cache_ud_t *)_udata; /* User data for callback */ @@ -109,7 +109,7 @@ H5B_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) unsigned u; /* Local index variable */ H5B_t *ret_value; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* Check arguments */ HDassert(f); @@ -197,11 +197,11 @@ done: HDONE_ERROR(H5E_BTREE, H5E_CANTFREE, NULL, "unable to destroy B-tree node") FUNC_LEAVE_NOAPI(ret_value) -} /* end H5B_load() */ /*lint !e818 Can't make udata a pointer to const */ +} /* end H5B__load() */ /*lint !e818 Can't make udata a pointer to const */ /*------------------------------------------------------------------------- - * Function: H5B_flush + * Function: H5B__flush * * Purpose: Flushes a dirty B-tree node to disk. * @@ -214,12 +214,12 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B_t *bt, unsigned UNUSED * flags_ptr) +H5B__flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B_t *bt, unsigned UNUSED * flags_ptr) { H5B_shared_t *shared; /* Pointer to shared B-tree info */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* check arguments */ HDassert(f); @@ -283,16 +283,16 @@ H5B_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B_t *bt, uns } /* end if */ if(destroy) - if(H5B_dest(f, bt) < 0) + if(H5B__dest(f, bt) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree node") done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5B_flush() */ +} /* end H5B__flush() */ /*------------------------------------------------------------------------- - * Function: H5B_dest + * Function: H5B__dest * * Purpose: Destroys a B-tree node in memory. * @@ -305,11 +305,11 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B_dest(H5F_t *f, H5B_t *bt) +H5B__dest(H5F_t *f, H5B_t *bt) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* * Check arguments. @@ -341,11 +341,11 @@ H5B_dest(H5F_t *f, H5B_t *bt) done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5B_dest() */ +} /* end H5B__dest() */ /*------------------------------------------------------------------------- - * Function: H5B_clear + * Function: H5B__clear * * Purpose: Mark a B-tree node in memory as non-dirty. * @@ -358,11 +358,11 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B_clear(H5F_t *f, H5B_t *bt, hbool_t destroy) +H5B__clear(H5F_t *f, H5B_t *bt, hbool_t destroy) { herr_t ret_value = SUCCEED; - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* * Check arguments. @@ -373,16 +373,16 @@ H5B_clear(H5F_t *f, H5B_t *bt, hbool_t destroy) bt->cache_info.is_dirty = FALSE; if(destroy) - if(H5B_dest(f, bt) < 0) + if(H5B__dest(f, bt) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree node") done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5B_clear() */ +} /* end H5B__clear() */ /*------------------------------------------------------------------------- - * Function: H5B_notify + * Function: H5B__notify * * Purpose: Handle cache action notifications * @@ -395,12 +395,12 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B_notify(H5AC_notify_action_t action, H5B_t *bt) +H5B__notify(H5AC_notify_action_t action, H5B_t *bt) { H5B_shared_t *shared; /* Pointer to shared B-tree info */ herr_t ret_value = SUCCEED; - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* * Check arguments. @@ -434,11 +434,11 @@ H5B_notify(H5AC_notify_action_t action, H5B_t *bt) done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5B_notify() */ +} /* end H5B__notify() */ /*------------------------------------------------------------------------- - * Function: H5B_compute_size + * Function: H5B__compute_size * * Purpose: Compute the size in bytes of the specified instance of * H5B_t on disk, and return it in *len_ptr. On failure, @@ -452,7 +452,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5B_compute_size(const H5F_t UNUSED *f, const H5B_t *bt, size_t *size_ptr) +H5B__compute_size(const H5F_t UNUSED *f, const H5B_t *bt, size_t *size_ptr) { H5B_shared_t *shared; /* Pointer to shared B-tree info */ @@ -471,5 +471,5 @@ H5B_compute_size(const H5F_t UNUSED *f, const H5B_t *bt, size_t *size_ptr) *size_ptr = shared->sizeof_rnode; FUNC_LEAVE_NOAPI(SUCCEED) -} /* H5B_compute_size() */ +} /* H5B__compute_size() */ diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index 37e1122..0b426cf 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -313,7 +313,6 @@ H5D__chunk_direct_write(const H5D_t *dset, hid_t dxpl_id, uint32_t filters, hsiz const H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk); /*raw data chunk cache */ int space_ndims; /* Dataset's space rank */ hsize_t space_dim[H5O_LAYOUT_NDIMS]; /* Dataset's dataspace dimensions */ - H5FD_t *lf; herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC_TAG(dxpl_id, dset->oloc.addr, FAIL) diff --git a/src/H5Eprivate.h b/src/H5Eprivate.h index b2ca5eb..0e6def6 100644 --- a/src/H5Eprivate.h +++ b/src/H5Eprivate.h @@ -39,8 +39,9 @@ typedef struct H5E_t H5E_t; * (Shouldn't need to be used outside this header file) */ #define HCOMMON_ERROR(maj, min, ...) \ - HERROR(maj, min, __VA_ARGS__); \ - err_occurred = TRUE; + HERROR(maj, min, __VA_ARGS__); \ + err_occurred = TRUE; \ + err_occurred = err_occurred; /* Shut GCC warnings up! */ /* * HDONE_ERROR macro, used to facilitate error reporting between a diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c index f907e0a..e5775ab 100644 --- a/src/H5FDmulti.c +++ b/src/H5FDmulti.c @@ -1783,7 +1783,6 @@ H5FD_multi_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, htri_t prop_exists = FALSE; /* Whether the multi VFD DXPL property already exists */ H5FD_mem_t mt, mmt, hi = H5FD_MEM_DEFAULT; haddr_t start_addr = 0; - static const char *func = "H5FD_multi_read"; /* Function Name for error reporting */ dxpl_id = dxpl_id; /* Suppress compiler warning */ /* Clear the error stack */ @@ -1836,7 +1835,6 @@ H5FD_multi_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, htri_t prop_exists = FALSE; /* Whether the multi VFD DXPL property already exists */ H5FD_mem_t mt, mmt, hi = H5FD_MEM_DEFAULT; haddr_t start_addr = 0; - static const char *func = "H5FD_multi_read"; /* Function Name for error reporting */ dxpl_id = dxpl_id; /* Suppress compiler warning */ /* Clear the error stack */ diff --git a/src/H5G.c b/src/H5G.c index 25e1949..7cf5a91 100644 --- a/src/H5G.c +++ b/src/H5G.c @@ -495,14 +495,7 @@ done: hid_t H5Gget_create_plist(hid_t group_id) { - H5O_linfo_t linfo; /* Link info message */ - htri_t ginfo_exists; - htri_t linfo_exists; - htri_t pline_exists; H5G_t *group = NULL; - H5P_genplist_t *gcpl_plist; - H5P_genplist_t *new_plist; - hid_t new_gcpl_id = FAIL; hid_t ret_value = FAIL; FUNC_ENTER_API(FAIL) diff --git a/src/H5Gent.c b/src/H5Gent.c index 32eaadf..4bb5fcf 100644 --- a/src/H5Gent.c +++ b/src/H5Gent.c @@ -361,7 +361,7 @@ H5G__ent_copy(H5G_entry_t *dst, const H5G_entry_t *src, H5_copy_depth_t depth) void H5G__ent_reset(H5G_entry_t *ent) { - FUNC_ENTER_PACKAGE + FUNC_ENTER_PACKAGE_NOERR /* Check arguments */ HDassert(ent); diff --git a/src/H5Pocpl.c b/src/H5Pocpl.c index 2166020..32f6a1b 100644 --- a/src/H5Pocpl.c +++ b/src/H5Pocpl.c @@ -1195,7 +1195,6 @@ htri_t H5P_filter_in_pline(H5P_genplist_t *plist, H5Z_filter_t id) { H5O_pline_t pline; /* Filter pipeline */ - H5Z_filter_info_t *filter; /* Pointer to filter information */ htri_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) diff --git a/src/H5dbg.c b/src/H5dbg.c index 5441895..2039a51 100644 --- a/src/H5dbg.c +++ b/src/H5dbg.c @@ -83,7 +83,7 @@ H5_buffer_dump(FILE *stream, int indent, const uint8_t *buf, { size_t u, v; /* Local index variable */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_NOAPI_NOINIT_NOERR /* * Check arguments. -- cgit v0.12