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/H5Fquery.c | |
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/H5Fquery.c')
-rw-r--r-- | src/H5Fquery.c | 191 |
1 files changed, 178 insertions, 13 deletions
diff --git a/src/H5Fquery.c b/src/H5Fquery.c index bc9bc3d..4c05066 100644 --- a/src/H5Fquery.c +++ b/src/H5Fquery.c @@ -204,6 +204,78 @@ H5F_get_shared(const H5F_t *f) /*------------------------------------------------------------------------- + * Function: H5F_same_shared + * + * Purpose: Determine if two files have the same shared file pointer + * + * Return: TRUE/FALSE on success/abort on failure (shouldn't fail) + * + * Programmer: Quincey Koziol, July 19, 2011 + * + *------------------------------------------------------------------------- + */ +hbool_t +H5F_same_shared(const H5F_t *f1, const H5F_t *f2) +{ + /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */ + FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_same_shared) + + HDassert(f1); + HDassert(f1->shared); + HDassert(f2); + HDassert(f2->shared); + + FUNC_LEAVE_NOAPI(f1->shared == f2->shared) +} /* end H5F_same_shared() */ + + +/*------------------------------------------------------------------------- + * Function: H5F_get_nopen_objs + * + * Purpose: Retrieve the file's 'nopen_objs' value + * + * Return: 'nopen_objs' on success/abort on failure (shouldn't fail) + * + * Programmer: Quincey Koziol, July 20, 2011 + * + *------------------------------------------------------------------------- + */ +unsigned +H5F_get_nopen_objs(const H5F_t *f) +{ + /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */ + FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_get_nopen_objs) + + HDassert(f); + + FUNC_LEAVE_NOAPI(f->nopen_objs) +} /* end H5F_get_nopen_objs() */ + + +/*------------------------------------------------------------------------- + * Function: H5F_get_file_id + * + * Purpose: Retrieve the file's 'file_id' value + * + * Return: 'file_id' on success/abort on failure (shouldn't fail) + * + * Programmer: Quincey Koziol, July 20, 2011 + * + *------------------------------------------------------------------------- + */ +hid_t +H5F_get_file_id(const H5F_t *f) +{ + /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */ + FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_get_file_id) + + HDassert(f); + + FUNC_LEAVE_NOAPI(f->file_id) +} /* end H5F_get_file_id() */ + + +/*------------------------------------------------------------------------- * Function: H5F_get_parent * * Purpose: Retrieve the file's 'parent' pointer @@ -227,29 +299,26 @@ H5F_get_parent(const H5F_t *f) /*------------------------------------------------------------------------- - * Function: H5F_same_shared + * Function: H5F_get_nmounts * - * Purpose: Determine if two files have the same shared file pointer + * Purpose: Retrieve the file's 'nmounts' value * - * Return: TRUE/FALSE on success/abort on failure (shouldn't fail) + * Return: 'nmounts' on success/abort on failure (shouldn't fail) * - * Programmer: Quincey Koziol, July 19, 2011 + * Programmer: Quincey Koziol, July 20, 2011 * *------------------------------------------------------------------------- */ -hbool_t -H5F_same_shared(const H5F_t *f1, const H5F_t *f2) +unsigned +H5F_get_nmounts(const H5F_t *f) { /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */ - FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_same_shared) + FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_get_nmounts) - HDassert(f1); - HDassert(f1->shared); - HDassert(f2); - HDassert(f2->shared); + HDassert(f); - FUNC_LEAVE_NOAPI(f1->shared == f2->shared) -} /* end H5F_same_shared() */ + FUNC_LEAVE_NOAPI(f->nmounts) +} /* end H5F_get_nmounts() */ /*------------------------------------------------------------------------- @@ -335,6 +404,78 @@ H5F_sizeof_size(const H5F_t *f) /*------------------------------------------------------------------------- + * Function: H5F_get_sohm_addr + * + * Purpose: Retrieve the file's 'sohm_addr' value + * + * Return: 'sohm_addr' on success/abort on failure (shouldn't fail) + * + * Programmer: Quincey Koziol, July 20, 2011 + * + *------------------------------------------------------------------------- + */ +haddr_t +H5F_get_sohm_addr(const H5F_t *f) +{ + /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */ + FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_get_sohm_addr) + + HDassert(f); + HDassert(f->shared); + + FUNC_LEAVE_NOAPI(f->shared->sohm_addr) +} /* end H5F_get_sohm_addr() */ + + +/*------------------------------------------------------------------------- + * Function: H5F_get_sohm_vers + * + * Purpose: Retrieve the file's 'sohm_vers' value + * + * Return: 'sohm_vers' on success/abort on failure (shouldn't fail) + * + * Programmer: Quincey Koziol, July 20, 2011 + * + *------------------------------------------------------------------------- + */ +unsigned +H5F_get_sohm_vers(const H5F_t *f) +{ + /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */ + FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_get_sohm_vers) + + HDassert(f); + HDassert(f->shared); + + FUNC_LEAVE_NOAPI(f->shared->sohm_vers) +} /* end H5F_get_sohm_vers() */ + + +/*------------------------------------------------------------------------- + * Function: H5F_get_sohm_nindexes + * + * Purpose: Retrieve the file's 'sohm_nindexes' value + * + * Return: 'sohm_nindexes' on success/abort on failure (shouldn't fail) + * + * Programmer: Quincey Koziol, July 20, 2011 + * + *------------------------------------------------------------------------- + */ +unsigned +H5F_get_sohm_nindexes(const H5F_t *f) +{ + /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */ + FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_get_sohm_nindexes) + + HDassert(f); + HDassert(f->shared); + + FUNC_LEAVE_NOAPI(f->shared->sohm_nindexes) +} /* end H5F_get_sohm_nindexes() */ + + +/*------------------------------------------------------------------------- * Function: H5F_sym_leaf_k * * Purpose: Replaced a macro to retrieve the symbol table leaf size, @@ -400,6 +541,30 @@ H5F_Kvalue(const H5F_t *f, const H5B_class_t *type) /*------------------------------------------------------------------------- + * Function: H5F_get_nrefs + * + * Purpose: Retrieve the file's 'nrefs' value + * + * Return: 'nrefs' on success/abort on failure (shouldn't fail) + * + * Programmer: Quincey Koziol, July 20, 2011 + * + *------------------------------------------------------------------------- + */ +unsigned +H5F_get_nrefs(const H5F_t *f) +{ + /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */ + FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_get_nrefs) + + HDassert(f); + HDassert(f->shared); + + FUNC_LEAVE_NOAPI(f->shared->nrefs) +} /* end H5F_get_nrefs() */ + + +/*------------------------------------------------------------------------- * Function: H5F_rdcc_nslots * * Purpose: Replaced a macro to retrieve the raw data cache number of slots, |