summaryrefslogtreecommitdiffstats
path: root/test/cache.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2005-07-02 16:36:15 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2005-07-02 16:36:15 (GMT)
commitddf9e4a4afc81c4be4ce38a13641ada81204b6ac (patch)
treeefd184e9c0a5687a2927d655d7bd02e546fcfe5f /test/cache.c
parent4cf99e9f288d42bc756f1585c72ad584620fdec9 (diff)
downloadhdf5-ddf9e4a4afc81c4be4ce38a13641ada81204b6ac.zip
hdf5-ddf9e4a4afc81c4be4ce38a13641ada81204b6ac.tar.gz
hdf5-ddf9e4a4afc81c4be4ce38a13641ada81204b6ac.tar.bz2
[svn-r11014] Purpose:
Code cleanup Description: Refactor metadata cache to merge "dirtied" flag in with other flags for H5AC_unprotect and H5C_unprotect. Platforms tested: FreeBSD 4.11 (sleipnir) h5committest
Diffstat (limited to 'test/cache.c')
-rw-r--r--test/cache.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/cache.c b/test/cache.c
index e046a07..c53d8aa 100644
--- a/test/cache.c
+++ b/test/cache.c
@@ -2199,7 +2199,6 @@ unprotect_entry(H5C_t * cache_ptr,
unsigned int flags)
{
/* const char * fcn_name = "unprotect_entry()"; */
- hbool_t dirtied = FALSE;
herr_t result;
test_entry_t * base_addr;
test_entry_t * entry_ptr;
@@ -2221,13 +2220,13 @@ unprotect_entry(H5C_t * cache_ptr,
if ( ( dirty == TRUE ) || ( dirty == FALSE ) ) {
- dirtied = dirty;
+ flags |= (dirty ? H5AC__DIRTIED_FLAG : H5AC__NO_FLAGS_SET);
entry_ptr->is_dirty = (entry_ptr->is_dirty || dirty);
}
result = H5C_unprotect(NULL, -1, -1, cache_ptr, &(types[type]),
entry_ptr->addr, (void *)entry_ptr,
- dirtied, flags);
+ flags);
if ( ( result < 0 ) ||
( entry_ptr->header.is_protected ) ||
@@ -2246,7 +2245,8 @@ unprotect_entry(H5C_t * cache_ptr,
HDassert( ((entry_ptr->header).type)->id == type );
- if ( ( dirtied ) && ( (flags & H5C__DELETED_FLAG) == 0 ) ) {
+ if ( ( flags & H5AC__DIRTIED_FLAG ) != 0
+ && ( (flags & H5C__DELETED_FLAG) == 0 ) ) {
HDassert( entry_ptr->header.is_dirty );
HDassert( entry_ptr->is_dirty );
@@ -8568,7 +8568,7 @@ check_double_unprotect_err(void)
result = H5C_unprotect(NULL, -1, -1, cache_ptr, &(types[0]),
entry_ptr->addr, (void *)entry_ptr,
- FALSE, H5C__NO_FLAGS_SET);
+ H5C__NO_FLAGS_SET);
if ( result > 0 ) {