summaryrefslogtreecommitdiffstats
path: root/src/H5AC.c
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2014-01-08 17:09:23 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2014-01-08 17:09:23 (GMT)
commita196a4f351abed0670c10bc50887bd4e56dd4775 (patch)
treecc56e2d57884eae938e6606624d0c619d6dfe541 /src/H5AC.c
parent955c0736022947649441634f7ee3dc5c973085d4 (diff)
downloadhdf5-a196a4f351abed0670c10bc50887bd4e56dd4775.zip
hdf5-a196a4f351abed0670c10bc50887bd4e56dd4775.tar.gz
hdf5-a196a4f351abed0670c10bc50887bd4e56dd4775.tar.bz2
[svn-r24622] Implementation (pending code review) for:
(A) SWMR related public routines: H5Fstart_swmr_write, H5Pget/set_append_flush, H5Pget/set_object_flush_cb. (B) File locking. Tested on jam, koala, ostrich, platypus.
Diffstat (limited to 'src/H5AC.c')
-rw-r--r--src/H5AC.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/H5AC.c b/src/H5AC.c
index 46b5785..18da8de 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -730,6 +730,39 @@ done:
/*-------------------------------------------------------------------------
+ * Function: H5AC_evict
+ *
+ * Purpose: Evict all entries except the pinned entries
+ * in the cache.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Vailin Choi; Dec 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5AC_evict(H5F_t *f, hid_t dxpl_id)
+{
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI(FAIL)
+
+ /* Sanity check */
+ HDassert(f);
+ HDassert(f->shared);
+ HDassert(f->shared->cache);
+
+ /* Evict all entries in the cache except the pinned superblock entry */
+ if(H5C_evict(f, dxpl_id, H5AC_noblock_dxpl_id) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTFREE, FAIL, "can't evict cache")
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5AC_evict() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5AC_expunge_entry
*
* Purpose: Expunge the target entry from the cache without writing it