diff options
author | Larry Knox <lrknox@hdfgroup.org> | 2020-10-16 22:47:27 (GMT) |
---|---|---|
committer | Larry Knox <lrknox@hdfgroup.org> | 2020-10-16 22:47:27 (GMT) |
commit | db30c2da68ece4a155e9e50c28ec16d6057509b2 (patch) | |
tree | 1d36f673c36dfee71c266bba39511da21ecc782e /src/H5Fquery.c | |
parent | 5b9cf732caab9daa6ed1e00f2df4f5a792340196 (diff) | |
parent | 2e2b87d1cbdee3b919e6e5cba6c5ecd1b9434434 (diff) | |
download | hdf5-db30c2da68ece4a155e9e50c28ec16d6057509b2.zip hdf5-db30c2da68ece4a155e9e50c28ec16d6057509b2.tar.gz hdf5-db30c2da68ece4a155e9e50c28ec16d6057509b2.tar.bz2 |
Merge HDF5 1.10.7 release files into 1.10/masterhdf5-1_10_7
Diffstat (limited to 'src/H5Fquery.c')
-rw-r--r-- | src/H5Fquery.c | 103 |
1 files changed, 96 insertions, 7 deletions
diff --git a/src/H5Fquery.c b/src/H5Fquery.c index e02e402..32587bf 100644 --- a/src/H5Fquery.c +++ b/src/H5Fquery.c @@ -15,7 +15,7 @@ * * Created: H5Fquery.c * Jan 10 2008 - * Quincey Koziol <koziol@hdfgroup.org> + * Quincey Koziol * * Purpose: File structure query routines. * @@ -75,6 +75,28 @@ /*------------------------------------------------------------------------- + * Function: H5F_shared_get_intent + * + * Purpose: Quick and dirty routine to retrieve the file's 'intent' flags + * (Mainly added to stop non-file routines from poking about in the + * H5F_shared_t data structure) + * + * Return: 'intent' on success/abort on failure (shouldn't fail) + *------------------------------------------------------------------------- + */ +unsigned +H5F_shared_get_intent(const H5F_shared_t *f_sh) +{ + /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */ + FUNC_ENTER_NOAPI_NOINIT_NOERR + + HDassert(f_sh); + + FUNC_LEAVE_NOAPI(f_sh->flags) +} /* end H5F_shared_get_intent() */ + + +/*------------------------------------------------------------------------- * Function: H5F_get_intent * * Purpose: Quick and dirty routine to retrieve the file's 'intent' flags @@ -221,7 +243,7 @@ H5F_get_extpath(const H5F_t *f) * Return: 'shared' on success/abort on failure (shouldn't fail) *------------------------------------------------------------------------- */ -H5F_file_t * +H5F_shared_t * H5F_get_shared(const H5F_t *f) { /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */ @@ -277,11 +299,11 @@ H5F_get_nopen_objs(const H5F_t *f) /*------------------------------------------------------------------------- - * Function: H5F_get_file_id + * Function: H5F_get_file_id * - * Purpose: Retrieve the file's 'file_id' value + * Purpose: Retrieve the file's 'file_id' value * - * Return: 'file_id' on success/abort on failure (shouldn't fail) + * Return: 'file_id' on success/abort on failure (shouldn't fail) *------------------------------------------------------------------------- */ hid_t @@ -740,7 +762,6 @@ H5F_sieve_buf_size(const H5F_t *f) * Failure: (should not happen) * * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu * Jul 8 2005 * *------------------------------------------------------------------------- @@ -827,6 +848,27 @@ H5F_store_msg_crt_idx(const H5F_t *f) /*------------------------------------------------------------------------- + * Function: H5F_shared_has_feature + * + * Purpose: Check if a file has a particular feature enabled + * + * Return: Success: Non-negative - TRUE or FALSE + * Failure: Negative (should not happen) + *------------------------------------------------------------------------- + */ +hbool_t +H5F_shared_has_feature(const H5F_shared_t *f_sh, unsigned feature) +{ + /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */ + FUNC_ENTER_NOAPI_NOINIT_NOERR + + HDassert(f_sh); + + FUNC_LEAVE_NOAPI((hbool_t)(f_sh->lf->feature_flags & feature)) +} /* end H5F_shared_has_feature() */ + + +/*------------------------------------------------------------------------- * Function: H5F_has_feature * * Purpose: Check if a file has a particular feature enabled @@ -904,6 +946,32 @@ done: /*------------------------------------------------------------------------- + * Function: H5F_shared_get_eoa + * + * Purpose: Quick and dirty routine to retrieve the file's 'eoa' value + * + * Return: Non-negative on success/Negative on failure + *------------------------------------------------------------------------- + */ +haddr_t +H5F_shared_get_eoa(const H5F_shared_t *f_sh, H5FD_mem_t type) +{ + haddr_t ret_value = HADDR_UNDEF; /* Return value */ + + FUNC_ENTER_NOAPI(HADDR_UNDEF) + + HDassert(f_sh); + + /* Dispatch to driver */ + if(HADDR_UNDEF == (ret_value = H5FD_get_eoa(f_sh->lf, type))) + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, HADDR_UNDEF, "driver get_eoa request failed") + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5F_shared_get_eoa() */ + + +/*------------------------------------------------------------------------- * Function: H5F_get_eoa * * Purpose: Quick and dirty routine to retrieve the file's 'eoa' value @@ -923,7 +991,7 @@ H5F_get_eoa(const H5F_t *f, H5FD_mem_t type) /* Dispatch to driver */ if(HADDR_UNDEF == (ret_value = H5FD_get_eoa(f->shared->lf, type))) - HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, HADDR_UNDEF, "driver get_eoa request failed") + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, HADDR_UNDEF, "driver get_eoa request failed") done: FUNC_LEAVE_NOAPI(ret_value) @@ -1234,3 +1302,24 @@ H5F_get_eoa_pre_fsm_fsalloc(const H5F_t *f) FUNC_LEAVE_NOAPI(f->shared->eoa_pre_fsm_fsalloc) } /* end H5F_get_eoa_pre_fsm_fsalloc() */ + +/*------------------------------------------------------------------------- + * Function: H5F_get_file_locking + * + * Purpose: Get the file locking flag for the file + * + * Return: TRUE/FALSE + * + *------------------------------------------------------------------------- + */ +hbool_t +H5F_get_file_locking(const H5F_t *f) +{ + FUNC_ENTER_NOAPI_NOINIT_NOERR + + HDassert(f); + HDassert(f->shared); + + FUNC_LEAVE_NOAPI(f->shared->use_file_locking) +} /* end H5F_get_file_locking */ + |