summaryrefslogtreecommitdiffstats
path: root/testpar
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-05-27 13:11:55 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-05-27 13:11:55 (GMT)
commit71d4644df239df3ea2f9013d54b93dd68cf9392b (patch)
tree3dd68f12ebbeb7f68a773c50420f9868f0009454 /testpar
parent817f42c3bb8c0090a12dc78a9c537cbaefb2dd93 (diff)
downloadhdf5-71d4644df239df3ea2f9013d54b93dd68cf9392b.zip
hdf5-71d4644df239df3ea2f9013d54b93dd68cf9392b.tar.gz
hdf5-71d4644df239df3ea2f9013d54b93dd68cf9392b.tar.bz2
[svn-r18911] Description:
More general changes to align trunk with eventual changes from metadata journaling branch. Tested on: Mac OS X/32 10.6.3 (amazon) w/debug, production & parallel (h5committest not required on this branch)
Diffstat (limited to 'testpar')
-rw-r--r--testpar/t_cache.c360
1 files changed, 155 insertions, 205 deletions
diff --git a/testpar/t_cache.c b/testpar/t_cache.c
index d99cec0..84dd091 100644
--- a/testpar/t_cache.c
+++ b/testpar/t_cache.c
@@ -334,40 +334,33 @@ const H5C_class_t types[NUMBER_OF_ENTRY_TYPES] =
/* test utility functions */
-void expunge_entry(H5C_t * cache_ptr, H5F_t * file_ptr, int32_t idx);
+void expunge_entry(H5F_t * file_ptr, int32_t idx);
void insert_entry(H5C_t * cache_ptr, H5F_t * file_ptr,
int32_t idx, unsigned int flags);
-void local_pin_and_unpin_random_entries(H5C_t * cache_ptr, H5F_t * file_ptr,
- int min_idx, int max_idx,
- int min_count, int max_count);
-void local_pin_random_entry(H5C_t * cache_ptr, H5F_t * file_ptr,
- int min_idx, int max_idx);
-void local_unpin_all_entries(H5C_t * cache_ptr, H5F_t * file_ptr,
- hbool_t via_unprotect);
-int local_unpin_next_pinned_entry(H5C_t * cache_ptr, H5F_t * file_ptr,
- int start_idx, hbool_t via_unprotect);
-void lock_and_unlock_random_entries(H5C_t * cache_ptr, H5F_t * file_ptr,
- int min_idx, int max_idx,
+void local_pin_and_unpin_random_entries(H5F_t * file_ptr, int min_idx,
+ int max_idx, int min_count,
+ int max_count);
+void local_pin_random_entry(H5F_t * file_ptr, int min_idx, int max_idx);
+void local_unpin_all_entries(H5F_t * file_ptr, hbool_t via_unprotect);
+int local_unpin_next_pinned_entry(H5F_t * file_ptr, int start_idx,
+ hbool_t via_unprotect);
+void lock_and_unlock_random_entries(H5F_t * file_ptr, int min_idx, int max_idx,
int min_count, int max_count);
-void lock_and_unlock_random_entry(H5C_t * cache_ptr, H5F_t * file_ptr,
+void lock_and_unlock_random_entry(H5F_t * file_ptr,
int min_idx, int max_idx);
-void lock_entry(H5C_t * cache_ptr, H5F_t * file_ptr, int32_t idx);
-void mark_entry_dirty(H5C_t * cache_ptr, H5F_t * file_ptr,
- int32_t idx);
-void pin_entry(H5C_t * cache_ptr, H5F_t * file_ptr, int32_t idx,
- hbool_t global, hbool_t dirty);
+void lock_entry(H5F_t * file_ptr, int32_t idx);
+void mark_entry_dirty(int32_t idx);
+void pin_entry(H5F_t * file_ptr, int32_t idx, hbool_t global, hbool_t dirty);
void pin_protected_entry(int32_t idx, hbool_t global);
-void move_entry(H5C_t * cache_ptr, H5F_t * file_ptr,
- int32_t old_idx, int32_t new_idx);
+void move_entry(H5F_t * file_ptr, int32_t old_idx, int32_t new_idx);
void resize_entry(int32_t idx, size_t new_size);
hbool_t setup_cache_for_test(hid_t * fid_ptr, H5F_t ** file_ptr_ptr,
H5C_t ** cache_ptr_ptr);
void setup_rand(void);
hbool_t take_down_cache(hid_t fid);
-void unlock_entry(H5C_t * cache_ptr, H5F_t * file_ptr,
- int32_t type, unsigned int flags);
-void unpin_entry(H5C_t * cache_ptr, H5F_t * file_ptr, int32_t idx,
- hbool_t global, hbool_t dirty, hbool_t via_unprotect);
+void unlock_entry(H5F_t * file_ptr, int32_t type, unsigned int flags);
+void unpin_entry(H5F_t * file_ptr, int32_t idx, hbool_t global,
+ hbool_t dirty, hbool_t via_unprotect);
/* test functions */
@@ -1638,6 +1631,7 @@ serve_write_request(struct mssg_t * mssg_ptr)
/**************************** Call back functions ****************************/
/*****************************************************************************/
+
/*-------------------------------------------------------------------------
* Function: clear_datum
*
@@ -2149,8 +2143,7 @@ size_datum(H5F_t UNUSED * f,
*****************************************************************************/
void
-expunge_entry(H5C_t * cache_ptr,
- H5F_t * file_ptr,
+expunge_entry(H5F_t * file_ptr,
int32_t idx)
{
const char * fcn_name = "expunge_entry()";
@@ -2158,7 +2151,6 @@ expunge_entry(H5C_t * cache_ptr,
herr_t result;
struct datum * entry_ptr;
- HDassert( cache_ptr );
HDassert( file_ptr );
HDassert( ( 0 <= idx ) && ( idx < NUM_DATA_ENTRIES ) );
HDassert( idx < virt_num_data_entries );
@@ -2262,8 +2254,8 @@ insert_entry(H5C_t * cache_ptr,
(entry_ptr->ver)++;
entry_ptr->dirty = TRUE;
- result = H5AC_set(file_ptr, -1, &(types[0]), entry_ptr->base_addr,
- (void *)(&(entry_ptr->header)), flags);
+ result = H5AC_set(file_ptr, H5P_DATASET_XFER_DEFAULT, &(types[0]),
+ entry_ptr->base_addr, (void *)(&(entry_ptr->header)), flags);
if ( ( result < 0 ) ||
( entry_ptr->header.type != &(types[0]) ) ||
@@ -2342,8 +2334,7 @@ insert_entry(H5C_t * cache_ptr,
*****************************************************************************/
void
-local_pin_and_unpin_random_entries(H5C_t * cache_ptr,
- H5F_t * file_ptr,
+local_pin_and_unpin_random_entries(H5F_t * file_ptr,
int min_idx,
int max_idx,
int min_count,
@@ -2358,7 +2349,6 @@ local_pin_and_unpin_random_entries(H5C_t * cache_ptr,
int i;
int idx;
- HDassert( cache_ptr );
HDassert( file_ptr );
HDassert( 0 <= min_idx );
HDassert( min_idx < max_idx );
@@ -2374,7 +2364,7 @@ local_pin_and_unpin_random_entries(H5C_t * cache_ptr,
for ( i = 0; i < count; i++ )
{
- local_pin_random_entry(cache_ptr, file_ptr, min_idx, max_idx);
+ local_pin_random_entry(file_ptr, min_idx, max_idx);
}
count = (HDrand() % (max_count - min_count)) + min_count;
@@ -2388,8 +2378,7 @@ local_pin_and_unpin_random_entries(H5C_t * cache_ptr,
while ( ( i < count ) && ( idx >= 0 ) )
{
via_unprotect = ( (((unsigned)i) & 0x0001) == 0 );
- idx = local_unpin_next_pinned_entry(cache_ptr, file_ptr,
- idx, via_unprotect);
+ idx = local_unpin_next_pinned_entry(file_ptr, idx, via_unprotect);
i++;
}
}
@@ -2419,8 +2408,7 @@ local_pin_and_unpin_random_entries(H5C_t * cache_ptr,
*****************************************************************************/
void
-local_pin_random_entry(H5C_t * cache_ptr,
- H5F_t * file_ptr,
+local_pin_random_entry(H5F_t * file_ptr,
int min_idx,
int max_idx)
{
@@ -2429,7 +2417,6 @@ local_pin_random_entry(H5C_t * cache_ptr,
if ( nerrors == 0 ) {
- HDassert( cache_ptr );
HDassert( file_ptr );
HDassert( 0 <= min_idx );
HDassert( min_idx < max_idx );
@@ -2444,7 +2431,7 @@ local_pin_random_entry(H5C_t * cache_ptr,
}
while ( data[idx].global_pinned || data[idx].local_pinned );
- pin_entry(cache_ptr, file_ptr, idx, FALSE, FALSE);
+ pin_entry(file_ptr, idx, FALSE, FALSE);
}
return;
@@ -2469,8 +2456,7 @@ local_pin_random_entry(H5C_t * cache_ptr,
*****************************************************************************/
void
-local_unpin_all_entries(H5C_t * cache_ptr,
- H5F_t * file_ptr,
+local_unpin_all_entries(H5F_t * file_ptr,
hbool_t via_unprotect)
{
/* const char * fcn_name = "local_unpin_all_entries()"; */
@@ -2479,14 +2465,13 @@ local_unpin_all_entries(H5C_t * cache_ptr,
int idx;
- HDassert( cache_ptr );
HDassert( file_ptr );
idx = 0;
while ( idx >= 0 )
{
- idx = local_unpin_next_pinned_entry(cache_ptr, file_ptr,
+ idx = local_unpin_next_pinned_entry(file_ptr,
idx, via_unprotect);
}
}
@@ -2516,8 +2501,7 @@ local_unpin_all_entries(H5C_t * cache_ptr,
*****************************************************************************/
int
-local_unpin_next_pinned_entry(H5C_t * cache_ptr,
- H5F_t * file_ptr,
+local_unpin_next_pinned_entry(H5F_t * file_ptr,
int start_idx,
hbool_t via_unprotect)
{
@@ -2527,7 +2511,6 @@ local_unpin_next_pinned_entry(H5C_t * cache_ptr,
if ( nerrors == 0 ) {
- HDassert( cache_ptr );
HDassert( file_ptr );
HDassert( 0 <= start_idx );
HDassert( start_idx < NUM_DATA_ENTRIES );
@@ -2547,7 +2530,7 @@ local_unpin_next_pinned_entry(H5C_t * cache_ptr,
if ( data[idx].local_pinned ) {
- unpin_entry(cache_ptr, file_ptr, idx, FALSE, FALSE, via_unprotect);
+ unpin_entry(file_ptr, idx, FALSE, FALSE, via_unprotect);
} else {
@@ -2579,8 +2562,7 @@ local_unpin_next_pinned_entry(H5C_t * cache_ptr,
*****************************************************************************/
void
-lock_and_unlock_random_entries(H5C_t * cache_ptr,
- H5F_t * file_ptr,
+lock_and_unlock_random_entries(H5F_t * file_ptr,
int min_idx,
int max_idx,
int min_count,
@@ -2592,7 +2574,6 @@ lock_and_unlock_random_entries(H5C_t * cache_ptr,
if ( nerrors == 0 ) {
- HDassert( cache_ptr );
HDassert( file_ptr );
HDassert( 0 <= min_count );
HDassert( min_count < max_count );
@@ -2604,7 +2585,7 @@ lock_and_unlock_random_entries(H5C_t * cache_ptr,
for ( i = 0; i < count; i++ )
{
- lock_and_unlock_random_entry(cache_ptr, file_ptr, min_idx, max_idx);
+ lock_and_unlock_random_entry(file_ptr, min_idx, max_idx);
}
}
@@ -2631,8 +2612,7 @@ lock_and_unlock_random_entries(H5C_t * cache_ptr,
*****************************************************************************/
void
-lock_and_unlock_random_entry(H5C_t * cache_ptr,
- H5F_t * file_ptr,
+lock_and_unlock_random_entry(H5F_t * file_ptr,
int min_idx,
int max_idx)
{
@@ -2641,7 +2621,6 @@ lock_and_unlock_random_entry(H5C_t * cache_ptr,
if ( nerrors == 0 ) {
- HDassert( cache_ptr );
HDassert( file_ptr );
HDassert( 0 <= min_idx );
HDassert( min_idx < max_idx );
@@ -2653,8 +2632,8 @@ lock_and_unlock_random_entry(H5C_t * cache_ptr,
HDassert( min_idx <= idx );
HDassert( idx <= max_idx );
- lock_entry(cache_ptr, file_ptr, idx);
- unlock_entry(cache_ptr, file_ptr, idx, H5AC__NO_FLAGS_SET);
+ lock_entry(file_ptr, idx);
+ unlock_entry(file_ptr, idx, H5AC__NO_FLAGS_SET);
}
return;
@@ -2683,8 +2662,7 @@ lock_and_unlock_random_entry(H5C_t * cache_ptr,
*****************************************************************************/
void
-lock_entry(H5C_t * cache_ptr,
- H5F_t * file_ptr,
+lock_entry(H5F_t * file_ptr,
int32_t idx)
{
const char * fcn_name = "lock_entry()";
@@ -2693,7 +2671,6 @@ lock_entry(H5C_t * cache_ptr,
if ( nerrors == 0 ) {
- HDassert( cache_ptr );
HDassert( ( 0 <= idx ) && ( idx < NUM_DATA_ENTRIES ) );
HDassert( idx < virt_num_data_entries );
@@ -2745,9 +2722,7 @@ lock_entry(H5C_t * cache_ptr,
*****************************************************************************/
void
-mark_entry_dirty(H5C_t * cache_ptr,
- H5F_t * file_ptr,
- int32_t idx)
+mark_entry_dirty(int32_t idx)
{
const char * fcn_name = "mark_entry_dirty()";
herr_t result;
@@ -2755,8 +2730,6 @@ mark_entry_dirty(H5C_t * cache_ptr,
if ( nerrors == 0 ) {
- HDassert( file_ptr );
- HDassert( cache_ptr );
HDassert( ( 0 <= idx ) && ( idx < NUM_DATA_ENTRIES ) );
HDassert( idx < virt_num_data_entries );
@@ -2807,8 +2780,7 @@ mark_entry_dirty(H5C_t * cache_ptr,
*****************************************************************************/
void
-pin_entry(H5C_t * cache_ptr,
- H5F_t * file_ptr,
+pin_entry(H5F_t * file_ptr,
int32_t idx,
hbool_t global,
hbool_t dirty)
@@ -2819,7 +2791,6 @@ pin_entry(H5C_t * cache_ptr,
if ( nerrors == 0 ) {
- HDassert( cache_ptr );
HDassert( file_ptr );
HDassert( ( 0 <= idx ) && ( idx < NUM_DATA_ENTRIES ) );
HDassert( idx < virt_num_data_entries );
@@ -2830,14 +2801,14 @@ pin_entry(H5C_t * cache_ptr,
HDassert ( ! (entry_ptr->local_pinned) );
HDassert ( ! ( dirty && ( ! global ) ) );
- lock_entry(cache_ptr, file_ptr, idx);
+ lock_entry(file_ptr, idx);
if ( dirty ) {
flags |= H5AC__DIRTIED_FLAG;
}
- unlock_entry(cache_ptr, file_ptr, idx, flags);
+ unlock_entry(file_ptr, idx, flags);
HDassert( (entry_ptr->header).is_pinned );
HDassert( ( ! dirty ) || ( (entry_ptr->header).is_dirty ) );
@@ -2960,10 +2931,9 @@ pin_protected_entry(int32_t idx,
*****************************************************************************/
void
-move_entry(H5C_t * cache_ptr,
- H5F_t * file_ptr,
- int32_t old_idx,
- int32_t new_idx)
+move_entry(H5F_t * file_ptr,
+ int32_t old_idx,
+ int32_t new_idx)
{
const char * fcn_name = "move_entry()";
herr_t result;
@@ -2976,7 +2946,6 @@ move_entry(H5C_t * cache_ptr,
if ( ( nerrors == 0 ) && ( old_idx != new_idx ) ) {
- HDassert( cache_ptr );
HDassert( file_ptr );
HDassert( ( 0 <= old_idx ) && ( old_idx < NUM_DATA_ENTRIES ) );
HDassert( old_idx < virt_num_data_entries );
@@ -3226,7 +3195,7 @@ setup_cache_for_test(hid_t * fid_ptr,
config.rpt_fcn_enabled = TRUE;
if ( H5AC_set_cache_auto_resize_config(cache_ptr, &config)
- != SUCCEED ) {
+ != SUCCEED ) {
HDfprintf(stdout,
"%d:%s: H5AC_set_cache_auto_resize_config() failed.\n",
@@ -3527,8 +3496,7 @@ take_down_cache(hid_t fid)
*****************************************************************************/
void
-unlock_entry(H5C_t * cache_ptr,
- H5F_t * file_ptr,
+unlock_entry(H5F_t * file_ptr,
int32_t idx,
unsigned int flags)
{
@@ -3539,7 +3507,6 @@ unlock_entry(H5C_t * cache_ptr,
if ( nerrors == 0 ) {
- HDassert( cache_ptr );
HDassert( file_ptr );
HDassert( ( 0 <= idx ) && ( idx < NUM_DATA_ENTRIES ) );
HDassert( idx < virt_num_data_entries );
@@ -3611,8 +3578,7 @@ unlock_entry(H5C_t * cache_ptr,
*****************************************************************************/
void
-unpin_entry(H5C_t * cache_ptr,
- H5F_t * file_ptr,
+unpin_entry(H5F_t * file_ptr,
int32_t idx,
hbool_t global,
hbool_t dirty,
@@ -3625,7 +3591,6 @@ unpin_entry(H5C_t * cache_ptr,
if ( nerrors == 0 ) {
- HDassert( cache_ptr );
HDassert( file_ptr );
HDassert( ( 0 <= idx ) && ( idx < NUM_DATA_ENTRIES ) );
HDassert( idx < virt_num_data_entries );
@@ -3640,20 +3605,20 @@ unpin_entry(H5C_t * cache_ptr,
if ( via_unprotect ) {
- lock_entry(cache_ptr, file_ptr, idx);
+ lock_entry(file_ptr, idx);
if ( dirty ) {
flags |= H5AC__DIRTIED_FLAG;
}
- unlock_entry(cache_ptr, file_ptr, idx, flags);
+ unlock_entry(file_ptr, idx, flags);
} else {
if ( dirty ) {
- mark_entry_dirty(cache_ptr, file_ptr, idx);
+ mark_entry_dirty(idx);
}
@@ -3985,26 +3950,24 @@ smoke_check_1(void)
for ( i = (virt_num_data_entries / 2) - 1; i >= 0; i-- )
{
- lock_entry(cache_ptr, file_ptr, i);
- unlock_entry(cache_ptr, file_ptr, i, H5AC__NO_FLAGS_SET);
+ lock_entry(file_ptr, i);
+ unlock_entry(file_ptr, i, H5AC__NO_FLAGS_SET);
}
- /* move the first half of the entries... */
+ /* Move the first half of the entries... */
for ( i = 0; i < (virt_num_data_entries / 2); i++ )
{
- lock_entry(cache_ptr, file_ptr, i);
- unlock_entry(cache_ptr, file_ptr, i, H5AC__NO_FLAGS_SET);
- move_entry(cache_ptr, file_ptr, i,
- (i + (virt_num_data_entries / 2)));
+ lock_entry(file_ptr, i);
+ unlock_entry(file_ptr, i, H5AC__NO_FLAGS_SET);
+ move_entry(file_ptr, i, (i + (virt_num_data_entries / 2)));
}
/* ...and then move them back. */
for ( i = (virt_num_data_entries / 2) - 1; i >= 0; i-- )
{
- lock_entry(cache_ptr, file_ptr, i);
- unlock_entry(cache_ptr, file_ptr, i, H5AC__NO_FLAGS_SET);
- move_entry(cache_ptr, file_ptr, i,
- (i + (virt_num_data_entries / 2)));
+ lock_entry(file_ptr, i);
+ unlock_entry(file_ptr, i, H5AC__NO_FLAGS_SET);
+ move_entry(file_ptr, i, (i + (virt_num_data_entries / 2)));
}
if ( fid >= 0 ) {
@@ -4153,8 +4116,7 @@ smoke_check_2(void)
if ( i > 100 ) {
- lock_and_unlock_random_entries(cache_ptr, file_ptr,
- (i - 100), i, 0, 10);
+ lock_and_unlock_random_entries(file_ptr, (i - 100), i, 0, 10);
}
}
@@ -4162,44 +4124,43 @@ smoke_check_2(void)
{
/* Make sure we don't step on any locally pinned entries */
if ( data[i].local_pinned ) {
- unpin_entry(cache_ptr, file_ptr, i, FALSE, FALSE, FALSE);
+ unpin_entry(file_ptr, i, FALSE, FALSE, FALSE);
}
- pin_entry(cache_ptr, file_ptr, i, TRUE, FALSE);
+ pin_entry(file_ptr, i, TRUE, FALSE);
}
for ( i = (virt_num_data_entries / 2) - 1; i >= 0; i-=2 )
{
- lock_entry(cache_ptr, file_ptr, i);
- unlock_entry(cache_ptr, file_ptr, i, H5AC__NO_FLAGS_SET);
- lock_and_unlock_random_entries(cache_ptr, file_ptr, 0,
+ lock_entry(file_ptr, i);
+ unlock_entry(file_ptr, i, H5AC__NO_FLAGS_SET);
+ lock_and_unlock_random_entries(file_ptr, 0,
(virt_num_data_entries / 20),
0, 100);
- local_pin_and_unpin_random_entries(cache_ptr, file_ptr, 0,
+ local_pin_and_unpin_random_entries(file_ptr, 0,
(virt_num_data_entries / 4),
0, 3);
}
for ( i = 0; i < (virt_num_data_entries / 2); i+=2 )
{
- lock_entry(cache_ptr, file_ptr, i);
- unlock_entry(cache_ptr, file_ptr, i, H5AC__DIRTIED_FLAG);
- lock_and_unlock_random_entries(cache_ptr, file_ptr, 0,
+ lock_entry(file_ptr, i);
+ unlock_entry(file_ptr, i, H5AC__DIRTIED_FLAG);
+ lock_and_unlock_random_entries(file_ptr, 0,
(virt_num_data_entries / 10),
0, 100);
}
/* we can't move pinned entries, so release any local pins now. */
- local_unpin_all_entries(cache_ptr, file_ptr, FALSE);
+ local_unpin_all_entries(file_ptr, FALSE);
/* Move the first half of the entries... */
for ( i = 0; i < (virt_num_data_entries / 2); i++ )
{
- lock_entry(cache_ptr, file_ptr, i);
- unlock_entry(cache_ptr, file_ptr, i, H5AC__NO_FLAGS_SET);
- move_entry(cache_ptr, file_ptr, i,
- (i + (virt_num_data_entries / 2)));
- lock_and_unlock_random_entries(cache_ptr, file_ptr, 0,
+ lock_entry(file_ptr, i);
+ unlock_entry(file_ptr, i, H5AC__NO_FLAGS_SET);
+ move_entry(file_ptr, i, (i + (virt_num_data_entries / 2)));
+ lock_and_unlock_random_entries(file_ptr, 0,
((virt_num_data_entries / 50) - 1),
0, 100);
}
@@ -4207,11 +4168,10 @@ smoke_check_2(void)
/* ...and then move them back. */
for ( i = (virt_num_data_entries / 2) - 1; i >= 0; i-- )
{
- lock_entry(cache_ptr, file_ptr, i);
- unlock_entry(cache_ptr, file_ptr, i, H5AC__DIRTIED_FLAG);
- move_entry(cache_ptr, file_ptr, i,
- (i + (virt_num_data_entries / 2)));
- lock_and_unlock_random_entries(cache_ptr, file_ptr, 0,
+ lock_entry(file_ptr, i);
+ unlock_entry(file_ptr, i, H5AC__DIRTIED_FLAG);
+ move_entry(file_ptr, i, (i + (virt_num_data_entries / 2)));
+ lock_and_unlock_random_entries(file_ptr, 0,
(virt_num_data_entries / 100),
0, 100);
}
@@ -4221,7 +4181,7 @@ smoke_check_2(void)
hbool_t via_unprotect = ( (((unsigned)i) & 0x01) == 0 );
hbool_t dirty = ( (((unsigned)i) & 0x02) == 0 );
- unpin_entry(cache_ptr, file_ptr, i, TRUE, dirty, via_unprotect);
+ unpin_entry(file_ptr, i, TRUE, dirty, via_unprotect);
}
if ( fid >= 0 ) {
@@ -4380,8 +4340,7 @@ smoke_check_3(void)
if ( i > 100 ) {
- lock_and_unlock_random_entries(cache_ptr, file_ptr,
- (i - 100), i,
+ lock_and_unlock_random_entries(file_ptr, (i - 100), i,
min_count, max_count);
}
}
@@ -4402,10 +4361,10 @@ smoke_check_3(void)
hbool_t dirty = ( (i % 2) == 0);
if ( data[i].local_pinned ) {
- unpin_entry(cache_ptr, file_ptr, i, FALSE, FALSE, FALSE);
+ unpin_entry(file_ptr, i, FALSE, FALSE, FALSE);
}
- pin_entry(cache_ptr, file_ptr, i, TRUE, dirty);
+ pin_entry(file_ptr, i, TRUE, dirty);
HDassert( !dirty || data[i].header.is_dirty );
HDassert( data[i].header.is_pinned );
@@ -4415,13 +4374,12 @@ smoke_check_3(void)
if ( i > 100 ) {
- lock_and_unlock_random_entries(cache_ptr, file_ptr,
- (i - 100), i,
+ lock_and_unlock_random_entries(file_ptr, (i - 100), i,
min_count, max_count);
}
- local_pin_and_unpin_random_entries(cache_ptr, file_ptr,
- 0, virt_num_data_entries / 4,
+ local_pin_and_unpin_random_entries(file_ptr, 0,
+ virt_num_data_entries / 4,
0, (file_mpi_rank + 2));
}
@@ -4457,17 +4415,17 @@ smoke_check_3(void)
HDassert( data[i].global_pinned );
HDassert( ! data[i].local_pinned );
- unpin_entry(cache_ptr, file_ptr, i, TRUE, dirty,
+ unpin_entry(file_ptr, i, TRUE, dirty,
via_unprotect);
}
if ( i % 2 == 0 ) {
- lock_entry(cache_ptr, file_ptr, i);
- unlock_entry(cache_ptr, file_ptr, i, H5AC__NO_FLAGS_SET);
- local_pin_and_unpin_random_entries(cache_ptr, file_ptr, 0,
+ lock_entry(file_ptr, i);
+ unlock_entry(file_ptr, i, H5AC__NO_FLAGS_SET);
+ local_pin_and_unpin_random_entries(file_ptr, 0,
virt_num_data_entries / 2,
0, 2);
- lock_and_unlock_random_entries(cache_ptr, file_ptr,
+ lock_and_unlock_random_entries(file_ptr,
min_idx, max_idx, 0, 100);
}
}
@@ -4482,14 +4440,14 @@ smoke_check_3(void)
for ( i = 0; i < (virt_num_data_entries / 2); i+=2 )
{
- lock_entry(cache_ptr, file_ptr, i);
- unlock_entry(cache_ptr, file_ptr, i, H5AC__DIRTIED_FLAG);
- lock_and_unlock_random_entries(cache_ptr, file_ptr,
+ lock_entry(file_ptr, i);
+ unlock_entry(file_ptr, i, H5AC__DIRTIED_FLAG);
+ lock_and_unlock_random_entries(file_ptr,
min_idx, max_idx, 0, 100);
}
/* we can't move pinned entries, so release any local pins now. */
- local_unpin_all_entries(cache_ptr, file_ptr, FALSE);
+ local_unpin_all_entries(file_ptr, FALSE);
min_count = 10 / (file_mpi_rank + 1);
max_count = min_count + 100;
@@ -4497,11 +4455,10 @@ smoke_check_3(void)
/* move the first half of the entries... */
for ( i = 0; i < (virt_num_data_entries / 2); i++ )
{
- lock_entry(cache_ptr, file_ptr, i);
- unlock_entry(cache_ptr, file_ptr, i, H5AC__NO_FLAGS_SET);
- move_entry(cache_ptr, file_ptr, i,
- (i + (virt_num_data_entries / 2)));
- lock_and_unlock_random_entries(cache_ptr, file_ptr, 0,
+ lock_entry(file_ptr, i);
+ unlock_entry(file_ptr, i, H5AC__NO_FLAGS_SET);
+ move_entry(file_ptr, i, (i + (virt_num_data_entries / 2)));
+ lock_and_unlock_random_entries(file_ptr, 0,
(virt_num_data_entries / 20),
min_count, max_count);
}
@@ -4509,11 +4466,10 @@ smoke_check_3(void)
/* ...and then move them back. */
for ( i = (virt_num_data_entries / 2) - 1; i >= 0; i-- )
{
- lock_entry(cache_ptr, file_ptr, i);
- unlock_entry(cache_ptr, file_ptr, i, H5AC__DIRTIED_FLAG);
- move_entry(cache_ptr, file_ptr, i,
- (i + (virt_num_data_entries / 2)));
- lock_and_unlock_random_entries(cache_ptr, file_ptr, 0,
+ lock_entry(file_ptr, i);
+ unlock_entry(file_ptr, i, H5AC__DIRTIED_FLAG);
+ move_entry(file_ptr, i, (i + (virt_num_data_entries / 2)));
+ lock_and_unlock_random_entries(file_ptr, 0,
(virt_num_data_entries / 40),
min_count, max_count);
}
@@ -4526,23 +4482,22 @@ smoke_check_3(void)
for ( i = 0; i < (virt_num_data_entries / 2); i+=2 )
{
- local_pin_and_unpin_random_entries(cache_ptr, file_ptr, 0,
+ local_pin_and_unpin_random_entries(file_ptr, 0,
(virt_num_data_entries / 2),
0, 5);
- lock_entry(cache_ptr, file_ptr, i);
- unlock_entry(cache_ptr, file_ptr, i, H5AC__DIRTIED_FLAG);
+ lock_entry(file_ptr, i);
+ unlock_entry(file_ptr, i, H5AC__DIRTIED_FLAG);
if ( i > 100 ) {
- lock_and_unlock_random_entries(cache_ptr, file_ptr,
- (i - 100), i,
+ lock_and_unlock_random_entries(file_ptr, (i - 100), i,
min_count, max_count);
}
}
/* release any local pins before we take down the cache. */
- local_unpin_all_entries(cache_ptr, file_ptr, FALSE);
+ local_unpin_all_entries(file_ptr, FALSE);
if ( fid >= 0 ) {
@@ -4704,8 +4659,7 @@ smoke_check_4(void)
if ( i > 100 ) {
- lock_and_unlock_random_entries(cache_ptr, file_ptr,
- (i - 100), i,
+ lock_and_unlock_random_entries(file_ptr, (i - 100), i,
min_count, max_count);
}
}
@@ -4729,7 +4683,7 @@ smoke_check_4(void)
* entries are in fact pinned (which unpin_entry() should do).
*/
insert_entry(cache_ptr, file_ptr, i, H5C__PIN_ENTRY_FLAG);
- unpin_entry(cache_ptr, file_ptr, i, TRUE, FALSE, FALSE);
+ unpin_entry(file_ptr, i, TRUE, FALSE, FALSE);
}
if ( i % 59 == 0 ) {
@@ -4737,10 +4691,10 @@ smoke_check_4(void)
hbool_t dirty = ( (i % 2) == 0);
if ( data[i].local_pinned ) {
- unpin_entry(cache_ptr, file_ptr, i, FALSE, FALSE, FALSE);
+ unpin_entry(file_ptr, i, FALSE, FALSE, FALSE);
}
- pin_entry(cache_ptr, file_ptr, i, TRUE, dirty);
+ pin_entry(file_ptr, i, TRUE, dirty);
HDassert( !dirty || data[i].header.is_dirty );
HDassert( data[i].header.is_pinned );
@@ -4750,12 +4704,11 @@ smoke_check_4(void)
if ( i > 100 ) {
- lock_and_unlock_random_entries(cache_ptr, file_ptr,
- (i - 100), i,
+ lock_and_unlock_random_entries(file_ptr, (i - 100), i,
min_count, max_count);
}
- local_pin_and_unpin_random_entries(cache_ptr, file_ptr, 0,
+ local_pin_and_unpin_random_entries(file_ptr, 0,
(virt_num_data_entries / 4),
0, (file_mpi_rank + 2));
}
@@ -4787,14 +4740,14 @@ smoke_check_4(void)
HDassert( data[i].global_pinned );
HDassert( ! data[i].local_pinned );
- unpin_entry(cache_ptr, file_ptr, i, TRUE, dirty, via_unprotect);
+ unpin_entry(file_ptr, i, TRUE, dirty, via_unprotect);
}
if ( i % 2 == 0 ) {
- lock_entry(cache_ptr, file_ptr, i);
- unlock_entry(cache_ptr, file_ptr, i, H5AC__NO_FLAGS_SET);
- lock_and_unlock_random_entries(cache_ptr, file_ptr,
+ lock_entry(file_ptr, i);
+ unlock_entry(file_ptr, i, H5AC__NO_FLAGS_SET);
+ lock_and_unlock_random_entries(file_ptr,
min_idx, max_idx, 0, 100);
}
}
@@ -4805,14 +4758,14 @@ smoke_check_4(void)
for ( i = 0; i < (virt_num_data_entries / 2); i+=2 )
{
- lock_entry(cache_ptr, file_ptr, i);
- unlock_entry(cache_ptr, file_ptr, i, H5AC__DIRTIED_FLAG);
- lock_and_unlock_random_entries(cache_ptr, file_ptr,
+ lock_entry(file_ptr, i);
+ unlock_entry(file_ptr, i, H5AC__DIRTIED_FLAG);
+ lock_and_unlock_random_entries(file_ptr,
min_idx, max_idx, 0, 100);
}
/* we can't move pinned entries, so release any local pins now. */
- local_unpin_all_entries(cache_ptr, file_ptr, FALSE);
+ local_unpin_all_entries(file_ptr, FALSE);
min_count = 10 * (file_mpi_rank % 4);
max_count = min_count + 100;
@@ -4820,11 +4773,10 @@ smoke_check_4(void)
/* move the first half of the entries... */
for ( i = 0; i < (virt_num_data_entries / 2); i++ )
{
- lock_entry(cache_ptr, file_ptr, i);
- unlock_entry(cache_ptr, file_ptr, i, H5AC__NO_FLAGS_SET);
- move_entry(cache_ptr, file_ptr, i,
- (i + (virt_num_data_entries / 2)));
- lock_and_unlock_random_entries(cache_ptr, file_ptr, 0,
+ lock_entry(file_ptr, i);
+ unlock_entry(file_ptr, i, H5AC__NO_FLAGS_SET);
+ move_entry(file_ptr, i, (i + (virt_num_data_entries / 2)));
+ lock_and_unlock_random_entries(file_ptr, 0,
(virt_num_data_entries / 20),
min_count, max_count);
}
@@ -4832,11 +4784,10 @@ smoke_check_4(void)
/* ...and then move them back. */
for ( i = (virt_num_data_entries / 2) - 1; i >= 0; i-- )
{
- lock_entry(cache_ptr, file_ptr, i);
- unlock_entry(cache_ptr, file_ptr, i, H5AC__DIRTIED_FLAG);
- move_entry(cache_ptr, file_ptr, i,
- (i + (virt_num_data_entries / 2)));
- lock_and_unlock_random_entries(cache_ptr, file_ptr, 0,
+ lock_entry(file_ptr, i);
+ unlock_entry(file_ptr, i, H5AC__DIRTIED_FLAG);
+ move_entry(file_ptr, i, (i + (virt_num_data_entries / 2)));
+ lock_and_unlock_random_entries(file_ptr, 0,
(virt_num_data_entries / 40),
min_count, max_count);
}
@@ -4849,13 +4800,12 @@ smoke_check_4(void)
for ( i = 0; i < (virt_num_data_entries / 2); i+=2 )
{
- lock_entry(cache_ptr, file_ptr, i);
- unlock_entry(cache_ptr, file_ptr, i, H5AC__DIRTIED_FLAG);
+ lock_entry(file_ptr, i);
+ unlock_entry(file_ptr, i, H5AC__DIRTIED_FLAG);
if ( i > 100 ) {
- lock_and_unlock_random_entries(cache_ptr, file_ptr,
- (i - 100), i,
+ lock_and_unlock_random_entries(file_ptr, (i - 100), i,
min_count, max_count);
}
}
@@ -5013,24 +4963,24 @@ smoke_check_5(void)
for ( i = 0; i < (virt_num_data_entries / 4); i++ )
{
- lock_entry(cache_ptr, file_ptr, i);
+ lock_entry(file_ptr, i);
if ( i % 2 == 0 )
{
- mark_entry_dirty(cache_ptr, file_ptr, i);
+ mark_entry_dirty(i);
}
- unlock_entry(cache_ptr, file_ptr, i, H5AC__NO_FLAGS_SET);
+ unlock_entry(file_ptr, i, H5AC__NO_FLAGS_SET);
if ( i % 2 == 1 )
{
if ( i % 4 == 1 ) {
- lock_entry(cache_ptr, file_ptr, i);
- unlock_entry(cache_ptr, file_ptr, i, H5AC__DIRTIED_FLAG);
+ lock_entry(file_ptr, i);
+ unlock_entry(file_ptr, i, H5AC__DIRTIED_FLAG);
}
- expunge_entry(cache_ptr, file_ptr, i);
+ expunge_entry(file_ptr, i);
}
}
@@ -5038,7 +4988,7 @@ smoke_check_5(void)
i >= (virt_num_data_entries / 4);
i-- )
{
- pin_entry(cache_ptr, file_ptr, i, TRUE, FALSE);
+ pin_entry(file_ptr, i, TRUE, FALSE);
if ( i % 2 == 0 )
{
@@ -5047,7 +4997,7 @@ smoke_check_5(void)
resize_entry(i, data[i].len / 2);
}
- mark_entry_dirty(cache_ptr, file_ptr, i);
+ mark_entry_dirty(i);
if ( i % 8 <= 4 ) {
@@ -5055,7 +5005,7 @@ smoke_check_5(void)
}
}
- unpin_entry(cache_ptr, file_ptr, i, TRUE, FALSE, FALSE);
+ unpin_entry(file_ptr, i, TRUE, FALSE, FALSE);
}
if ( fid >= 0 ) {
@@ -5280,7 +5230,7 @@ trace_file_check(void)
strcpy(config.trace_file_name, "t_cache_trace.txt");
if ( H5AC_set_cache_auto_resize_config(cache_ptr, &config)
- != SUCCEED ) {
+ != SUCCEED ) {
nerrors++;
HDfprintf(stdout,
@@ -5295,27 +5245,27 @@ trace_file_check(void)
insert_entry(cache_ptr, file_ptr, 2, H5AC__NO_FLAGS_SET);
insert_entry(cache_ptr, file_ptr, 3, H5AC__NO_FLAGS_SET);
- lock_entry(cache_ptr, file_ptr, 0);
- mark_entry_dirty(cache_ptr, file_ptr, 0);
- unlock_entry(cache_ptr, file_ptr, 0, H5AC__NO_FLAGS_SET);
+ lock_entry(file_ptr, 0);
+ mark_entry_dirty(0);
+ unlock_entry(file_ptr, 0, H5AC__NO_FLAGS_SET);
- lock_entry(cache_ptr, file_ptr, 1);
+ lock_entry(file_ptr, 1);
pin_protected_entry(1, TRUE);
- unlock_entry(cache_ptr, file_ptr, 1, H5AC__NO_FLAGS_SET);
- unpin_entry(cache_ptr, file_ptr, 1, TRUE, FALSE, FALSE);
+ unlock_entry(file_ptr, 1, H5AC__NO_FLAGS_SET);
+ unpin_entry(file_ptr, 1, TRUE, FALSE, FALSE);
- expunge_entry(cache_ptr,file_ptr, 1);
+ expunge_entry(file_ptr, 1);
- lock_entry(cache_ptr, file_ptr, 2);
+ lock_entry(file_ptr, 2);
pin_protected_entry(2, TRUE);
- unlock_entry(cache_ptr, file_ptr, 2, H5AC__NO_FLAGS_SET);
- mark_entry_dirty(cache_ptr, file_ptr, 2);
+ unlock_entry(file_ptr, 2, H5AC__NO_FLAGS_SET);
+ mark_entry_dirty(2);
resize_entry(2, data[2].len / 2);
resize_entry(2, data[2].len);
- unpin_entry(cache_ptr, file_ptr, 2, TRUE, FALSE, FALSE);
+ unpin_entry(file_ptr, 2, TRUE, FALSE, FALSE);
- move_entry(cache_ptr, file_ptr, 0, 20);
- move_entry(cache_ptr, file_ptr, 0, 20);
+ move_entry(file_ptr, 0, 20);
+ move_entry(file_ptr, 0, 20);
if ( H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0 ) {
nerrors++;
@@ -5344,7 +5294,7 @@ trace_file_check(void)
config.trace_file_name[0] = '\0';
if ( H5AC_set_cache_auto_resize_config(cache_ptr, &config)
- != SUCCEED ) {
+ != SUCCEED ) {
nerrors++;
HDfprintf(stdout,