summaryrefslogtreecommitdiffstats
path: root/src/H5Cquery.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@lbl.gov>2017-03-22 22:07:34 (GMT)
committerQuincey Koziol <koziol@lbl.gov>2017-03-22 22:07:34 (GMT)
commitdfc0b2f4f68e8fb47d2526262d6e51523537369e (patch)
treeec3ba075637c098d0354b173c711cc4a3163cbb5 /src/H5Cquery.c
parent30d5cf6c96d937b0ef5c97b43951ac778847d74c (diff)
parent46c9ab600de491657520897322b75659c3bdfb5f (diff)
downloadhdf5-dfc0b2f4f68e8fb47d2526262d6e51523537369e.zip
hdf5-dfc0b2f4f68e8fb47d2526262d6e51523537369e.tar.gz
hdf5-dfc0b2f4f68e8fb47d2526262d6e51523537369e.tar.bz2
Merge pull request #361 in HDFFV/hdf5 from merge_h5clear_revert to develop
* commit '46c9ab600de491657520897322b75659c3bdfb5f': Minor style cleanups Revert "Switch h5clear for cache images to use existing H5Pget_cache_image_config()"
Diffstat (limited to 'src/H5Cquery.c')
-rw-r--r--src/H5Cquery.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/H5Cquery.c b/src/H5Cquery.c
index 33a322d..5108013 100644
--- a/src/H5Cquery.c
+++ b/src/H5Cquery.c
@@ -454,3 +454,33 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_get_entry_ring() */
+/*-------------------------------------------------------------------------
+ * Function: H5C_get_mdc_image_info
+ *
+ * Purpose: To retrieve the address and size of the cache image in the file.
+ *
+ * Return: SUCCEED on success, and FAIL on failure.
+ *
+ * Programmer: Vailin Choi; March 2017
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5C_get_mdc_image_info(H5C_t * cache_ptr, haddr_t *image_addr, hsize_t *image_len)
+{
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI(FAIL)
+
+ if((cache_ptr == NULL) || (cache_ptr->magic != H5C__H5C_T_MAGIC))
+ HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "bad cache_ptr on entry")
+ if(image_addr == NULL || image_len == NULL)
+ HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "bad image_addr or image_len on entry")
+
+ *image_addr = cache_ptr->image_addr;
+ *image_len = cache_ptr->image_len;
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5C_get_mdc_image_info() */
+