diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2011-07-21 14:50:59 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2011-07-21 14:50:59 (GMT) |
commit | 9d7db150203eebb96360275c1c8fc5b482d31182 (patch) | |
tree | 07e713624b7966413743e2142b60f0de8df1a868 /src/H5Fprivate.h | |
parent | 08bb61054759d30c048af7baf1ca144b93ac9ce0 (diff) | |
download | hdf5-9d7db150203eebb96360275c1c8fc5b482d31182.zip hdf5-9d7db150203eebb96360275c1c8fc5b482d31182.tar.gz hdf5-9d7db150203eebb96360275c1c8fc5b482d31182.tar.bz2 |
[svn-r21135] Description:
More code cleanups to reduce coupling with the H5F package.
Tested on:
FreeBSD/32 8.2 (loyalty) w/gcc4.6, w/C++ & FORTRAN, in debug mode
FreeBSD/64 8.2 (freedom) w/gcc4.6, w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (koala) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, w/threadsafe, in production mode
Linux/PPC 2.6 (heiwa) w/C++ & FORTRAN, w/threadsafe, in debug mode
Mac OS X/32 10.6.8 (amazon) in debug mode
Diffstat (limited to 'src/H5Fprivate.h')
-rw-r--r-- | src/H5Fprivate.h | 107 |
1 files changed, 72 insertions, 35 deletions
diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h index 4bb3002..868674f 100644 --- a/src/H5Fprivate.h +++ b/src/H5Fprivate.h @@ -241,27 +241,40 @@ typedef struct H5F_blk_aggr_t H5F_blk_aggr_t; #define H5F_ACTUAL_NAME(F) ((F)->actual_name) #define H5F_EXTPATH(F) ((F)->extpath) #define H5F_SHARED(F) ((F)->shared) -#define H5F_PARENT(F) ((F)->parent) #define H5F_SAME_SHARED(F1, F2) ((F1)->shared == (F2)->shared)) -#define H5F_FCPL(F) ((F)->shared->fcpl_id) -#define H5F_SIZEOF_ADDR(F) ((F)->shared->sizeof_addr) -#define H5F_SIZEOF_SIZE(F) ((F)->shared->sizeof_size) +#define H5F_NOPEN_OBJS(F) ((F)->nopen_objs) +#define H5F_INCR_NOPEN_OBJS(F) ((F)->nopen_objs++) +#define H5F_DECR_NOPEN_OBJS(F) ((F)->nopen_objs--) +#define H5F_FILE_ID(F) ((F)->file_id) +#define H5F_PARENT(F) ((F)->parent) +#define H5F_NMOUNTS(F) ((F)->nmounts) +#define H5F_DRIVER_ID(F) ((F)->shared->lf->driver_id) +#define H5F_GET_FILENO(F,FILENUM) ((FILENUM) = (F)->shared->lf->fileno) +#define H5F_HAS_FEATURE(F,FL) ((F)->shared->lf->feature_flags & (FL)) +#define H5F_BASE_ADDR(F) ((F)->shared->sblock->base_addr) #define H5F_SYM_LEAF_K(F) ((F)->shared->sblock->sym_leaf_k) #define H5F_KVALUE(F,T) ((F)->shared->sblock->btree_k[(T)->id]) +#define H5F_NREFS(F) ((F)->shared->nrefs) +#define H5F_SIZEOF_ADDR(F) ((F)->shared->sizeof_addr) +#define H5F_SIZEOF_SIZE(F) ((F)->shared->sizeof_size) +#define H5F_SOHM_ADDR(F) ((F)->shared->sohm_addr) +#define H5F_SET_SOHM_ADDR(F, A) ((F)->shared->sohm_addr = (A)) +#define H5F_SOHM_VERS(F) ((F)->shared->sohm_vers) +#define H5F_SET_SOHM_VERS(F, V) ((F)->shared->sohm_vers = (V)) +#define H5F_SOHM_NINDEXES(F) ((F)->shared->sohm_nindexes) +#define H5F_SET_SOHM_NINDEXES(F, N) ((F)->shared->sohm_nindexes = (N)) +#define H5F_FCPL(F) ((F)->shared->fcpl_id) +#define H5F_GET_FC_DEGREE(F) ((F)->shared->fc_degree) #define H5F_RDCC_NSLOTS(F) ((F)->shared->rdcc_nslots) #define H5F_RDCC_NBYTES(F) ((F)->shared->rdcc_nbytes) #define H5F_RDCC_W0(F) ((F)->shared->rdcc_w0) -#define H5F_BASE_ADDR(F) ((F)->shared->sblock->base_addr) -#define H5F_GRP_BTREE_SHARED(F) ((F)->shared->grp_btree_shared) -#define H5F_SET_GRP_BTREE_SHARED(F, RC) (((F)->shared->grp_btree_shared = (RC)) ? SUCCEED : FAIL) #define H5F_SIEVE_BUF_SIZE(F) ((F)->shared->sieve_buf_size) #define H5F_GC_REF(F) ((F)->shared->gc_ref) #define H5F_USE_LATEST_FORMAT(F) ((F)->shared->latest_format) -#define H5F_GET_FC_DEGREE(F) ((F)->shared->fc_degree) #define H5F_STORE_MSG_CRT_IDX(F) ((F)->shared->store_msg_crt_idx) -#define H5F_HAS_FEATURE(F,FL) ((F)->shared->lf->feature_flags & (FL)) -#define H5F_DRIVER_ID(F) ((F)->shared->lf->driver_id) -#define H5F_GET_FILENO(F,FILENUM) ((FILENUM) = (F)->shared->lf->fileno) +#define H5F_SET_STORE_MSG_CRT_IDX(F, FL) ((F)->shared->store_msg_crt_idx = (FL)) +#define H5F_GRP_BTREE_SHARED(F) ((F)->shared->grp_btree_shared) +#define H5F_SET_GRP_BTREE_SHARED(F, RC) (((F)->shared->grp_btree_shared = (RC)) ? SUCCEED : FAIL) #define H5F_USE_TMP_SPACE(F) ((F)->shared->use_tmp_space) #define H5F_IS_TMP_ADDR(F, ADDR) (H5F_addr_le((F)->shared->tmp_addr, (ADDR))) #else /* H5F_PACKAGE */ @@ -270,27 +283,40 @@ typedef struct H5F_blk_aggr_t H5F_blk_aggr_t; #define H5F_ACTUAL_NAME(F) (H5F_get_actual_name(F)) #define H5F_EXTPATH(F) (H5F_get_extpath(F)) #define H5F_SHARED(F) (H5F_get_shared(F)) -#define H5F_PARENT(F) (H5F_get_parent(F)) #define H5F_SAME_SHARED(F1, F2) (H5F_same_shared((F1), (F2))) -#define H5F_FCPL(F) (H5F_get_fcpl(F)) -#define H5F_SIZEOF_ADDR(F) (H5F_sizeof_addr(F)) -#define H5F_SIZEOF_SIZE(F) (H5F_sizeof_size(F)) +#define H5F_NOPEN_OBJS(F) (H5F_get_nopen_objs(F)) +#define H5F_INCR_NOPEN_OBJS(F) (H5F_incr_nopen_objs(F)) +#define H5F_DECR_NOPEN_OBJS(F) (H5F_decr_nopen_objs(F)) +#define H5F_FILE_ID(F) (H5F_get_file_id(F)) +#define H5F_PARENT(F) (H5F_get_parent(F)) +#define H5F_NMOUNTS(F) (H5F_get_nmounts(F)) +#define H5F_DRIVER_ID(F) (H5F_get_driver_id(F)) +#define H5F_GET_FILENO(F,FILENUM) (H5F_get_fileno((F), &(FILENUM))) +#define H5F_HAS_FEATURE(F,FL) (H5F_has_feature(F,FL)) +#define H5F_BASE_ADDR(F) (H5F_get_base_addr(F)) #define H5F_SYM_LEAF_K(F) (H5F_sym_leaf_k(F)) #define H5F_KVALUE(F,T) (H5F_Kvalue(F,T)) +#define H5F_NREFS(F) (H5F_get_nrefs(F)) +#define H5F_SIZEOF_ADDR(F) (H5F_sizeof_addr(F)) +#define H5F_SIZEOF_SIZE(F) (H5F_sizeof_size(F)) +#define H5F_SOHM_ADDR(F) (H5F_get_sohm_addr(F)) +#define H5F_SET_SOHM_ADDR(F, A) (H5F_set_sohm_addr((F), (A))) +#define H5F_SOHM_VERS(F) (H5F_get_sohm_vers(F)) +#define H5F_SET_SOHM_VERS(F, V) (H5F_set_sohm_vers((F), (V))) +#define H5F_SOHM_NINDEXES(F) (H5F_get_sohm_nindexes(F)) +#define H5F_SET_SOHM_NINDEXES(F, N) (H5F_set_sohm_nindexes((F), (N))) +#define H5F_FCPL(F) (H5F_get_fcpl(F)) +#define H5F_GET_FC_DEGREE(F) (H5F_get_fc_degree(F)) #define H5F_RDCC_NSLOTS(F) (H5F_rdcc_nslots(F)) #define H5F_RDCC_NBYTES(F) (H5F_rdcc_nbytes(F)) #define H5F_RDCC_W0(F) (H5F_rdcc_w0(F)) -#define H5F_BASE_ADDR(F) (H5F_get_base_addr(F)) -#define H5F_GRP_BTREE_SHARED(F) (H5F_grp_btree_shared(F)) -#define H5F_SET_GRP_BTREE_SHARED(F, RC) (H5F_set_grp_btree_shared((F), (RC))) #define H5F_SIEVE_BUF_SIZE(F) (H5F_sieve_buf_size(F)) #define H5F_GC_REF(F) (H5F_gc_ref(F)) #define H5F_USE_LATEST_FORMAT(F) (H5F_use_latest_format(F)) -#define H5F_GET_FC_DEGREE(F) (H5F_get_fc_degree(F)) #define H5F_STORE_MSG_CRT_IDX(F) (H5F_store_msg_crt_idx(F)) -#define H5F_HAS_FEATURE(F,FL) (H5F_has_feature(F,FL)) -#define H5F_DRIVER_ID(F) (H5F_get_driver_id(F)) -#define H5F_GET_FILENO(F,FILENUM) (H5F_get_fileno((F), &(FILENUM))) +#define H5F_SET_STORE_MSG_CRT_IDX(F, FL) (H5F_set_store_msg_crt_idx((F), (FL))) +#define H5F_GRP_BTREE_SHARED(F) (H5F_grp_btree_shared(F)) +#define H5F_SET_GRP_BTREE_SHARED(F, RC) (H5F_set_grp_btree_shared((F), (RC))) #define H5F_USE_TMP_SPACE(F) (H5F_use_tmp_space(F)) #define H5F_IS_TMP_ADDR(F, ADDR) (H5F_is_tmp_addr((F), (ADDR))) #endif /* H5F_PACKAGE */ @@ -486,46 +512,57 @@ struct H5HG_heap_t; H5_DLL H5F_t *H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id, hid_t dxpl_id); H5_DLL herr_t H5F_try_close(H5F_t *f); -H5_DLL unsigned H5F_incr_nopen_objs(H5F_t *f); -H5_DLL unsigned H5F_decr_nopen_objs(H5F_t *f); /* Functions than retrieve values from the file struct */ H5_DLL unsigned H5F_get_intent(const H5F_t *f); -H5_DLL hid_t H5F_get_access_plist(H5F_t *f, hbool_t app_ref); H5_DLL char *H5F_get_open_name(const H5F_t *f); H5_DLL char *H5F_get_actual_name(const H5F_t *f); H5_DLL char *H5F_get_extpath(const H5F_t *f); H5_DLL H5F_file_t *H5F_get_shared(const H5F_t *f); -H5_DLL H5F_t *H5F_get_parent(const H5F_t *f); H5_DLL hbool_t H5F_same_shared(const H5F_t *f1, const H5F_t *f2); +H5_DLL unsigned H5F_get_nopen_objs(const H5F_t *f); +H5_DLL unsigned H5F_incr_nopen_objs(H5F_t *f); +H5_DLL unsigned H5F_decr_nopen_objs(H5F_t *f); +H5_DLL hid_t H5F_get_file_id(const H5F_t *f); +H5_DLL H5F_t *H5F_get_parent(const H5F_t *f); +H5_DLL unsigned H5F_get_nmounts(const H5F_t *f); +H5_DLL hid_t H5F_get_access_plist(H5F_t *f, hbool_t app_ref); H5_DLL hid_t H5F_get_id(H5F_t *file, hbool_t app_ref); H5_DLL size_t H5F_get_obj_count(const H5F_t *f, unsigned types, hbool_t app_ref); H5_DLL size_t H5F_get_obj_ids(const H5F_t *f, unsigned types, size_t max_objs, hid_t *obj_id_list, hbool_t app_ref); /* Functions than retrieve values set/cached from the superblock/FCPL */ -H5_DLL hid_t H5F_get_fcpl(const H5F_t *f); -H5_DLL uint8_t H5F_sizeof_addr(const H5F_t *f); -H5_DLL uint8_t H5F_sizeof_size(const H5F_t *f); +H5_DLL haddr_t H5F_get_base_addr(const H5F_t *f); H5_DLL unsigned H5F_sym_leaf_k(const H5F_t *f); H5_DLL unsigned H5F_Kvalue(const H5F_t *f, const struct H5B_class_t *type); +H5_DLL unsigned H5F_get_nrefs(const H5F_t *f); +H5_DLL uint8_t H5F_sizeof_addr(const H5F_t *f); +H5_DLL uint8_t H5F_sizeof_size(const H5F_t *f); +H5_DLL haddr_t H5F_get_sohm_addr(const H5F_t *f); +H5_DLL herr_t H5F_set_sohm_addr(H5F_t *f, haddr_t addr); +H5_DLL unsigned H5F_get_sohm_vers(const H5F_t *f); +H5_DLL herr_t H5F_set_sohm_vers(H5F_t *f, unsigned vers); +H5_DLL unsigned H5F_get_sohm_nindexes(const H5F_t *f); +H5_DLL herr_t H5F_set_sohm_nindexes(H5F_t *f, unsigned nindexes); +H5_DLL hid_t H5F_get_fcpl(const H5F_t *f); +H5_DLL H5F_close_degree_t H5F_get_fc_degree(const H5F_t *f); H5_DLL size_t H5F_rdcc_nbytes(const H5F_t *f); H5_DLL size_t H5F_rdcc_nslots(const H5F_t *f); H5_DLL double H5F_rdcc_w0(const H5F_t *f); -H5_DLL haddr_t H5F_get_base_addr(const H5F_t *f); -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 size_t H5F_sieve_buf_size(const H5F_t *f); H5_DLL unsigned H5F_gc_ref(const H5F_t *f); H5_DLL hbool_t H5F_use_latest_format(const H5F_t *f); -H5_DLL H5F_close_degree_t H5F_get_fc_degree(const H5F_t *f); H5_DLL hbool_t H5F_store_msg_crt_idx(const H5F_t *f); -H5_DLL hbool_t H5F_is_tmp_addr(const H5F_t *f, haddr_t addr); +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 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); /* Functions that retrieve values from VFD layer */ -H5_DLL hbool_t H5F_has_feature(const H5F_t *f, unsigned feature); H5_DLL hid_t H5F_get_driver_id(const H5F_t *f); H5_DLL herr_t H5F_get_fileno(const H5F_t *f, unsigned long *filenum); +H5_DLL hbool_t H5F_has_feature(const H5F_t *f, unsigned feature); H5_DLL haddr_t H5F_get_eoa(const H5F_t *f, H5FD_mem_t type); H5_DLL herr_t H5F_get_vfd_handle(const H5F_t *file, hid_t fapl, void **file_handle); |