summaryrefslogtreecommitdiffstats
path: root/src/H5ACdbg.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5ACdbg.c')
-rw-r--r--src/H5ACdbg.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/H5ACdbg.c b/src/H5ACdbg.c
index 6120242..8d99c6f 100644
--- a/src/H5ACdbg.c
+++ b/src/H5ACdbg.c
@@ -249,3 +249,43 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5AC__open_trace_file() */
+
+/*-------------------------------------------------------------------------
+ *
+ * Function: H5AC_cache_is_clean()
+ *
+ * Purpose: Debugging function that verifies that all rings in the
+ * metadata cache are clean from the outermost ring, inwards
+ * to the inner ring specified.
+ *
+ * Returns TRUE if all specified rings are clean, and FALSE
+ * if not. Throws an assertion failure on error.
+ *
+ * Return: TRUE if the indicated ring(s) are clean, and FALSE otherwise.
+ *
+ * Programmer: John Mainzer, 6/18/16
+ *
+ * Changes: None.
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifndef NDEBUG
+hbool_t
+H5AC_cache_is_clean(const H5F_t *f, H5AC_ring_t inner_ring)
+{
+ H5C_t *cache_ptr;
+ hbool_t ret_value; /* Return value */
+
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+ /* Sanity checks */
+ HDassert(f);
+ HDassert(f->shared);
+ cache_ptr = f->shared->cache;
+
+ ret_value = H5C_cache_is_clean(cache_ptr, inner_ring);
+
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5AC_cache_is_clean() */
+#endif /* NDEBUG */
+