summaryrefslogtreecommitdiffstats
path: root/src/H5B.c
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2013-08-30 17:05:42 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2013-08-30 17:05:42 (GMT)
commita3e0aecb2235e487eae80de4dd4c074bd2dabc0f (patch)
tree78599452e6871eca8e444b5878efc6b9b1076a9b /src/H5B.c
parent7a0f38d807b4f8b10608dd0d860b625d98845498 (diff)
downloadhdf5-a3e0aecb2235e487eae80de4dd4c074bd2dabc0f.zip
hdf5-a3e0aecb2235e487eae80de4dd4c074bd2dabc0f.tar.gz
hdf5-a3e0aecb2235e487eae80de4dd4c074bd2dabc0f.tar.bz2
[svn-r24087] Rename the private H5RC (reference count) module to H5UC (Use Count).
This is needed to avoid a conflict with the Read Context object to be introduced in another Project. No impact on users, since this is a private module, and low for developers as the RC module use is very sparse in the library. Tested with h5committest.
Diffstat (limited to 'src/H5B.c')
-rw-r--r--src/H5B.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/H5B.c b/src/H5B.c
index 27b3609..286f09d 100644
--- a/src/H5B.c
+++ b/src/H5B.c
@@ -243,8 +243,8 @@ H5B_create(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, void *udata,
bt->nchildren = 0;
if(NULL == (bt->rc_shared = (type->get_shared)(f, udata)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree node buffer")
- H5RC_INC(bt->rc_shared);
- shared=(H5B_shared_t *)H5RC_GET_OBJ(bt->rc_shared);
+ H5UC_INC(bt->rc_shared);
+ shared=(H5B_shared_t *)H5UC_GET_OBJ(bt->rc_shared);
HDassert(shared);
if(NULL == (bt->native = H5FL_BLK_MALLOC(native_block, shared->sizeof_keys)) ||
NULL == (bt->child = H5FL_SEQ_MALLOC(haddr_t, (size_t)shared->two_k)))
@@ -304,7 +304,7 @@ htri_t
H5B_find(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr, void *udata)
{
H5B_t *bt = NULL;
- H5RC_t *rc_shared; /* Ref-counted shared info */
+ H5UC_t *rc_shared; /* Ref-counted shared info */
H5B_shared_t *shared; /* Pointer to shared B-tree info */
H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
unsigned idx = 0, lt = 0, rt; /* Final, left & right key indices */
@@ -326,7 +326,7 @@ H5B_find(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr, void *u
/* Get shared info for B-tree */
if(NULL == (rc_shared = (type->get_shared)(f, udata)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object")
- shared = (H5B_shared_t *)H5RC_GET_OBJ(rc_shared);
+ shared = (H5B_shared_t *)H5UC_GET_OBJ(rc_shared);
HDassert(shared);
/*
@@ -422,7 +422,7 @@ H5B_split(H5F_t *f, hid_t dxpl_id, H5B_ins_ud_t *bt_ud, unsigned idx,
/*
* Initialize variables.
*/
- shared = (H5B_shared_t *)H5RC_GET_OBJ(bt_ud->bt->rc_shared);
+ shared = (H5B_shared_t *)H5UC_GET_OBJ(bt_ud->bt->rc_shared);
HDassert(shared);
HDassert(bt_ud->bt->nchildren == shared->two_k);
@@ -576,7 +576,7 @@ H5B_insert(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr,
H5B_ins_ud_t bt_ud = H5B_INS_UD_T_NULL; /* (Old) root node */
H5B_ins_ud_t split_bt_ud = H5B_INS_UD_T_NULL; /* Split B-tree node */
H5B_t *new_root_bt = NULL; /* New root node */
- H5RC_t *rc_shared; /* Ref-counted shared info */
+ H5UC_t *rc_shared; /* Ref-counted shared info */
H5B_shared_t *shared; /* Pointer to shared B-tree info */
H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
H5B_ins_t my_ins = H5B_INS_ERROR;
@@ -593,7 +593,7 @@ H5B_insert(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr,
/* Get shared info for B-tree */
if(NULL == (rc_shared = (type->get_shared)(f, udata)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object")
- shared = (H5B_shared_t *)H5RC_GET_OBJ(rc_shared);
+ shared = (H5B_shared_t *)H5UC_GET_OBJ(rc_shared);
HDassert(shared);
/* Protect the root node */
@@ -726,7 +726,7 @@ H5B_insert_child(H5B_t *bt, unsigned *bt_flags, unsigned idx,
HDassert(bt);
HDassert(bt_flags);
HDassert(H5F_addr_defined(child));
- shared = (H5B_shared_t *)H5RC_GET_OBJ(bt->rc_shared);
+ shared = (H5B_shared_t *)H5UC_GET_OBJ(bt->rc_shared);
HDassert(shared);
HDassert(bt->nchildren < shared->two_k);
@@ -812,7 +812,7 @@ H5B_insert_helper(H5F_t *f, hid_t dxpl_id, H5B_ins_ud_t *bt_ud,
H5B_ins_ud_t *split_bt_ud/*out*/)
{
H5B_t *bt; /* Convenience pointer to B-tree */
- H5RC_t *rc_shared; /* Ref-counted shared info */
+ H5UC_t *rc_shared; /* Ref-counted shared info */
H5B_shared_t *shared; /* Pointer to shared B-tree info */
H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
unsigned lt = 0, idx = 0, rt; /* Left, final & right index values */
@@ -852,7 +852,7 @@ H5B_insert_helper(H5F_t *f, hid_t dxpl_id, H5B_ins_ud_t *bt_ud,
/* Get shared info for B-tree */
if(NULL == (rc_shared = (type->get_shared)(f, udata)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, H5B_INS_ERROR, "can't retrieve B-tree's shared ref. count object")
- shared = (H5B_shared_t *)H5RC_GET_OBJ(rc_shared);
+ shared = (H5B_shared_t *)H5UC_GET_OBJ(rc_shared);
HDassert(shared);
/*
@@ -1135,7 +1135,7 @@ H5B_iterate_helper(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t add
H5B_operator_t op, void *udata)
{
H5B_t *bt = NULL; /* Pointer to current B-tree node */
- H5RC_t *rc_shared; /* Ref-counted shared info */
+ H5UC_t *rc_shared; /* Ref-counted shared info */
H5B_shared_t *shared; /* Pointer to shared B-tree info */
H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
uint8_t *native = NULL; /* Array of keys in native format */
@@ -1156,7 +1156,7 @@ H5B_iterate_helper(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t add
/* Get shared info for B-tree */
if(NULL == (rc_shared = (type->get_shared)(f, udata)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object")
- shared = (H5B_shared_t *)H5RC_GET_OBJ(rc_shared);
+ shared = (H5B_shared_t *)H5UC_GET_OBJ(rc_shared);
HDassert(shared);
/* Protect the initial/current node */
@@ -1333,7 +1333,7 @@ H5B_remove_helper(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type
{
H5B_t *bt = NULL, *sibling = NULL;
unsigned bt_flags = H5AC__NO_FLAGS_SET;
- H5RC_t *rc_shared; /* Ref-counted shared info */
+ H5UC_t *rc_shared; /* Ref-counted shared info */
H5B_shared_t *shared; /* Pointer to shared B-tree info */
H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
unsigned idx = 0, lt = 0, rt; /* Final, left & right indices */
@@ -1354,7 +1354,7 @@ H5B_remove_helper(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type
/* Get shared info for B-tree */
if(NULL == (rc_shared = (type->get_shared)(f, udata)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, H5B_INS_ERROR, "can't retrieve B-tree's shared ref. count object")
- shared = (H5B_shared_t *)H5RC_GET_OBJ(rc_shared);
+ shared = (H5B_shared_t *)H5UC_GET_OBJ(rc_shared);
HDassert(shared);
/*
@@ -1700,7 +1700,7 @@ herr_t
H5B_delete(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr, void *udata)
{
H5B_t *bt = NULL; /* B-tree node being operated on */
- H5RC_t *rc_shared; /* Ref-counted shared info */
+ H5UC_t *rc_shared; /* Ref-counted shared info */
H5B_shared_t *shared; /* Pointer to shared B-tree info */
H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
unsigned u; /* Local index variable */
@@ -1716,7 +1716,7 @@ H5B_delete(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr, void
/* Get shared info for B-tree */
if(NULL == (rc_shared = (type->get_shared)(f, udata)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object")
- shared = (H5B_shared_t *)H5RC_GET_OBJ(rc_shared);
+ shared = (H5B_shared_t *)H5UC_GET_OBJ(rc_shared);
HDassert(shared);
/* Lock this B-tree node into memory for now */
@@ -1893,7 +1893,7 @@ H5B_copy(const H5B_t *old_bt)
* Check arguments.
*/
HDassert(old_bt);
- shared = (H5B_shared_t *)H5RC_GET_OBJ(old_bt->rc_shared);
+ shared = (H5B_shared_t *)H5UC_GET_OBJ(old_bt->rc_shared);
HDassert(shared);
/* Allocate memory for the new H5B_t object */
@@ -1915,7 +1915,7 @@ H5B_copy(const H5B_t *old_bt)
HDmemcpy(new_node->child, old_bt->child, (sizeof(haddr_t) * shared->two_k));
/* Increment the ref-count on the raw page */
- H5RC_INC(new_node->rc_shared);
+ H5UC_INC(new_node->rc_shared);
/* Set return value */
ret_value = new_node;
@@ -1951,7 +1951,7 @@ H5B_get_info_helper(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t ad
const H5B_info_ud_t *info_udata)
{
H5B_t *bt = NULL; /* Pointer to current B-tree node */
- H5RC_t *rc_shared; /* Ref-counted shared info */
+ H5UC_t *rc_shared; /* Ref-counted shared info */
H5B_shared_t *shared; /* Pointer to shared B-tree info */
H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
unsigned level; /* Node level */
@@ -1975,7 +1975,7 @@ H5B_get_info_helper(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t ad
/* Get shared info for B-tree */
if(NULL == (rc_shared = (type->get_shared)(f, info_udata->udata)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object")
- shared = (H5B_shared_t *)H5RC_GET_OBJ(rc_shared);
+ shared = (H5B_shared_t *)H5UC_GET_OBJ(rc_shared);
HDassert(shared);
/* Get the raw node size for iteration */
@@ -2108,7 +2108,7 @@ htri_t
H5B_valid(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr)
{
H5B_t *bt = NULL; /* The B-tree */
- H5RC_t *rc_shared; /* Ref-counted shared info */
+ H5UC_t *rc_shared; /* Ref-counted shared info */
H5B_shared_t *shared; /* Pointer to shared B-tree info */
H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
htri_t ret_value = SUCCEED; /* Return value */
@@ -2127,7 +2127,7 @@ H5B_valid(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr)
/* Get shared info for B-tree */
if(NULL == (rc_shared = (type->get_shared)(f, NULL)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object")
- shared = (H5B_shared_t *)H5RC_GET_OBJ(rc_shared);
+ shared = (H5B_shared_t *)H5UC_GET_OBJ(rc_shared);
HDassert(shared);
/*
@@ -2173,7 +2173,7 @@ H5B_node_dest(H5B_t *bt)
bt->child = H5FL_SEQ_FREE(haddr_t, bt->child);
bt->native = H5FL_BLK_FREE(native_block, bt->native);
- H5RC_DEC(bt->rc_shared);
+ H5UC_DEC(bt->rc_shared);
bt = H5FL_FREE(H5B_t, bt);
FUNC_LEAVE_NOAPI(SUCCEED)