summaryrefslogtreecommitdiffstats
path: root/src/H5B2.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-04-19 18:43:10 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-04-19 18:43:10 (GMT)
commitaa96180fa906767b9fcdb096085148f53b13e5c4 (patch)
tree290289d176d3550f850c225ff75515f22d9b61b7 /src/H5B2.c
parent1d3bcea76904c11b2646d3fe4537503ee5fe1d10 (diff)
downloadhdf5-aa96180fa906767b9fcdb096085148f53b13e5c4.zip
hdf5-aa96180fa906767b9fcdb096085148f53b13e5c4.tar.gz
hdf5-aa96180fa906767b9fcdb096085148f53b13e5c4.tar.bz2
[svn-r13690] Description:
Fully enable readers/writer locking in metadata cache and correct errors in cache clients which were modifying a cache entry while only holding a read lock on it. Tested on: Mac OS X/32 10.4.9 (amazon) Linux/32 2.6 (chicago) Linux/64 2.6 (chicago2) FreeBSD/32 6.2 (duty) FreeBSD/64 6.2 (liberty)
Diffstat (limited to 'src/H5B2.c')
-rw-r--r--src/H5B2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/H5B2.c b/src/H5B2.c
index b7f372c..5a2d5ee 100644
--- a/src/H5B2.c
+++ b/src/H5B2.c
@@ -1137,7 +1137,7 @@ H5B2_modify(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type, haddr_t addr,
hbool_t changed; /* Whether the 'modify' callback changed the record */
/* Lock B-tree leaf node */
- if (NULL == (leaf = H5AC_protect(f, dxpl_id, H5AC_BT2_LEAF, curr_node_ptr.addr, &(curr_node_ptr.node_nrec), bt2_shared, H5AC_READ)))
+ if (NULL == (leaf = H5AC_protect(f, dxpl_id, H5AC_BT2_LEAF, curr_node_ptr.addr, &(curr_node_ptr.node_nrec), bt2_shared, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree internal node")
/* Locate record */
@@ -1173,7 +1173,7 @@ H5B2_modify(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type, haddr_t addr,
} /* end else */
/* Mark the node as dirty if it changed */
- leaf_flags |= changed ? H5AC__DIRTIED_FLAG : 0;
+ leaf_flags |= (changed ? H5AC__DIRTIED_FLAG : 0);
/* Unlock current node */
if (H5AC_unprotect(f, dxpl_id, H5AC_BT2_LEAF, curr_node_ptr.addr, leaf, leaf_flags) < 0)