diff options
-rw-r--r-- | MANIFEST | 4 | ||||
-rw-r--r-- | src/CMakeLists.txt | 12 | ||||
-rw-r--r-- | src/H5B.c | 46 | ||||
-rw-r--r-- | src/H5Bcache.c | 10 | ||||
-rw-r--r-- | src/H5Bdbg.c | 10 | ||||
-rw-r--r-- | src/H5Bpkg.h | 4 | ||||
-rw-r--r-- | src/H5Bprivate.h | 4 | ||||
-rw-r--r-- | src/H5Dbtree.c | 18 | ||||
-rw-r--r-- | src/H5F.c | 2 | ||||
-rw-r--r-- | src/H5Fpkg.h | 4 | ||||
-rw-r--r-- | src/H5Fprivate.h | 6 | ||||
-rw-r--r-- | src/H5Fquery.c | 2 | ||||
-rw-r--r-- | src/H5Gnode.c | 8 | ||||
-rw-r--r-- | src/H5Oprivate.h | 2 | ||||
-rw-r--r-- | src/H5UC.c (renamed from src/H5RC.c) | 39 | ||||
-rw-r--r-- | src/H5UCprivate.h (renamed from src/H5RCprivate.h) | 29 | ||||
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/Makefile.in | 6 | ||||
-rw-r--r-- | src/hdf5.lnt | 2 | ||||
-rw-r--r-- | vms/src/make.com | 2 |
20 files changed, 109 insertions, 103 deletions
@@ -857,8 +857,8 @@ ./src/H5Rpkg.h ./src/H5Rprivate.h ./src/H5Rpublic.h -./src/H5RC.c -./src/H5RCprivate.h +./src/H5UC.c +./src/H5UCprivate.h ./src/H5RS.c ./src/H5RSprivate.h ./src/H5S.c diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 91872af..8e7a3bf 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -498,12 +498,12 @@ SET (H5R_HDRS IDE_GENERATED_PROPERTIES ("H5R" "${H5R_HDRS}" "${H5R_SRCS}" ) -SET (H5RC_SRCS - ${HDF5_SRC_DIR}/H5RC.c +SET (H5UC_SRCS + ${HDF5_SRC_DIR}/H5UC.c ) -SET (H5RC_HDRS +SET (H5UC_HDRS ) -IDE_GENERATED_PROPERTIES ("H5RC" "${H5RC_HDRS}" "${H5RC_SRCS}" ) +IDE_GENERATED_PROPERTIES ("H5UC" "${H5UC_HDRS}" "${H5UC_SRCS}" ) SET (H5RS_SRCS @@ -673,7 +673,7 @@ SET (common_SRCS ${H5P_SRCS} ${H5PL_SRCS} ${H5R_SRCS} - ${H5RC_SRCS} + ${H5UC_SRCS} ${H5RS_SRCS} ${H5S_SRCS} ${H5SL_SRCS} @@ -751,7 +751,7 @@ SET (H5_PRIVATE_HEADERS ${HDF5_SRC_DIR}/H5Oprivate.h ${HDF5_SRC_DIR}/H5Pprivate.h ${HDF5_SRC_DIR}/H5PLprivate.h - ${HDF5_SRC_DIR}/H5RCprivate.h + ${HDF5_SRC_DIR}/H5UCprivate.h ${HDF5_SRC_DIR}/H5Rprivate.h ${HDF5_SRC_DIR}/H5RSprivate.h ${HDF5_SRC_DIR}/H5SLprivate.h @@ -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) diff --git a/src/H5Bcache.c b/src/H5Bcache.c index 968c5ee..2992986 100644 --- a/src/H5Bcache.c +++ b/src/H5Bcache.c @@ -121,10 +121,10 @@ H5B__load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) /* Set & increment the ref-counted "shared" B-tree information for the node */ bt->rc_shared = udata->rc_shared; - H5RC_INC(bt->rc_shared); + H5UC_INC(bt->rc_shared); /* Get a pointer to the shared info, for convenience */ - shared = (H5B_shared_t *)H5RC_GET_OBJ(bt->rc_shared); + shared = (H5B_shared_t *)H5UC_GET_OBJ(bt->rc_shared); HDassert(shared); /* Allocate space for the native keys and child addresses */ @@ -217,7 +217,7 @@ H5B__flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B_t *bt, un HDassert(f); HDassert(H5F_addr_defined(addr)); HDassert(bt); - shared = (H5B_shared_t *)H5RC_GET_OBJ(bt->rc_shared); + shared = (H5B_shared_t *)H5UC_GET_OBJ(bt->rc_shared); HDassert(shared); HDassert(shared->type); HDassert(shared->type->encode); @@ -318,7 +318,7 @@ H5B__dest(H5F_t *f, H5B_t *bt) H5B_shared_t *shared; /* Pointer to shared B-tree info */ /* Get the pointer to the shared B-tree info */ - shared = (H5B_shared_t *)H5RC_GET_OBJ(bt->rc_shared); + shared = (H5B_shared_t *)H5UC_GET_OBJ(bt->rc_shared); HDassert(shared); /* Release the space on disk */ @@ -398,7 +398,7 @@ H5B__compute_size(const H5F_t UNUSED *f, const H5B_t *bt, size_t *size_ptr) HDassert(f); HDassert(bt); HDassert(bt->rc_shared); - shared = (H5B_shared_t *)H5RC_GET_OBJ(bt->rc_shared); + shared = (H5B_shared_t *)H5UC_GET_OBJ(bt->rc_shared); HDassert(shared); HDassert(shared->type); HDassert(size_ptr); diff --git a/src/H5Bdbg.c b/src/H5Bdbg.c index 3fb7dd8..3c81c26 100644 --- a/src/H5Bdbg.c +++ b/src/H5Bdbg.c @@ -59,7 +59,7 @@ H5B_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int f const H5B_class_t *type, 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 u; /* Local index variable */ @@ -80,7 +80,7 @@ H5B_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int f /* 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); /* @@ -174,7 +174,7 @@ herr_t H5B_assert(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type, 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 */ int ncell, cmp; @@ -199,7 +199,7 @@ H5B_assert(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type, 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); /* Initialize the queue */ @@ -208,7 +208,7 @@ H5B_assert(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type, void cache_udata.rc_shared = rc_shared; bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, &cache_udata, H5AC_READ); HDassert(bt); - shared = (H5B_shared_t *)H5RC_GET_OBJ(bt->rc_shared); + shared = (H5B_shared_t *)H5UC_GET_OBJ(bt->rc_shared); HDassert(shared); cur = (struct child_t *)H5MM_calloc(sizeof(struct child_t)); HDassert(cur); diff --git a/src/H5Bpkg.h b/src/H5Bpkg.h index 46e2b28..598b122 100644 --- a/src/H5Bpkg.h +++ b/src/H5Bpkg.h @@ -52,7 +52,7 @@ typedef struct H5B_t { H5AC_info_t cache_info; /* Information for H5AC cache functions */ /* _must_ be first field in structure */ - H5RC_t *rc_shared; /*ref-counted shared info */ + H5UC_t *rc_shared; /*ref-counted shared info */ unsigned level; /*node level */ unsigned nchildren; /*number of child pointers */ haddr_t left; /*address of left sibling */ @@ -65,7 +65,7 @@ typedef struct H5B_t { typedef struct H5B_cache_ud_t { H5F_t *f; /* File that B-tree node is within */ const struct H5B_class_t *type; /* Type of tree */ - H5RC_t *rc_shared; /* Ref-counted shared info */ + H5UC_t *rc_shared; /* Ref-counted shared info */ } H5B_cache_ud_t; /*****************************/ diff --git a/src/H5Bprivate.h b/src/H5Bprivate.h index 83a357b..9e95c15 100644 --- a/src/H5Bprivate.h +++ b/src/H5Bprivate.h @@ -34,7 +34,7 @@ /* Private headers needed by this file */ #include "H5private.h" /* Generic Functions */ #include "H5Fprivate.h" /* File access */ -#include "H5RCprivate.h" /* Reference counted object functions */ +#include "H5UCprivate.h" /* Reference counted object functions */ /**************************/ /* Library Private Macros */ @@ -113,7 +113,7 @@ typedef struct H5B_shared_t { typedef struct H5B_class_t { H5B_subid_t id; /*id as found in file*/ size_t sizeof_nkey; /*size of native (memory) key*/ - H5RC_t * (*get_shared)(const H5F_t*, const void*); /*shared info for node */ + H5UC_t * (*get_shared)(const H5F_t*, const void*); /*shared info for node */ herr_t (*new_node)(H5F_t*, hid_t, H5B_ins_t, void*, void*, void*, haddr_t*); int (*cmp2)(void*, void*, void*); /*compare 2 keys */ int (*cmp3)(void*, void*, void*); /*compare 3 keys */ diff --git a/src/H5Dbtree.c b/src/H5Dbtree.c index 50af977..37780e7 100644 --- a/src/H5Dbtree.c +++ b/src/H5Dbtree.c @@ -105,7 +105,7 @@ static int H5D__btree_idx_iterate_cb(H5F_t *f, hid_t dxpl_id, const void *left_k 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 H5UC_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); @@ -219,7 +219,7 @@ H5B_class_t H5B_BTREE[1] = {{ *------------------------------------------------------------------------- */ /* ARGSUSED */ -static H5RC_t * +static H5UC_t * 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; @@ -800,7 +800,7 @@ H5D__btree_shared_create(const H5F_t *f, H5O_storage_chunk_t *store, unsigned nd /* <none> */ /* Make shared B-tree info reference counted */ - if(NULL == (store->u.btree.shared = H5RC_create(shared, H5B_shared_free))) + if(NULL == (store->u.btree.shared = H5UC_create(shared, H5B_shared_free))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't create ref-count wrapper for shared B-tree info") done: @@ -1186,7 +1186,7 @@ H5D__btree_idx_delete(const H5D_chk_idx_info_t *idx_info) /* Release the shared B-tree page */ if(NULL == tmp_storage.u.btree.shared) HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "ref-counted page nil") - if(H5RC_DEC(tmp_storage.u.btree.shared) < 0) + if(H5UC_DEC(tmp_storage.u.btree.shared) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to decrement ref-counted page") } /* end if */ @@ -1268,9 +1268,9 @@ H5D__btree_idx_copy_shutdown(H5O_storage_chunk_t *storage_src, HDassert(storage_dst); /* Decrement refcount on shared B-tree info */ - if(H5RC_DEC(storage_src->u.btree.shared) < 0) + if(H5UC_DEC(storage_src->u.btree.shared) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTDEC, FAIL, "unable to decrement ref-counted page") - if(H5RC_DEC(storage_dst->u.btree.shared) < 0) + if(H5UC_DEC(storage_dst->u.btree.shared) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTDEC, FAIL, "unable to decrement ref-counted page") done: @@ -1330,7 +1330,7 @@ done: if(shared_init) { if(NULL == idx_info->storage->u.btree.shared) HDONE_ERROR(H5E_IO, H5E_CANTFREE, FAIL, "ref-counted page nil") - if(H5RC_DEC(idx_info->storage->u.btree.shared) < 0) + if(H5UC_DEC(idx_info->storage->u.btree.shared) < 0) HDONE_ERROR(H5E_IO, H5E_CANTFREE, FAIL, "unable to decrement ref-counted page") } /* end if */ @@ -1420,7 +1420,7 @@ H5D__btree_idx_dest(const H5D_chk_idx_info_t *idx_info) /* Free the raw B-tree node buffer */ if(NULL == idx_info->storage->u.btree.shared) HGOTO_ERROR(H5E_IO, H5E_CANTFREE, FAIL, "ref-counted page nil") - if(H5RC_DEC(idx_info->storage->u.btree.shared) < 0) + if(H5UC_DEC(idx_info->storage->u.btree.shared) < 0) HGOTO_ERROR(H5E_IO, H5E_CANTFREE, FAIL, "unable to decrement ref-counted page") done: @@ -1475,7 +1475,7 @@ done: if(NULL == storage.u.btree.shared) HDONE_ERROR(H5E_IO, H5E_CANTFREE, FAIL, "ref-counted page nil") else - if(H5RC_DEC(storage.u.btree.shared) < 0) + if(H5UC_DEC(storage.u.btree.shared) < 0) HDONE_ERROR(H5E_IO, H5E_CANTFREE, FAIL, "unable to decrement ref-counted page") } /* end if */ @@ -3200,7 +3200,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5F_set_grp_btree_shared(H5F_t *f, H5RC_t *rc) +H5F_set_grp_btree_shared(H5F_t *f, H5UC_t *rc) { /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */ FUNC_ENTER_NOAPI_NOINIT_NOERR diff --git a/src/H5Fpkg.h b/src/H5Fpkg.h index beb7e88..2465222 100644 --- a/src/H5Fpkg.h +++ b/src/H5Fpkg.h @@ -42,7 +42,7 @@ #include "H5FSprivate.h" /* File free space */ #include "H5Gprivate.h" /* Groups */ #include "H5Oprivate.h" /* Object header messages */ -#include "H5RCprivate.h" /* Reference counted object functions */ +#include "H5UCprivate.h" /* Reference counted object functions */ /* @@ -236,7 +236,7 @@ struct H5F_file_t { struct H5HG_heap_t **cwfs; /* Global heap cache */ struct H5G_t *root_grp; /* Open root group */ H5FO_t *open_objs; /* Open objects in file */ - H5RC_t *grp_btree_shared; /* Ref-counted group B-tree node info */ + H5UC_t *grp_btree_shared; /* Ref-counted group B-tree node info */ /* File space allocation information */ H5F_file_space_type_t fs_strategy; /* File space handling strategy */ diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h index afad362..572df76 100644 --- a/src/H5Fprivate.h +++ b/src/H5Fprivate.h @@ -549,7 +549,7 @@ typedef struct H5F_blk_aggr_t H5F_blk_aggr_t; /* Forward declarations for prototype arguments */ struct H5B_class_t; -struct H5RC_t; +struct H5UC_t; struct H5O_loc_t; struct H5HG_heap_t; @@ -599,8 +599,8 @@ H5_DLL unsigned H5F_gc_ref(const H5F_t *f); H5_DLL hbool_t H5F_use_latest_format(const H5F_t *f); H5_DLL hbool_t H5F_store_msg_crt_idx(const H5F_t *f); H5_DLL herr_t H5F_set_store_msg_crt_idx(H5F_t *f, hbool_t flag); -H5_DLL struct H5RC_t *H5F_grp_btree_shared(const H5F_t *f); -H5_DLL herr_t H5F_set_grp_btree_shared(H5F_t *f, struct H5RC_t *rc); +H5_DLL struct H5UC_t *H5F_grp_btree_shared(const H5F_t *f); +H5_DLL herr_t H5F_set_grp_btree_shared(H5F_t *f, struct H5UC_t *rc); H5_DLL hbool_t H5F_use_tmp_space(const H5F_t *f); H5_DLL hbool_t H5F_is_tmp_addr(const H5F_t *f, haddr_t addr); diff --git a/src/H5Fquery.c b/src/H5Fquery.c index c04ba24..6c3ca12 100644 --- a/src/H5Fquery.c +++ b/src/H5Fquery.c @@ -703,7 +703,7 @@ H5F_get_base_addr(const H5F_t *f) * *------------------------------------------------------------------------- */ -H5RC_t * +H5UC_t * H5F_grp_btree_shared(const H5F_t *f) { /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */ diff --git a/src/H5Gnode.c b/src/H5Gnode.c index c0d2885..3c238ce 100644 --- a/src/H5Gnode.c +++ b/src/H5Gnode.c @@ -77,7 +77,7 @@ typedef struct H5G_node_key_t { /********************/ /* B-tree callbacks */ -static H5RC_t *H5G_node_get_shared(const H5F_t *f, const void *_udata); +static H5UC_t *H5G_node_get_shared(const H5F_t *f, const void *_udata); static herr_t H5G_node_create(H5F_t *f, hid_t dxpl_id, H5B_ins_t op, void *_lt_key, void *_udata, void *_rt_key, haddr_t *addr_p/*out*/); @@ -156,7 +156,7 @@ H5FL_SEQ_DEFINE(H5G_entry_t); * *------------------------------------------------------------------------- */ -static H5RC_t * +static H5UC_t * H5G_node_get_shared(const H5F_t *f, const void UNUSED *_udata) { FUNC_ENTER_NOAPI_NOINIT_NOERR @@ -1189,7 +1189,7 @@ H5G__node_init(H5F_t *f) /* <none> */ /* Make shared B-tree info reference counted */ - if(H5F_SET_GRP_BTREE_SHARED(f, H5RC_create(shared, H5B_shared_free)) < 0) + if(H5F_SET_GRP_BTREE_SHARED(f, H5UC_create(shared, H5B_shared_free)) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't create ref-count wrapper for shared B-tree info") done: @@ -1222,7 +1222,7 @@ H5G_node_close(const H5F_t *f) /* Free the raw B-tree node buffer */ if(H5F_GRP_BTREE_SHARED(f)) - H5RC_DEC(H5F_GRP_BTREE_SHARED(f)); + H5UC_DEC(H5F_GRP_BTREE_SHARED(f)); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5G_node_close */ diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h index 8e2dfa4..d5cd621 100644 --- a/src/H5Oprivate.h +++ b/src/H5Oprivate.h @@ -392,7 +392,7 @@ typedef struct H5O_storage_contig_t { typedef struct H5O_storage_chunk_btree_t { haddr_t dset_ohdr_addr; /* File address dataset's object header */ - H5RC_t *shared; /* Ref-counted shared info for B-tree nodes */ + H5UC_t *shared; /* Ref-counted shared info for B-tree nodes */ } H5O_storage_chunk_btree_t; typedef struct H5O_storage_chunk_t { @@ -18,28 +18,31 @@ * * These are used for various internal buffers which are shared. * + * The module used to be H5RC, but changed to H5UC because of + * conflicting requirement for the use of H5RC. + * */ #include "H5Eprivate.h" /* Error handling */ #include "H5FLprivate.h" /* Free lists */ -#include "H5RCprivate.h" /* Reference-counted buffers */ +#include "H5UCprivate.h" /* Reference-counted buffers */ /* Private typedefs & structs */ -/* Declare a free list to manage the H5RC_t struct */ -H5FL_DEFINE_STATIC(H5RC_t); +/* Declare a free list to manage the H5UC_t struct */ +H5FL_DEFINE_STATIC(H5UC_t); /*-------------------------------------------------------------------------- NAME - H5RC_create + H5UC_create PURPOSE Create a reference counted object USAGE - H5RC_t *H5RC_create(o,free) + H5UC_t *H5UC_create(o,free) const void *o; IN: Object to initialize ref-counted object with - H5RC_free_func_t free; IN: Function to call when ref-count drop to zero + H5UC_free_func_t free; IN: Function to call when ref-count drop to zero RETURNS Returns a pointer to a new ref-counted object on success, NULL on failure. @@ -52,10 +55,10 @@ H5FL_DEFINE_STATIC(H5RC_t); EXAMPLES REVISION LOG --------------------------------------------------------------------------*/ -H5RC_t * -H5RC_create(void *o, H5RC_free_func_t free_func) +H5UC_t * +H5UC_create(void *o, H5UC_free_func_t free_func) { - H5RC_t *ret_value; /* Return value */ + H5UC_t *ret_value; /* Return value */ FUNC_ENTER_NOAPI(NULL) @@ -64,7 +67,7 @@ H5RC_create(void *o, H5RC_free_func_t free_func) HDassert(free_func); /* Allocate ref-counted string structure */ - if(NULL == (ret_value = H5FL_MALLOC(H5RC_t))) + if(NULL == (ret_value = H5FL_MALLOC(H5UC_t))) HGOTO_ERROR(H5E_RS,H5E_NOSPACE,NULL,"memory allocation failed") /* Set the internal fields */ @@ -74,17 +77,17 @@ H5RC_create(void *o, H5RC_free_func_t free_func) done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5RC_create() */ +} /* end H5UC_create() */ /*-------------------------------------------------------------------------- NAME - H5RC_decr + H5UC_decr PURPOSE Decrement the reference count for a ref-counted object USAGE - herr_t H5RC_decr(rc) - H5RC_t *rc; IN: Ref-counted object to decrement count for + herr_t H5UC_decr(rc) + H5UC_t *rc; IN: Ref-counted object to decrement count for RETURNS SUCCEED/FAIL @@ -97,7 +100,7 @@ done: REVISION LOG --------------------------------------------------------------------------*/ herr_t -H5RC_decr(H5RC_t *rc) +H5UC_decr(H5UC_t *rc) { herr_t ret_value = SUCCEED; /* Return value */ @@ -115,13 +118,13 @@ H5RC_decr(H5RC_t *rc) /* Check if we should delete this object now */ if(rc->n == 0) { if((rc->free_func)(rc->o) < 0) { - rc = H5FL_FREE(H5RC_t, rc); + rc = H5FL_FREE(H5UC_t, rc); HGOTO_ERROR(H5E_RS, H5E_CANTFREE, FAIL, "memory release failed") } /* end if */ - rc = H5FL_FREE(H5RC_t, rc); + rc = H5FL_FREE(H5UC_t, rc); } /* end if */ done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5RC_decr() */ +} /* end H5UC_decr() */ diff --git a/src/H5RCprivate.h b/src/H5UCprivate.h index 2fe3551..a702c03 100644 --- a/src/H5RCprivate.h +++ b/src/H5UCprivate.h @@ -14,16 +14,19 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * This file contains private information about the H5RC module + * This file contains private information about the H5UC module + * The module used to be H5RC, but changed to H5UC because of + * conflicting requirement for the use of H5RC. */ -#ifndef _H5RCprivate_H -#define _H5RCprivate_H + +#ifndef _H5UCprivate_H +#define _H5UCprivate_H /**************************************/ /* Public headers needed by this file */ /**************************************/ #ifdef LATER -#include "H5RCpublic.h" +#include "H5UCpublic.h" #endif /* LATER */ /***************************************/ @@ -36,27 +39,27 @@ /************/ /* Typedef for function to release object when reference count drops to zero */ -typedef herr_t (*H5RC_free_func_t)(void *o); +typedef herr_t (*H5UC_free_func_t)(void *o); /* Typedef for reference counted objects */ -typedef struct H5RC_t { +typedef struct H5UC_t { void *o; /* Object to be reference counted */ size_t n; /* Reference count of number of pointers sharing object */ - H5RC_free_func_t free_func; /* Function to free object */ -} H5RC_t; + H5UC_free_func_t free_func; /* Function to free object */ +} H5UC_t; /**********/ /* Macros */ /**********/ -#define H5RC_INC(rc) ((rc)->n++) -#define H5RC_DEC(rc) (H5RC_decr(rc)) -#define H5RC_GET_OBJ(rc) ((rc)->o) +#define H5UC_INC(rc) ((rc)->n++) +#define H5UC_DEC(rc) (H5UC_decr(rc)) +#define H5UC_GET_OBJ(rc) ((rc)->o) /********************/ /* Private routines */ /********************/ -H5_DLL H5RC_t *H5RC_create(void *s, H5RC_free_func_t free_func); -H5_DLL herr_t H5RC_decr(H5RC_t *rc); +H5_DLL H5UC_t *H5UC_create(void *s, H5UC_free_func_t free_func); +H5_DLL herr_t H5UC_decr(H5UC_t *rc); #endif /* _H5RSprivate_H */ diff --git a/src/Makefile.am b/src/Makefile.am index 5f383e0..40b5f6b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -92,7 +92,7 @@ libhdf5_la_SOURCES= H5.c H5checksum.c H5dbg.c H5system.c H5timer.c H5trace.c \ H5Plapl.c H5Plcpl.c H5Pocpl.c H5Pocpypl.c H5Pstrcpl.c H5Ptest.c \ H5PL.c \ H5R.c H5Rdeprec.c \ - H5RC.c \ + H5UC.c \ H5RS.c \ H5S.c H5Sall.c H5Sdbg.c H5Shyper.c H5Smpio.c H5Snone.c H5Spoint.c \ H5Sselect.c H5Stest.c \ diff --git a/src/Makefile.in b/src/Makefile.in index 1163f08..609aea5 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -160,7 +160,7 @@ am_libhdf5_la_OBJECTS = H5.lo H5checksum.lo H5dbg.lo H5system.lo \ H5Pdapl.lo H5Pdcpl.lo H5Pdeprec.lo H5Pdxpl.lo H5Pencdec.lo \ H5Pfapl.lo H5Pfcpl.lo H5Pfmpl.lo H5Pgcpl.lo H5Pint.lo \ H5Plapl.lo H5Plcpl.lo H5Pocpl.lo H5Pocpypl.lo H5Pstrcpl.lo \ - H5Ptest.lo H5PL.lo H5R.lo H5Rdeprec.lo H5RC.lo H5RS.lo H5S.lo \ + H5Ptest.lo H5PL.lo H5R.lo H5Rdeprec.lo H5UC.lo H5RS.lo H5S.lo \ H5Sall.lo H5Sdbg.lo H5Shyper.lo H5Smpio.lo H5Snone.lo \ H5Spoint.lo H5Sselect.lo H5Stest.lo H5SL.lo H5SM.lo \ H5SMbtree2.lo H5SMcache.lo H5SMmessage.lo H5SMtest.lo H5ST.lo \ @@ -589,7 +589,7 @@ libhdf5_la_SOURCES = H5.c H5checksum.c H5dbg.c H5system.c H5timer.c H5trace.c \ H5Plapl.c H5Plcpl.c H5Pocpl.c H5Pocpypl.c H5Pstrcpl.c H5Ptest.c \ H5PL.c \ H5R.c H5Rdeprec.c \ - H5RC.c \ + H5UC.c \ H5RS.c \ H5S.c H5Sall.c H5Sdbg.c H5Shyper.c H5Smpio.c H5Snone.c H5Spoint.c \ H5Sselect.c H5Stest.c \ @@ -957,7 +957,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Pstrcpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Ptest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5R.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5RC.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5RS.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Rdeprec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5S.Plo@am__quote@ @@ -1001,6 +1000,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Tstrpad.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Tvisit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Tvlen.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5UC.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5V.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5WB.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Z.Plo@am__quote@ diff --git a/src/hdf5.lnt b/src/hdf5.lnt index 1d02039..6865720 100644 --- a/src/hdf5.lnt +++ b/src/hdf5.lnt @@ -33,7 +33,7 @@ -esym(534, H5CS_push, H5CS_pop) -esym(534, H5I_clear_type, H5I_dec_type_ref) -esym(534, H5MM_xfree) --esym(534, H5RC_decr) +-esym(534, H5UC_decr) -esym(534, H5V_array_fill) diff --git a/vms/src/make.com b/vms/src/make.com index cdf0f4a..20429b2 100644 --- a/vms/src/make.com +++ b/vms/src/make.com @@ -59,7 +59,7 @@ $ cobj1= "H5MFaggr, H5MF, H5MFdbg, H5MFsection, H5MM,"+- "H5Orefcount, H5Osdspace, H5Oshared, H5Oshmesg, H5Ostab, H5Otest, H5Ounknown,"+- "H5Pacpl, H5P, H5Pdapl, H5Pdcpl, H5Pdeprec, H5Pdxpl, H5Pencdec, H5Pfapl, H5Pfcpl, H5Pfmpl, H5Pgcpl, H5Pint,"+- "H5Plapl, H5Plcpl, H5Pocpl, H5Pocpypl, H5Pstrcpl, H5Ptest,"+- - "H5R, H5RC, H5Rdeprec, H5RS, H5Sall, H5S, H5Sdbg, H5Shyper, H5SL, H5SMbtree2, H5SM, H5SMcache,"+- + "H5R, H5UC, H5Rdeprec, H5RS, H5Sall, H5S, H5Sdbg, H5Shyper, H5SL, H5SMbtree2, H5SM, H5SMcache,"+- "H5SMmessage, H5Smpio, H5SMtest, H5Snone, H5Spoint, H5Sselect, H5ST, H5Stest,"+- "H5Tarray, H5Tbit, H5T, H5Tcommit, H5Tcompound, H5Tconv, H5Tcset, H5Tdbg, H5Tdeprec, H5Tenum,"+- "H5Tfields, H5Tfixed, H5Tfloat, H5Tinit, H5Tnative, H5Toffset, H5Toh, H5Topaque, H5Torder,"+- |