summaryrefslogtreecommitdiffstats
path: root/src/H5S.c
diff options
context:
space:
mode:
authorJohn Mainzer <mainzer@hdfgroup.org>2005-06-24 06:30:29 (GMT)
committerJohn Mainzer <mainzer@hdfgroup.org>2005-06-24 06:30:29 (GMT)
commit7f8e3460261851cdad1e344d8929d2817e3149ad (patch)
tree760d0e8dd581c4d4245a7e8acf51254f0c29d1ad /src/H5S.c
parent2ab6b12b552e9260e2e76640a788b5a3744c6a9f (diff)
downloadhdf5-7f8e3460261851cdad1e344d8929d2817e3149ad.zip
hdf5-7f8e3460261851cdad1e344d8929d2817e3149ad.tar.gz
hdf5-7f8e3460261851cdad1e344d8929d2817e3149ad.tar.bz2
[svn-r10978] Purpose:
Interim checkin of code changes moving management of the is_dirty flag into the cache code. Description: Prior to this checkin, management of the is_dirty flag was handled above the level of the metadata cache. This can no longer be allowed, as it introduces a race condition in the proposed fix for a cache coherency bug in PHDF5. Solution: Move management fo the is_dirty flag to the cache code proper. Entries are now marked as dirty via a flag on the unprotect call. Platforms tested: h5committested Misc. update:
Diffstat (limited to 'src/H5S.c')
-rw-r--r--src/H5S.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/H5S.c b/src/H5S.c
index de7da2e..075eb18 100644
--- a/src/H5S.c
+++ b/src/H5S.c
@@ -1089,10 +1089,16 @@ done:
*
* Modifications:
*
+ * John Mainzer, 6/6/05
+ * Updated function to use the new dirtied parameter of
+ * H5AC_unprotect() instead of manipulating the is_dirty
+ * field of the cache info.
+ *
*-------------------------------------------------------------------------
*/
herr_t
-H5S_append(H5F_t *f, hid_t dxpl_id, struct H5O_t *oh, const H5S_t *ds)
+H5S_append(H5F_t *f, hid_t dxpl_id, struct H5O_t *oh, const H5S_t *ds,
+ hbool_t * oh_dirtied_ptr)
{
herr_t ret_value=SUCCEED; /* Return value */
@@ -1101,12 +1107,13 @@ H5S_append(H5F_t *f, hid_t dxpl_id, struct H5O_t *oh, const H5S_t *ds)
assert(f);
assert(oh);
assert(ds);
+ assert(oh_dirtied_ptr);
switch (H5S_GET_EXTENT_TYPE(ds)) {
case H5S_NULL:
case H5S_SCALAR:
case H5S_SIMPLE:
- if (H5O_append(f, dxpl_id, oh, H5O_SDSPACE_ID, 0, &(ds->extent))<0)
+ if (H5O_append(f, dxpl_id, oh, H5O_SDSPACE_ID, 0, &(ds->extent), oh_dirtied_ptr)<0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "can't update simple data space message");
break;