summaryrefslogtreecommitdiffstats
path: root/test
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
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')
-rw-r--r--test/cache.c10
-rw-r--r--test/lheap.c3
2 files changed, 7 insertions, 6 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 ) {
diff --git a/test/lheap.c b/test/lheap.c
index 5fcccf3..09343e9 100644
--- a/test/lheap.c
+++ b/test/lheap.c
@@ -19,6 +19,7 @@
* Purpose: Test local heaps used by symbol tables (groups).
*/
#include "h5test.h"
+#include "H5ACprivate.h"
#include "H5HLprivate.h"
#include "H5Iprivate.h"
@@ -137,7 +138,7 @@ main(void)
goto error;
}
- if (H5HL_unprotect(f, H5P_DATASET_XFER_DEFAULT, heap, heap_addr, FALSE) < 0) {
+ if (H5HL_unprotect(f, H5P_DATASET_XFER_DEFAULT, heap, heap_addr, H5AC__NO_FLAGS_SET) < 0) {
H5_FAILED();
H5Eprint_stack(H5E_DEFAULT, stdout);
goto error;