summaryrefslogtreecommitdiffstats
path: root/src/H5C.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/H5C.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/H5C.c')
-rw-r--r--src/H5C.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/H5C.c b/src/H5C.c
index 08ef464..d9951fe 100644
--- a/src/H5C.c
+++ b/src/H5C.c
@@ -2996,7 +2996,6 @@ H5C_create(size_t max_cache_size,
((cache_ptr->epoch_markers)[i]).is_protected = FALSE;
((cache_ptr->epoch_markers)[i]).is_read_only = FALSE;
((cache_ptr->epoch_markers)[i]).ro_ref_count = 0;
- ((cache_ptr->epoch_markers)[i]).max_ro_ref_count = 0;
((cache_ptr->epoch_markers)[i]).is_pinned = FALSE;
((cache_ptr->epoch_markers)[i]).in_slist = FALSE;
((cache_ptr->epoch_markers)[i]).ht_next = NULL;
@@ -4569,7 +4568,6 @@ H5C_insert_entry(H5F_t * f,
entry_ptr->is_protected = FALSE;
entry_ptr->is_read_only = FALSE;
entry_ptr->ro_ref_count = 0;
- entry_ptr->max_ro_ref_count = 0; /* JRM - delete this when possible */
entry_ptr->is_pinned = insert_pinned;
@@ -5730,11 +5728,6 @@ H5C_protect(H5F_t * f,
(entry_ptr->ro_ref_count)++;
- /* JRM - delete this when possible */
- if ( entry_ptr->ro_ref_count > entry_ptr->max_ro_ref_count ) {
-
- entry_ptr->max_ro_ref_count = entry_ptr->ro_ref_count;
- }
} else {
HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, NULL, \
@@ -5750,7 +5743,6 @@ H5C_protect(H5F_t * f,
entry_ptr->is_read_only = TRUE;
entry_ptr->ro_ref_count = 1;
- entry_ptr->max_ro_ref_count = 1;
}
entry_ptr->dirtied = FALSE;
@@ -7098,9 +7090,7 @@ H5C_unprotect(H5F_t * f,
HDassert( entry_ptr->ro_ref_count == 1 );
- if ( ( dirtied ) &&
- /* JRM - delete the following line when possible */
- ( entry_ptr->max_ro_ref_count > 1 ) ) {
+ if ( dirtied ) {
HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, \
"Read only entry modified(2)??")
@@ -7108,7 +7098,6 @@ H5C_unprotect(H5F_t * f,
entry_ptr->is_read_only = FALSE;
entry_ptr->ro_ref_count = 0;
- entry_ptr->max_ro_ref_count = 0;
}
#ifdef H5_HAVE_PARALLEL
@@ -9709,7 +9698,6 @@ H5C_load_entry(H5F_t * f,
entry_ptr->is_protected = FALSE;
entry_ptr->is_read_only = FALSE;
entry_ptr->ro_ref_count = 0;
- entry_ptr->max_ro_ref_count = 0; /* JRM - delete this when possible */
entry_ptr->in_slist = FALSE;
entry_ptr->flush_marker = FALSE;
#ifdef H5_HAVE_PARALLEL