summaryrefslogtreecommitdiffstats
path: root/src/H5HL.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2012-07-05 21:14:37 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2012-07-05 21:14:37 (GMT)
commit35f98ad8b6612eb76e1f8d01ee42dd6527a82c48 (patch)
tree1bd8aaaaaffe39feb38bae0c7363119c77e58b0a /src/H5HL.c
parentce0496520836aef9fdea54fc01d5d92fe8f43b77 (diff)
downloadhdf5-35f98ad8b6612eb76e1f8d01ee42dd6527a82c48.zip
hdf5-35f98ad8b6612eb76e1f8d01ee42dd6527a82c48.tar.gz
hdf5-35f98ad8b6612eb76e1f8d01ee42dd6527a82c48.tar.bz2
[svn-r22518] Added flush dependencies for SWMR to the local heap code.
Tested on jam. This branch still has h5diff errors. The library tests all pass, though.
Diffstat (limited to 'src/H5HL.c')
-rw-r--r--src/H5HL.c62
1 files changed, 62 insertions, 0 deletions
diff --git a/src/H5HL.c b/src/H5HL.c
index 3f1047c..76a6499 100644
--- a/src/H5HL.c
+++ b/src/H5HL.c
@@ -1083,3 +1083,65 @@ CATCH
H5E_THROW(H5E_CANTUNPROTECT, "unable to release local heap prefix");
END_FUNC(PRIV) /* end H5HL_heapsize() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5HL_depend
+ *
+ * Purpose: Create a child flush dependency between the local heap
+ * and another piece of metadata in the file.
+ *
+ * Return: Success: SUCCEED
+ * Failure: FAIL
+ *
+ * Programmer: Dana Robinson
+ * derobins@hdfgroup.org
+ * Fall 2011
+ *
+ *-------------------------------------------------------------------------
+ */
+BEGIN_FUNC(PRIV, ERR,
+herr_t, SUCCEED, FAIL,
+H5HL_depend(H5AC_info_t *parent_entry, H5HL_t *heap))
+
+ /* Check arguments */
+ HDassert(heap);
+
+ /* Set up a flush dependency between the parent entry and the local heap */
+ if(FAIL == H5HL__create_flush_depend(parent_entry, (H5AC_info_t *)heap))
+ H5E_THROW(H5E_CANTDEPEND, "unable to create flush dependency on file metadata");
+
+CATCH
+ /* No special processing on errors */
+END_FUNC(PRIV) /* end H5HL_depend() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5HL_undepend
+ *
+ * Purpose: Remove a child flush dependency between the local heap and
+ * another piece of metadata in the file.
+ *
+ * Return: Success: SUCCEED
+ * Failure: FAIL
+ *
+ * Programmer: Dana Robinson
+ * derobins@hdfgroup.org
+ * Fall 2011
+ *
+ *-------------------------------------------------------------------------
+ */
+BEGIN_FUNC(PRIV, ERR,
+herr_t, SUCCEED, FAIL,
+H5HL_undepend(H5AC_info_t *parent_entry, H5HL_t *heap))
+
+ /* Check arguments */
+ HDassert(heap);
+
+ /* Remove a flush dependency between the parent entry and the local heap */
+ if(FAIL == H5HL__destroy_flush_depend(parent_entry, (H5AC_info_t *)heap))
+ H5E_THROW(H5E_CANTUNDEPEND, "unable to destroy flush dependency on file metadata");
+
+CATCH
+ /* No special processing on errors */
+END_FUNC(PRIV) /* end H5HL_undepend() */