summaryrefslogtreecommitdiffstats
path: root/test/cache_common.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-05-18 12:14:44 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-05-18 12:14:44 (GMT)
commit2fc65cf787c134a7c1d7c12d0a990c56d21d381e (patch)
treeea6fa916e2b136579861f34ff026360758d44664 /test/cache_common.c
parentef8cfc3e9f1fa4819e0e7dfffc7231c44365995c (diff)
downloadhdf5-2fc65cf787c134a7c1d7c12d0a990c56d21d381e.zip
hdf5-2fc65cf787c134a7c1d7c12d0a990c56d21d381e.tar.gz
hdf5-2fc65cf787c134a7c1d7c12d0a990c56d21d381e.tar.bz2
[svn-r18837] Description:
Remove the size parameter from H5[A]C_unprotect() and the H5[A]C__SIZE_CHANGED_FLAG, switching all clients & tests over to using H5[A]C_resize_entry appropriately. 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/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (amani) 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-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode Mac OS X/32 10.6.3 (amazon) in debug mode Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'test/cache_common.c')
-rw-r--r--test/cache_common.c308
1 files changed, 55 insertions, 253 deletions
diff --git a/test/cache_common.c b/test/cache_common.c
index 6ee8f54..68803ad 100644
--- a/test/cache_common.c
+++ b/test/cache_common.c
@@ -1418,8 +1418,7 @@ create_pinned_entry_dependency(H5F_t * file_ptr,
if ( pinned_entry_ptr->pinning_ref_count == 0 ) {
protect_entry(file_ptr, pinned_type, pinned_idx);
- unprotect_entry(file_ptr, pinned_type, pinned_idx, FALSE,
- H5C__PIN_ENTRY_FLAG);
+ unprotect_entry(file_ptr, pinned_type, pinned_idx, H5C__PIN_ENTRY_FLAG);
}
(pinned_entry_ptr->pinning_ref_count)++;
@@ -1499,7 +1498,7 @@ dirty_entry(H5F_t * file_ptr,
} else {
protect_entry(file_ptr, type, idx);
- unprotect_entry(file_ptr, type, idx, TRUE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, type, idx, H5C__DIRTIED_FLAG);
}
}
@@ -1825,7 +1824,7 @@ reset_entries(void)
* Note that at present, the type of the entry must be
* VARIABLE_ENTRY_TYPE.
*
- * If the resize_pin parameter is true, verify that the
+ * If the in_cache parameter is true, verify that the
* target entry is in the cache. If it
* isn't, scream and die. If it is, use the
* H5C_resize_entry() call to resize it.
@@ -1845,7 +1844,7 @@ resize_entry(H5F_t * file_ptr,
int32_t type,
int32_t idx,
size_t new_size,
- hbool_t resize_pin)
+ hbool_t in_cache)
{
test_entry_t * base_addr;
test_entry_t * entry_ptr;
@@ -1865,7 +1864,7 @@ resize_entry(H5F_t * file_ptr,
HDassert( entry_ptr->type == type );
HDassert( entry_ptr == entry_ptr->self );
- if ( resize_pin ) {
+ if ( in_cache ) {
H5C_t *cache_ptr = file_ptr->shared->cache;
HDassert( cache_ptr );
@@ -1904,8 +1903,8 @@ resize_entry(H5F_t * file_ptr,
} else {
protect_entry(file_ptr, type, idx);
- unprotect_entry_with_size_change(file_ptr, type, idx,
- H5C__SIZE_CHANGED_FLAG, new_size);
+ resize_entry(file_ptr, type, idx, new_size, TRUE);
+ unprotect_entry(file_ptr, type, idx, H5C__DIRTIED_FLAG);
}
}
@@ -2906,12 +2905,7 @@ flush_cache(H5F_t * file_ptr,
/*-------------------------------------------------------------------------
* Function: insert_entry()
*
- * Purpose: Insert the entry indicated by the type and index. Mark
- * it clean or dirty as indicated.
- *
- * Note that I don't see much practical use for inserting
- * a clean entry, but the interface permits it so we should
- * test it.
+ * Purpose: Insert the entry indicated by the type and index.
*
* Do nothing if pass is false.
*
@@ -2927,7 +2921,6 @@ void
insert_entry(H5F_t * file_ptr,
int32_t type,
int32_t idx,
- hbool_t UNUSED dirty,
unsigned int flags)
{
H5C_t * cache_ptr;
@@ -3490,7 +3483,6 @@ void
unprotect_entry(H5F_t * file_ptr,
int32_t type,
int32_t idx,
- int dirty,
unsigned int flags)
{
/* const char * fcn_name = "unprotect_entry()"; */
@@ -3526,15 +3518,11 @@ unprotect_entry(H5F_t * file_ptr,
HDassert ( ( ! pin_flag_set ) || ( ! (entry_ptr->is_pinned) ) );
HDassert ( ( ! unpin_flag_set ) || ( entry_ptr->is_pinned ) );
- if ( ( dirty == TRUE ) || ( dirty == FALSE ) ) {
-
- flags |= (dirty ? H5C__DIRTIED_FLAG : H5C__NO_FLAGS_SET);
- entry_ptr->is_dirty = (hbool_t)(entry_ptr->is_dirty || dirty);
- }
+ if(flags & H5C__DIRTIED_FLAG)
+ entry_ptr->is_dirty = TRUE;
result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
- &(types[type]), entry_ptr->addr, (void *)entry_ptr, flags,
- (size_t)0);
+ &(types[type]), entry_ptr->addr, (void *)entry_ptr, flags);
if ( ( result < 0 ) ||
( ( entry_ptr->header.is_protected ) &&
@@ -3621,152 +3609,6 @@ unprotect_entry(H5F_t * file_ptr,
/*-------------------------------------------------------------------------
- * Function: unprotect_entry_with_size_change()
- *
- * Purpose: Version of unprotect_entry() that allow access to the new
- * size change parameters in H5C_unprotect_entry()
- *
- * At present, only the sizes of VARIABLE_ENTRY_TYPE entries
- * can be changed. Thus this function will scream and die
- * if the H5C__SIZE_CHANGED_FLAG is set and the type is not
- * VARIABLE_ENTRY_TYPE.
- *
- * Do nothing if pass is FALSE on entry.
- *
- * Return: void
- *
- * Programmer: John Mainzer
- * 8/31/06
- *
- *-------------------------------------------------------------------------
- */
-
-void
-unprotect_entry_with_size_change(H5F_t * file_ptr,
- int32_t type,
- int32_t idx,
- unsigned int flags,
- size_t new_size)
-{
- const char * fcn_name = "unprotect_entry_with_size_change()";
- herr_t result;
- hbool_t dirty_flag_set;
- hbool_t pin_flag_set;
- hbool_t unpin_flag_set;
- hbool_t size_changed_flag_set;
- test_entry_t * base_addr;
- test_entry_t * entry_ptr;
-
- if ( pass ) {
-#ifndef NDEBUG
- H5C_t * cache_ptr;
-
- cache_ptr = file_ptr->shared->cache;
-
- HDassert( cache_ptr );
-#endif /* NDEBUG */
- HDassert( ( 0 <= type ) && ( type < NUMBER_OF_ENTRY_TYPES ) );
- HDassert( ( 0 <= idx ) && ( idx <= max_indices[type] ) );
- HDassert( new_size <= entry_sizes[type] );
-
- base_addr = entries[type];
- entry_ptr = &(base_addr[idx]);
-
- HDassert( entry_ptr->index == idx );
- HDassert( entry_ptr->type == type );
- HDassert( entry_ptr == entry_ptr->self );
- HDassert( entry_ptr->cache_ptr == cache_ptr );
- HDassert( entry_ptr->header.is_protected );
- HDassert( entry_ptr->is_protected );
-
- dirty_flag_set = (hbool_t)((flags & H5C__DIRTIED_FLAG) != 0 );
- pin_flag_set = (hbool_t)((flags & H5C__PIN_ENTRY_FLAG) != 0 );
- unpin_flag_set = (hbool_t)((flags & H5C__UNPIN_ENTRY_FLAG) != 0 );
- size_changed_flag_set = (hbool_t)((flags & H5C__SIZE_CHANGED_FLAG) != 0 );
-
- HDassert ( ! ( pin_flag_set && unpin_flag_set ) );
- HDassert ( ( ! pin_flag_set ) || ( ! (entry_ptr->is_pinned) ) );
- HDassert ( ( ! unpin_flag_set ) || ( entry_ptr->is_pinned ) );
- HDassert ( ( ! size_changed_flag_set ) || ( new_size > 0 ) );
- HDassert ( ( ! size_changed_flag_set ) ||
- ( type == VARIABLE_ENTRY_TYPE ) );
-
- entry_ptr->is_dirty = (hbool_t)(entry_ptr->is_dirty || dirty_flag_set);
-
- if ( size_changed_flag_set ) {
-
- entry_ptr->is_dirty = TRUE;
- entry_ptr->size = new_size;
- }
-
- result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
- &(types[type]), entry_ptr->addr, (void *)entry_ptr, flags,
- new_size);
-
- if ( ( result < 0 ) ||
- ( entry_ptr->header.is_protected ) ||
- ( entry_ptr->header.type != &(types[type]) ) ||
- ( entry_ptr->size != entry_ptr->header.size ) ||
- ( entry_ptr->addr != entry_ptr->header.addr ) ) {
-
- if ( result < 0 )
- HDfprintf(stdout, "%s: H5C_unprotect() failed.\n", fcn_name);
-
- if ( entry_ptr->header.is_protected )
- HDfprintf(stdout, "%s: entry still protected?!?.\n", fcn_name);
-
- if ( entry_ptr->header.type != &(types[type]) )
- HDfprintf(stdout, "%s: entry has bad type after unprotect.\n", fcn_name);
-
- if ( entry_ptr->size != entry_ptr->header.size )
- HDfprintf(stdout, "%s: bad entry size after unprotect. e/a = %d/%d\n", fcn_name,
- (int)(entry_ptr->size),
- (int)(entry_ptr->header.size));
-
- if ( entry_ptr->addr != entry_ptr->header.addr )
- HDfprintf(stdout, "%s: bad entry addr after unprotect. e/a = 0x%llx/0x%llx\n", fcn_name,
- (long long)(entry_ptr->addr),
- (long long)(entry_ptr->header.addr));
-
- pass = FALSE;
- failure_mssg = "error in H5C_unprotect().";
-
- }
- else
- {
- entry_ptr->is_protected = FALSE;
-
- if ( pin_flag_set ) {
-
- HDassert ( entry_ptr->header.is_pinned );
- entry_ptr->pinned_from_client = TRUE;
- entry_ptr->is_pinned = TRUE;
-
- } else if ( unpin_flag_set ) {
-
- HDassert ( entry_ptr->header.is_pinned == entry_ptr->header.pinned_from_cache );
- entry_ptr->pinned_from_client = FALSE;
- entry_ptr->is_pinned = entry_ptr->pinned_from_cache;
-
- }
- }
-
- HDassert( ((entry_ptr->header).type)->id == type );
-
- if ( ( flags & H5C__DIRTIED_FLAG ) != 0
- && ( (flags & H5C__DELETED_FLAG) == 0 ) ) {
-
- HDassert( entry_ptr->header.is_dirty );
- HDassert( entry_ptr->is_dirty );
- }
- }
-
- return;
-
-} /* unprotect_entry_with_size_change() */
-
-
-/*-------------------------------------------------------------------------
* Function: row_major_scan_forward()
*
* Purpose: Do a sequence of inserts, protects, unprotects, moves,
@@ -3789,7 +3631,6 @@ row_major_scan_forward(H5F_t * file_ptr,
hbool_t display_stats,
hbool_t display_detailed_stats,
hbool_t do_inserts,
- hbool_t dirty_inserts,
hbool_t do_moves,
hbool_t move_to_main_addr,
hbool_t do_destroys,
@@ -3838,8 +3679,7 @@ row_major_scan_forward(H5F_t * file_ptr,
if ( verbose )
HDfprintf(stdout, "(i, %d, %d) ", type, (idx + lag));
- insert_entry(file_ptr, type, (idx + lag), dirty_inserts,
- H5C__NO_FLAGS_SET);
+ insert_entry(file_ptr, type, (idx + lag), H5C__NO_FLAGS_SET);
}
@@ -3860,8 +3700,7 @@ row_major_scan_forward(H5F_t * file_ptr,
if ( verbose )
HDfprintf(stdout, "(u, %d, %d) ", type, (idx + lag - 2));
- unprotect_entry(file_ptr, type, idx+lag-2, NO_CHANGE,
- H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, type, idx+lag-2, H5C__NO_FLAGS_SET);
}
@@ -3891,8 +3730,7 @@ row_major_scan_forward(H5F_t * file_ptr,
if ( verbose )
HDfprintf(stdout, "(u, %d, %d) ", type, (idx + lag - 5));
- unprotect_entry(file_ptr, type, idx+lag-5, NO_CHANGE,
- H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, type, idx+lag-5, H5C__NO_FLAGS_SET);
}
if ( do_mult_ro_protects )
@@ -3938,8 +3776,7 @@ row_major_scan_forward(H5F_t * file_ptr,
HDfprintf(stdout, "(u-ro, %d, %d) ", type,
(idx + lag - 7));
- unprotect_entry(file_ptr, type, (idx + lag - 7),
- FALSE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, type, (idx + lag - 7), H5C__NO_FLAGS_SET);
}
if ( ( pass ) && ( (idx + lag - 8) >= 0 ) &&
@@ -3950,8 +3787,7 @@ row_major_scan_forward(H5F_t * file_ptr,
HDfprintf(stdout, "(u-ro, %d, %d) ", type,
(idx + lag - 8));
- unprotect_entry(file_ptr, type, (idx + lag - 8),
- FALSE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, type, (idx + lag - 8), H5C__NO_FLAGS_SET);
}
if ( ( pass ) && ( (idx + lag - 9) >= 0 ) &&
@@ -3962,8 +3798,7 @@ row_major_scan_forward(H5F_t * file_ptr,
HDfprintf(stdout, "(u-ro, %d, %d) ", type,
(idx + lag - 9));
- unprotect_entry(file_ptr, type, (idx + lag - 9),
- FALSE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, type, (idx + lag - 9), H5C__NO_FLAGS_SET);
}
} /* if ( do_mult_ro_protects ) */
@@ -3982,8 +3817,7 @@ row_major_scan_forward(H5F_t * file_ptr,
if ( verbose )
HDfprintf(stdout, "(u, %d, %d) ", type, (idx - lag + 2));
- unprotect_entry(file_ptr, type, idx-lag+2, NO_CHANGE,
- H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, type, idx-lag+2, H5C__NO_FLAGS_SET);
}
if ( ( pass ) && ( (idx - lag + 1) >= 0 ) &&
@@ -4005,38 +3839,33 @@ row_major_scan_forward(H5F_t * file_ptr,
switch ( (idx - lag) %4 ) {
case 0: /* we just did an insert */
- unprotect_entry(file_ptr, type, idx - lag,
- NO_CHANGE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, type, idx - lag, H5C__NO_FLAGS_SET);
break;
case 1:
if ( (entries[type])[idx-lag].is_dirty ) {
- unprotect_entry(file_ptr, type, idx - lag,
- NO_CHANGE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, type, idx - lag, H5C__NO_FLAGS_SET);
} else {
unprotect_entry(file_ptr, type, idx - lag,
- dirty_unprotects,
- H5C__NO_FLAGS_SET);
+ (dirty_unprotects ? H5C__DIRTIED_FLAG : H5C__NO_FLAGS_SET));
}
break;
case 2: /* we just did an insrt */
- unprotect_entry(file_ptr, type, idx - lag,
- NO_CHANGE, H5C__DELETED_FLAG);
+ unprotect_entry(file_ptr, type, idx - lag, H5C__DELETED_FLAG);
break;
case 3:
if ( (entries[type])[idx-lag].is_dirty ) {
- unprotect_entry(file_ptr, type, idx - lag,
- NO_CHANGE, H5C__DELETED_FLAG);
+ unprotect_entry(file_ptr, type, idx - lag, H5C__DELETED_FLAG);
} else {
unprotect_entry(file_ptr, type, idx - lag,
- dirty_destroys,
- H5C__DELETED_FLAG);
+ (dirty_destroys ? H5C__DIRTIED_FLAG : H5C__NO_FLAGS_SET)
+ | H5C__DELETED_FLAG);
}
break;
@@ -4055,7 +3884,7 @@ row_major_scan_forward(H5F_t * file_ptr,
HDfprintf(stdout, "(u, %d, %d) ", type, (idx - lag));
unprotect_entry(file_ptr, type, idx - lag,
- dirty_unprotects, H5C__NO_FLAGS_SET);
+ (dirty_unprotects ? H5C__DIRTIED_FLAG : H5C__NO_FLAGS_SET));
}
}
@@ -4099,8 +3928,7 @@ hl_row_major_scan_forward(H5F_t * file_ptr,
hbool_t reset_stats,
hbool_t display_stats,
hbool_t display_detailed_stats,
- hbool_t do_inserts,
- hbool_t dirty_inserts)
+ hbool_t do_inserts)
{
const char * fcn_name = "hl_row_major_scan_forward";
H5C_t * cache_ptr;
@@ -4144,8 +3972,7 @@ hl_row_major_scan_forward(H5F_t * file_ptr,
if ( verbose )
HDfprintf(stdout, "(i, %d, %d) ", type, (idx + lag));
- insert_entry(file_ptr, type, (idx + lag), dirty_inserts,
- H5C__NO_FLAGS_SET);
+ insert_entry(file_ptr, type, (idx + lag), H5C__NO_FLAGS_SET);
}
i = idx;
@@ -4162,8 +3989,7 @@ hl_row_major_scan_forward(H5F_t * file_ptr,
if ( verbose )
HDfprintf(stdout, "(u, %d, %d) ", type, i);
- unprotect_entry(file_ptr, type, i, NO_CHANGE,
- H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, type, i, H5C__NO_FLAGS_SET);
}
i--;
}
@@ -4209,7 +4035,6 @@ row_major_scan_backward(H5F_t * file_ptr,
hbool_t display_stats,
hbool_t display_detailed_stats,
hbool_t do_inserts,
- hbool_t dirty_inserts,
hbool_t do_moves,
hbool_t move_to_main_addr,
hbool_t do_destroys,
@@ -4252,8 +4077,7 @@ row_major_scan_backward(H5F_t * file_ptr,
if ( verbose )
HDfprintf(stdout, "(i, %d, %d) ", type, (idx - lag));
- insert_entry(file_ptr, type, (idx - lag), dirty_inserts,
- H5C__NO_FLAGS_SET);
+ insert_entry(file_ptr, type, (idx - lag), H5C__NO_FLAGS_SET);
}
@@ -4274,8 +4098,7 @@ row_major_scan_backward(H5F_t * file_ptr,
if ( verbose )
HDfprintf(stdout, "(u, %d, %d) ", type, (idx - lag + 2));
- unprotect_entry(file_ptr, type, idx-lag+2, NO_CHANGE,
- H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, type, idx-lag+2, H5C__NO_FLAGS_SET);
}
@@ -4305,8 +4128,7 @@ row_major_scan_backward(H5F_t * file_ptr,
if ( verbose )
HDfprintf(stdout, "(u, %d, %d) ", type, (idx - lag + 5));
- unprotect_entry(file_ptr, type, idx-lag+5, NO_CHANGE,
- H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, type, idx-lag+5, H5C__NO_FLAGS_SET);
}
if ( do_mult_ro_protects )
@@ -4352,8 +4174,7 @@ row_major_scan_backward(H5F_t * file_ptr,
HDfprintf(stdout, "(u-ro, %d, %d) ", type,
(idx - lag + 7));
- unprotect_entry(file_ptr, type, (idx - lag + 7),
- FALSE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, type, (idx - lag + 7), H5C__NO_FLAGS_SET);
}
if ( ( pass ) && ( (idx - lag + 8) >= 0 ) &&
@@ -4364,8 +4185,7 @@ row_major_scan_backward(H5F_t * file_ptr,
HDfprintf(stdout, "(u-ro, %d, %d) ", type,
(idx - lag + 8));
- unprotect_entry(file_ptr, type, (idx - lag + 8),
- FALSE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, type, (idx - lag + 8), H5C__NO_FLAGS_SET);
}
if ( ( pass ) && ( (idx - lag + 9) >= 0 ) &&
@@ -4376,8 +4196,7 @@ row_major_scan_backward(H5F_t * file_ptr,
HDfprintf(stdout, "(u-ro, %d, %d) ", type,
(idx - lag + 9));
- unprotect_entry(file_ptr, type, (idx - lag + 9),
- FALSE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, type, (idx - lag + 9), H5C__NO_FLAGS_SET);
}
} /* if ( do_mult_ro_protects ) */
@@ -4397,8 +4216,7 @@ row_major_scan_backward(H5F_t * file_ptr,
if ( verbose )
HDfprintf(stdout, "(u, %d, %d) ", type, (idx + lag - 2));
- unprotect_entry(file_ptr, type, idx+lag-2, NO_CHANGE,
- H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, type, idx+lag-2, H5C__NO_FLAGS_SET);
}
if ( ( pass ) && ( (idx + lag - 1) >= 0 ) &&
@@ -4422,37 +4240,32 @@ row_major_scan_backward(H5F_t * file_ptr,
case 0:
if ( (entries[type])[idx+lag].is_dirty ) {
- unprotect_entry(file_ptr, type, idx + lag,
- NO_CHANGE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, type, idx + lag, H5C__NO_FLAGS_SET);
} else {
unprotect_entry(file_ptr, type, idx + lag,
- dirty_unprotects,
- H5C__NO_FLAGS_SET);
+ (dirty_unprotects ? H5C__DIRTIED_FLAG : H5C__NO_FLAGS_SET));
}
break;
case 1: /* we just did an insert */
- unprotect_entry(file_ptr, type, idx + lag,
- NO_CHANGE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, type, idx + lag, H5C__NO_FLAGS_SET);
break;
case 2:
if ( (entries[type])[idx + lag].is_dirty ) {
- unprotect_entry(file_ptr, type, idx + lag,
- NO_CHANGE, H5C__DELETED_FLAG);
+ unprotect_entry(file_ptr, type, idx + lag, H5C__DELETED_FLAG);
} else {
unprotect_entry(file_ptr, type, idx + lag,
- dirty_destroys,
- H5C__DELETED_FLAG);
+ (dirty_destroys ? H5C__DIRTIED_FLAG : H5C__NO_FLAGS_SET)
+ | H5C__DELETED_FLAG);
}
break;
case 3: /* we just did an insrt */
- unprotect_entry(file_ptr, type, idx + lag,
- NO_CHANGE, H5C__DELETED_FLAG);
+ unprotect_entry(file_ptr, type, idx + lag, H5C__DELETED_FLAG);
break;
default:
@@ -4469,7 +4282,7 @@ row_major_scan_backward(H5F_t * file_ptr,
HDfprintf(stdout, "(u, %d, %d) ", type, (idx - lag));
unprotect_entry(file_ptr, type, idx + lag,
- dirty_unprotects, H5C__NO_FLAGS_SET);
+ (dirty_unprotects ? H5C__DIRTIED_FLAG : H5C__NO_FLAGS_SET));
}
}
@@ -4513,8 +4326,7 @@ hl_row_major_scan_backward(H5F_t * file_ptr,
hbool_t reset_stats,
hbool_t display_stats,
hbool_t display_detailed_stats,
- hbool_t do_inserts,
- hbool_t dirty_inserts)
+ hbool_t do_inserts)
{
const char * fcn_name = "hl_row_major_scan_backward";
H5C_t * cache_ptr;
@@ -4558,8 +4370,7 @@ hl_row_major_scan_backward(H5F_t * file_ptr,
if ( verbose )
HDfprintf(stdout, "(i, %d, %d) ", type, (idx + lag));
- insert_entry(file_ptr, type, (idx + lag), dirty_inserts,
- H5C__NO_FLAGS_SET);
+ insert_entry(file_ptr, type, (idx + lag), H5C__NO_FLAGS_SET);
}
i = idx;
@@ -4576,8 +4387,7 @@ hl_row_major_scan_backward(H5F_t * file_ptr,
if ( verbose )
HDfprintf(stdout, "(u, %d, %d) ", type, i);
- unprotect_entry(file_ptr, type, i, NO_CHANGE,
- H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, type, i, H5C__NO_FLAGS_SET);
}
i--;
}
@@ -4625,7 +4435,6 @@ col_major_scan_forward(H5F_t * file_ptr,
hbool_t display_stats,
hbool_t display_detailed_stats,
hbool_t do_inserts,
- hbool_t dirty_inserts,
int dirty_unprotects)
{
const char * fcn_name = "col_major_scan_forward()";
@@ -4664,8 +4473,7 @@ col_major_scan_forward(H5F_t * file_ptr,
if ( verbose )
HDfprintf(stdout, "(i, %d, %d) ", type, (idx + lag));
- insert_entry(file_ptr, type, (idx + lag), dirty_inserts,
- H5C__NO_FLAGS_SET);
+ insert_entry(file_ptr, type, (idx + lag), H5C__NO_FLAGS_SET);
}
if ( ( pass ) && ( idx >= 0 ) && ( idx <= max_indices[type] ) ) {
@@ -4683,7 +4491,7 @@ col_major_scan_forward(H5F_t * file_ptr,
HDfprintf(stdout, "(u, %d, %d) ", type, (idx - lag));
unprotect_entry(file_ptr, type, idx - lag,
- dirty_unprotects, H5C__NO_FLAGS_SET);
+ (dirty_unprotects ? H5C__DIRTIED_FLAG : H5C__NO_FLAGS_SET));
}
if ( verbose )
@@ -4728,7 +4536,6 @@ hl_col_major_scan_forward(H5F_t * file_ptr,
hbool_t display_stats,
hbool_t display_detailed_stats,
hbool_t do_inserts,
- hbool_t dirty_inserts,
int dirty_unprotects)
{
const char * fcn_name = "hl_col_major_scan_forward()";
@@ -4780,8 +4587,7 @@ hl_col_major_scan_forward(H5F_t * file_ptr,
if ( verbose )
HDfprintf(stdout, "(i, %d, %d) ", type, i);
- insert_entry(file_ptr, type, i, dirty_inserts,
- H5C__NO_FLAGS_SET);
+ insert_entry(file_ptr, type, i, H5C__NO_FLAGS_SET);
}
if ( ( pass ) && ( i >= 0 ) && ( i <= local_max_index ) ) {
@@ -4799,7 +4605,7 @@ hl_col_major_scan_forward(H5F_t * file_ptr,
HDfprintf(stdout, "(u, %d, %d) ", type, i);
unprotect_entry(file_ptr, type, i,
- dirty_unprotects, H5C__NO_FLAGS_SET);
+ (dirty_unprotects ? H5C__DIRTIED_FLAG : H5C__NO_FLAGS_SET));
}
if ( verbose )
@@ -4847,7 +4653,6 @@ col_major_scan_backward(H5F_t * file_ptr,
hbool_t display_stats,
hbool_t display_detailed_stats,
hbool_t do_inserts,
- hbool_t dirty_inserts,
int dirty_unprotects)
{
const char * fcn_name = "col_major_scan_backward()";
@@ -4893,8 +4698,7 @@ col_major_scan_backward(H5F_t * file_ptr,
if ( verbose )
HDfprintf(stdout, "(i, %d, %d) ", type, (idx - lag));
- insert_entry(file_ptr, type, (idx - lag), dirty_inserts,
- H5C__NO_FLAGS_SET);
+ insert_entry(file_ptr, type, (idx - lag), H5C__NO_FLAGS_SET);
}
if ( ( pass ) && ( idx >= 0 ) && ( idx <= max_indices[type] ) ) {
@@ -4912,7 +4716,7 @@ col_major_scan_backward(H5F_t * file_ptr,
HDfprintf(stdout, "(u, %d, %d) ", type, (idx + lag));
unprotect_entry(file_ptr, type, idx + lag,
- dirty_unprotects, H5C__NO_FLAGS_SET);
+ (dirty_unprotects ? H5C__DIRTIED_FLAG : H5C__NO_FLAGS_SET));
}
if ( verbose )
@@ -4963,7 +4767,6 @@ hl_col_major_scan_backward(H5F_t * file_ptr,
hbool_t display_stats,
hbool_t display_detailed_stats,
hbool_t do_inserts,
- hbool_t dirty_inserts,
int dirty_unprotects)
{
const char * fcn_name = "hl_col_major_scan_backward()";
@@ -5014,8 +4817,7 @@ hl_col_major_scan_backward(H5F_t * file_ptr,
if ( verbose )
HDfprintf(stdout, "(i, %d, %d) ", type, i);
- insert_entry(file_ptr, type, i, dirty_inserts,
- H5C__NO_FLAGS_SET);
+ insert_entry(file_ptr, type, i, H5C__NO_FLAGS_SET);
}
if ( ( pass ) && ( i >= 0 ) && ( i <= local_max_index ) ) {
@@ -5033,7 +4835,7 @@ hl_col_major_scan_backward(H5F_t * file_ptr,
HDfprintf(stdout, "(u, %d, %d) ", type, i);
unprotect_entry(file_ptr, type, i,
- dirty_unprotects, H5C__NO_FLAGS_SET);
+ (dirty_unprotects ? H5C__DIRTIED_FLAG : H5C__NO_FLAGS_SET));
}
if ( verbose )