summaryrefslogtreecommitdiffstats
path: root/src/H5Oflush.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2016-07-02 05:14:06 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2016-07-02 05:14:06 (GMT)
commit4f967d5029cd8e0080f5637efd403842394f87d0 (patch)
treef755ed97699afbffd21967f88b964c6dbed4b67c /src/H5Oflush.c
parentb72eff165916e1763a866211928507b36d58f3a5 (diff)
downloadhdf5-4f967d5029cd8e0080f5637efd403842394f87d0.zip
hdf5-4f967d5029cd8e0080f5637efd403842394f87d0.tar.gz
hdf5-4f967d5029cd8e0080f5637efd403842394f87d0.tar.bz2
[svn-r30139] Description:
Bring over missing flush+refresh routines, to address Java failures. Tested on: MacOSX/64 10.11.5 (amazon) w/serial, parallel & production Linux/64 2.6.18 (jam) w/Java
Diffstat (limited to 'src/H5Oflush.c')
-rw-r--r--src/H5Oflush.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/H5Oflush.c b/src/H5Oflush.c
index 6484dfd..4fc9c8e 100644
--- a/src/H5Oflush.c
+++ b/src/H5Oflush.c
@@ -177,6 +177,39 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_oh_tag() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5Orefresh
+ *
+ * Purpose: Refreshes all buffers associated with an object.
+ *
+ * Return: Non-negative on success, negative on failure
+ *
+ * Programmer: Mike McGreevy
+ * July 28, 2010
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5Orefresh(hid_t oid)
+{
+ H5O_loc_t *oloc; /* object location */
+ herr_t ret_value = SUCCEED; /* return value */
+
+ FUNC_ENTER_API(FAIL)
+ H5TRACE1("e", "i", oid);
+
+ /* Check args */
+ if(NULL == (oloc = H5O_get_loc(oid)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an object")
+
+ /* Private function */
+ if(H5O_refresh_metadata(oid, *oloc, H5AC_ind_read_dxpl_id) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "unable to refresh object")
+
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* end H5Orefresh() */
/*-------------------------------------------------------------------------