summaryrefslogtreecommitdiffstats
path: root/src/H5AC.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-05-10 20:35:35 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-05-10 20:35:35 (GMT)
commit670d598ff7a017cc4cbe1331b30ad645f04514a9 (patch)
tree30355200820c49c95ec44d14ed826e74df7459a5 /src/H5AC.c
parentc751cdab335b24e069570dcec8a39856dfa2cd98 (diff)
downloadhdf5-670d598ff7a017cc4cbe1331b30ad645f04514a9.zip
hdf5-670d598ff7a017cc4cbe1331b30ad645f04514a9.tar.gz
hdf5-670d598ff7a017cc4cbe1331b30ad645f04514a9.tar.bz2
[svn-r13745] Description:
Take further advantage of the readers/writer locking in the metadata cache and push the locking of the local heap up to the routines which call B-tree routines, which should drastically lower the number of metadata cache protect/ unprotect calls. Tested on: Mac OS X/32 10.4.9 (amazon) Linux/32 2.6 (chicago) Linux/64 2.6 (chicago2)
Diffstat (limited to 'src/H5AC.c')
-rw-r--r--src/H5AC.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/H5AC.c b/src/H5AC.c
index 720e663..31f757f 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -1912,6 +1912,10 @@ H5AC_protect(H5F_t *f,
HDassert(type->load);
HDassert(H5F_addr_defined(addr));
+ /* Check for invalid access request */
+ if(0 == (f->intent & H5F_ACC_RDWR) && rw == H5AC_WRITE)
+ HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, NULL, "no write intent on file")
+
#if H5AC__TRACE_FILE_ENABLED
/* For the protect call, only the addr and type id is really necessary
* in the trace file. Include the size of the entry protected as a