summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-06-04 19:11:15 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-06-04 19:11:15 (GMT)
commit3972bca34060b2691c51d461cb51d22892b76046 (patch)
treea5b85e34513e13db3b29351636e56b574a746b7f
parent3ac720455ad721c7f3a8d8f0daab9713809b3979 (diff)
downloadhdf5-3972bca34060b2691c51d461cb51d22892b76046.zip
hdf5-3972bca34060b2691c51d461cb51d22892b76046.tar.gz
hdf5-3972bca34060b2691c51d461cb51d22892b76046.tar.bz2
[svn-r17005] Description:
Correct error in unpinning an entry from outside the cache to correctly unpin the entry only when it is not being used for a flush dependency relation. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/Intel compilers w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode Mac OS X/32 10.5.7 (amazon) in debug mode Mac OS X/32 10.5.7 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
-rw-r--r--src/H5C.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/H5C.c b/src/H5C.c
index 8c67f10..03a77a3 100644
--- a/src/H5C.c
+++ b/src/H5C.c
@@ -2048,6 +2048,7 @@ if ( (cache_ptr)->index_size != \
(cache_ptr)->pel_tail_ptr, \
(cache_ptr)->pel_len, \
(cache_ptr)->pel_size, (fail_val)) \
+ HDassert( (cache_ptr)->pel_len >= 0 ); \
\
} else { \
\
@@ -2110,6 +2111,7 @@ if ( (cache_ptr)->index_size != \
(cache_ptr)->pel_tail_ptr, \
(cache_ptr)->pel_len, \
(cache_ptr)->pel_size, (fail_val)) \
+ HDassert( (cache_ptr)->pel_len >= 0 ); \
\
} else { \
\
@@ -2475,6 +2477,7 @@ if ( (cache_ptr)->index_size != \
H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->pel_head_ptr, \
(cache_ptr)->pel_tail_ptr, (cache_ptr)->pel_len, \
(cache_ptr)->pel_size, (fail_val)) \
+ HDassert( (cache_ptr)->pel_len >= 0 ); \
\
/* modified LRU specific code */ \
\
@@ -2527,6 +2530,7 @@ if ( (cache_ptr)->index_size != \
H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->pel_head_ptr, \
(cache_ptr)->pel_tail_ptr, (cache_ptr)->pel_len, \
(cache_ptr)->pel_size, (fail_val)) \
+ HDassert( (cache_ptr)->pel_len >= 0 ); \
\
/* modified LRU specific code */ \
\
@@ -7778,12 +7782,12 @@ H5C_unpin_entry_from_client(H5C_t * cache_ptr,
if(!entry_ptr->pinned_from_client)
HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPIN, FAIL, "Entry wasn't pinned by cache client")
- /* If requested, update the replacement policy if the entry is not protected */
- if(update_rp && !entry_ptr->is_protected)
- H5C__UPDATE_RP_FOR_UNPIN(cache_ptr, entry_ptr, FAIL)
-
/* Check if the entry is not pinned from a flush dependency */
if(!entry_ptr->pinned_from_cache) {
+ /* If requested, update the replacement policy if the entry is not protected */
+ if(update_rp && !entry_ptr->is_protected)
+ H5C__UPDATE_RP_FOR_UNPIN(cache_ptr, entry_ptr, FAIL)
+
/* Unpin the entry now */
entry_ptr->is_pinned = FALSE;