summaryrefslogtreecommitdiffstats
path: root/src/H5C.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-03-30 17:45:30 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-03-30 17:45:30 (GMT)
commitf8fa1029b7e056cc068583d5f08d788aa57e3635 (patch)
tree8f209b41c99651962e067a75364ce09cd3120659 /src/H5C.c
parent383f266ef1df526ea3ebeadd1b49099361ada7a9 (diff)
downloadhdf5-f8fa1029b7e056cc068583d5f08d788aa57e3635.zip
hdf5-f8fa1029b7e056cc068583d5f08d788aa57e3635.tar.gz
hdf5-f8fa1029b7e056cc068583d5f08d788aa57e3635.tar.bz2
[svn-r16625] Description:
Add mechanism for querying if an entry in the metadata cache is the parent or child in a flush dependency relationship. 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 production mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode Mac OS X/32 10.5.6 (amazon) in debug mode Mac OS X/32 10.5.6 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'src/H5C.c')
-rw-r--r--src/H5C.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/H5C.c b/src/H5C.c
index b7d64f9..4c9c9f4 100644
--- a/src/H5C.c
+++ b/src/H5C.c
@@ -4535,10 +4535,12 @@ H5C_get_entry_status(H5C_t * cache_ptr,
hbool_t * in_cache_ptr,
hbool_t * is_dirty_ptr,
hbool_t * is_protected_ptr,
- hbool_t * is_pinned_ptr)
+ hbool_t * is_pinned_ptr,
+ hbool_t * is_flush_dep_parent_ptr,
+ hbool_t * is_flush_dep_child_ptr)
{
- herr_t ret_value = SUCCEED; /* Return value */
H5C_cache_entry_t * entry_ptr = NULL;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5C_get_entry_status, FAIL)
@@ -4587,6 +4589,16 @@ H5C_get_entry_status(H5C_t * cache_ptr,
*is_pinned_ptr = entry_ptr->is_pinned;
}
+
+ if ( is_flush_dep_parent_ptr != NULL ) {
+
+ *is_flush_dep_parent_ptr = (entry_ptr->flush_dep_height > 0);
+ }
+
+ if ( is_flush_dep_child_ptr != NULL ) {
+
+ *is_flush_dep_child_ptr = (entry_ptr->flush_dep_parent != NULL);
+ }
}
done:
@@ -8715,8 +8727,8 @@ H5C_create_flush_dependency(H5C_t UNUSED * cache_ptr, void * parent_thing,
/* More sanity checks */
if(child_entry == parent_entry)
HGOTO_ERROR(H5E_CACHE, H5E_CANTDEPEND, FAIL, "Child entry flush dependency parent can't be itself")
- if(!parent_entry->is_protected)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTDEPEND, FAIL, "Parent entry isn't protected")
+ if(!(parent_entry->is_protected || parent_entry->is_pinned))
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTDEPEND, FAIL, "Parent entry isn't pinned or protected")
if(NULL != child_entry->flush_dep_parent)
HGOTO_ERROR(H5E_CACHE, H5E_CANTDEPEND, FAIL, "Child entry already has flush dependency parent")
{