diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2016-11-20 16:57:46 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2016-11-20 16:57:46 (GMT) |
commit | 4e7b19f8260a7adb0e3b3df30e2d8289fccdcca6 (patch) | |
tree | a8527d110745f16d07ef1fd8a29e8eea84ed57e5 /src/H5Fquery.c | |
parent | e10c0e7894699a4113074cd3e9212bafe56a5b40 (diff) | |
download | hdf5-4e7b19f8260a7adb0e3b3df30e2d8289fccdcca6.zip hdf5-4e7b19f8260a7adb0e3b3df30e2d8289fccdcca6.tar.gz hdf5-4e7b19f8260a7adb0e3b3df30e2d8289fccdcca6.tar.bz2 |
Two minor cache changes:
* Evict-on-close behavior is now skipped when the file is closing.
This fixes a potential issue discovered by Valgind on Windows
where potentially garbage data would be availble for manipulation.
* Added brackets to some code in the tagged entry evict iterators
so that the flag that determines if progress was made only gets
set if things are actually evicted. This prevents an infinite
loop (and emits an error) when pinned entries prevent eviction
and thus progress.
Diffstat (limited to 'src/H5Fquery.c')
-rw-r--r-- | src/H5Fquery.c | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/src/H5Fquery.c b/src/H5Fquery.c index 487eb85..e5e785e 100644 --- a/src/H5Fquery.c +++ b/src/H5Fquery.c @@ -837,7 +837,8 @@ H5F_get_fc_degree(const H5F_t *f) /*------------------------------------------------------------------------- * Function: H5F_get_evict_on_close * - * Purpose: Retrieve the 'file close degree' for the file. + * Purpose: Checks if evict-on-close is desired for objects in the + * file. * * Return: Success: Flag indicating whether the evict-on-close * property was set for the file. @@ -862,6 +863,31 @@ H5F_get_evict_on_close(const H5F_t *f) /*------------------------------------------------------------------------- + * Function: H5F_get_closing + * + * Purpose: Checks if the file is in the process of being closed. + * + * Return: Success: Flag indicating whether the file is closing. + * Failure: (can't happen) + * + * Programmer: Dana Robinson + * Fall 2016 + * + *------------------------------------------------------------------------- + */ +hbool_t +H5F_get_closing(const H5F_t *f) +{ + /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */ + FUNC_ENTER_NOAPI_NOINIT_NOERR + + HDassert(f); + + FUNC_LEAVE_NOAPI(f->closing) +} /* end H5F_get_closing() */ + + +/*------------------------------------------------------------------------- * Function: H5F_store_msg_crt_idx * * Purpose: Retrieve the 'store message creation index' flag for the file. |