summaryrefslogtreecommitdiffstats
path: root/src/H5EAint.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-03-31 16:46:04 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-03-31 16:46:04 (GMT)
commit0d1d64ad87c42dd3c283c0598295260826e3d819 (patch)
tree27d33b307f09e857794a12c0261f58bba56cf8b2 /src/H5EAint.c
parent6283a0c823407a24b3003d0936a0469b50b72f8d (diff)
downloadhdf5-0d1d64ad87c42dd3c283c0598295260826e3d819.zip
hdf5-0d1d64ad87c42dd3c283c0598295260826e3d819.tar.gz
hdf5-0d1d64ad87c42dd3c283c0598295260826e3d819.tar.bz2
[svn-r16633] Description:
Use metadata cache flush dependencies (and 'notify' callback) to give extensible arrays SWMR (single-writer/multiple-reader) access capability. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/Intel compilers w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode Mac OS X/32 10.5.6 (amazon) in debug mode Mac OS X/32 10.5.6 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'src/H5EAint.c')
-rw-r--r--src/H5EAint.c63
1 files changed, 63 insertions, 0 deletions
diff --git a/src/H5EAint.c b/src/H5EAint.c
index a53d4f9..5ce88fc 100644
--- a/src/H5EAint.c
+++ b/src/H5EAint.c
@@ -79,3 +79,66 @@
/*******************/
+
+/*-------------------------------------------------------------------------
+ * Function: H5EA__create_flush_depend
+ *
+ * Purpose: Create a flush dependency between two data structure components
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Quincey Koziol
+ * koziol@hdfgroup.org
+ * Mar 26 2009
+ *
+ *-------------------------------------------------------------------------
+ */
+BEGIN_FUNC(PKG, ERR,
+herr_t, SUCCEED, FAIL,
+H5EA__create_flush_depend(H5EA_hdr_t *hdr, H5AC_info_t *parent_entry,
+ H5AC_info_t *child_entry))
+
+ /* Sanity check */
+ HDassert(hdr);
+ HDassert(parent_entry);
+ HDassert(child_entry);
+
+ /* Create a flush dependency between parent and child entry */
+ if(H5AC_create_flush_dependency(hdr->f, parent_entry, child_entry) < 0)
+ H5E_THROW(H5E_CANTDEPEND, "unable to create flush dependency")
+
+CATCH
+
+END_FUNC(PKG) /* end H5EA__create_flush_depend() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5EA__destroy_flush_depend
+ *
+ * Purpose: Destroy a flush dependency between two data structure components
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Quincey Koziol
+ * koziol@hdfgroup.org
+ * Mar 26 2009
+ *
+ *-------------------------------------------------------------------------
+ */
+BEGIN_FUNC(PKG, ERR,
+herr_t, SUCCEED, FAIL,
+H5EA__destroy_flush_depend(H5EA_hdr_t *hdr, H5AC_info_t *parent_entry, H5AC_info_t *child_entry))
+
+ /* Sanity check */
+ HDassert(hdr);
+ HDassert(parent_entry);
+ HDassert(child_entry);
+
+ /* Destroy a flush dependency between parent and child entry */
+ if(H5AC_destroy_flush_dependency(hdr->f, parent_entry, child_entry) < 0)
+ H5E_THROW(H5E_CANTUNDEPEND, "unable to destroy flush dependency")
+
+CATCH
+
+END_FUNC(PKG) /* end H5EA__destroy_flush_depend() */
+