diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2010-05-06 14:27:04 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2010-05-06 14:27:04 (GMT) |
commit | 5b320d81abb8c228f2ded592b1d725a8c668ba37 (patch) | |
tree | ab6ee31765740cd0e521183959bf97debb0a1e09 /testpar | |
parent | 810f4373e340364b8862e807422262a34bac037b (diff) | |
download | hdf5-5b320d81abb8c228f2ded592b1d725a8c668ba37.zip hdf5-5b320d81abb8c228f2ded592b1d725a8c668ba37.tar.gz hdf5-5b320d81abb8c228f2ded592b1d725a8c668ba37.tar.bz2 |
[svn-r18724] Description:
Rename H5[A]C_rename to H5[A]C_move_entry.
Tested on:
Mac OS X/32 10.6.3 (amazon) w/debug & production
(h5committest not required on this branch)
Diffstat (limited to 'testpar')
-rw-r--r-- | testpar/t_cache.c | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/testpar/t_cache.c b/testpar/t_cache.c index dc68d87..be2e565 100644 --- a/testpar/t_cache.c +++ b/testpar/t_cache.c @@ -197,7 +197,7 @@ int virt_num_data_entries = NUM_DATA_ENTRIES; * The data_index array is an array of integer used to maintain a list * of instances of datum in the data array in increasing base_addr order. * - * This array is necessary, as rename operations can swap the values + * This array is necessary, as move operations can swap the values * of the base_addr fields of two instances of datum. Without this * array, we would no longer be able to use a binary search on a sorted * list to find the indexes of instances of datum given the values of @@ -357,7 +357,7 @@ void mark_entry_dirty(H5C_t * cache_ptr, H5F_t * file_ptr, void pin_entry(H5C_t * cache_ptr, H5F_t * file_ptr, int32_t idx, hbool_t global, hbool_t dirty); void pin_protected_entry(int32_t idx, hbool_t global); -void rename_entry(H5C_t * cache_ptr, H5F_t * file_ptr, +void move_entry(H5C_t * cache_ptr, 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, @@ -708,7 +708,7 @@ init_data(void) int j = 0; haddr_t addr = 0; - /* this must hold so renames don't change entry size. */ + /* this must hold so moves don't change entry size. */ HDassert( (NUM_DATA_ENTRIES / 2) % 20 == 0 ); HDassert( (virt_num_data_entries / 2) % 20 == 0 ); @@ -2938,9 +2938,9 @@ pin_protected_entry(int32_t idx, /***************************************************************************** - * Function: rename_entry() + * Function: move_entry() * - * Purpose: Rename the entry indicated old_idx to the entry indicated + * Purpose: Move the entry indicated old_idx to the entry indicated * by new_idex. Touch up the data array so that flush will * not choke. * @@ -2960,12 +2960,12 @@ pin_protected_entry(int32_t idx, *****************************************************************************/ void -rename_entry(H5C_t * cache_ptr, +move_entry(H5C_t * cache_ptr, H5F_t * file_ptr, int32_t old_idx, int32_t new_idx) { - const char * fcn_name = "rename_entry()"; + const char * fcn_name = "move_entry()"; herr_t result; int tmp; size_t tmp_len; @@ -2994,13 +2994,13 @@ rename_entry(H5C_t * cache_ptr, old_addr = old_entry_ptr->base_addr; new_addr = new_entry_ptr->base_addr; - result = H5AC_rename(file_ptr, &(types[0]), old_addr, new_addr); + result = H5AC_move_entry(file_ptr, &(types[0]), old_addr, new_addr); if ( ( result < 0 ) || ( old_entry_ptr->header.addr != new_addr ) ) { nerrors++; if ( verbose ) { - HDfprintf(stdout, "%d:%s: H5AC_rename() failed.\n", + HDfprintf(stdout, "%d:%s: H5AC_move_entry() failed.\n", world_mpi_rank, fcn_name); } @@ -3043,7 +3043,7 @@ rename_entry(H5C_t * cache_ptr, return; -} /* rename_entry() */ +} /* move_entry() */ /***************************************************************************** @@ -3097,7 +3097,7 @@ resize_entry(int32_t idx, nerrors++; if ( verbose ) { - HDfprintf(stdout, "%d:%s: H5AC_rename() failed.\n", + HDfprintf(stdout, "%d:%s: H5AC_resize_pinned_entry() failed.\n", world_mpi_rank, fcn_name); } @@ -3991,21 +3991,21 @@ smoke_check_1(void) unlock_entry(cache_ptr, file_ptr, i, H5AC__NO_FLAGS_SET); } - /* rename 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); - rename_entry(cache_ptr, file_ptr, i, + move_entry(cache_ptr, file_ptr, i, (i + (virt_num_data_entries / 2))); } - /* ...and then rename them back. */ + /* ...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); - rename_entry(cache_ptr, file_ptr, i, + move_entry(cache_ptr, file_ptr, i, (i + (virt_num_data_entries / 2))); } @@ -4099,7 +4099,7 @@ smoke_check_1(void) * Added pinned entry tests. * * JRM -- 4/28/06 - * Modified test to rename pinned entries. + * Modified test to move pinned entries. * *****************************************************************************/ @@ -4191,27 +4191,27 @@ smoke_check_2(void) 0, 100); } - /* we can't rename pinned entries, so release any local pins now. */ + /* we can't move pinned entries, so release any local pins now. */ local_unpin_all_entries(cache_ptr, file_ptr, FALSE); - /* rename 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); - rename_entry(cache_ptr, file_ptr, i, + move_entry(cache_ptr, file_ptr, i, (i + (virt_num_data_entries / 2))); lock_and_unlock_random_entries(cache_ptr, file_ptr, 0, ((virt_num_data_entries / 50) - 1), 0, 100); } - /* ...and then rename them back. */ + /* ...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); - rename_entry(cache_ptr, file_ptr, i, + move_entry(cache_ptr, file_ptr, i, (i + (virt_num_data_entries / 2))); lock_and_unlock_random_entries(cache_ptr, file_ptr, 0, (virt_num_data_entries / 100), @@ -4490,30 +4490,30 @@ smoke_check_3(void) min_idx, max_idx, 0, 100); } - /* we can't rename pinned entries, so release any local pins now. */ + /* we can't move pinned entries, so release any local pins now. */ local_unpin_all_entries(cache_ptr, file_ptr, FALSE); min_count = 10 / (file_mpi_rank + 1); max_count = min_count + 100; - /* rename 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); - rename_entry(cache_ptr, file_ptr, i, + move_entry(cache_ptr, file_ptr, i, (i + (virt_num_data_entries / 2))); lock_and_unlock_random_entries(cache_ptr, file_ptr, 0, (virt_num_data_entries / 20), min_count, max_count); } - /* ...and then rename them back. */ + /* ...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); - rename_entry(cache_ptr, file_ptr, i, + move_entry(cache_ptr, file_ptr, i, (i + (virt_num_data_entries / 2))); lock_and_unlock_random_entries(cache_ptr, file_ptr, 0, (virt_num_data_entries / 40), @@ -4813,30 +4813,30 @@ smoke_check_4(void) min_idx, max_idx, 0, 100); } - /* we can't rename pinned entries, so release any local pins now. */ + /* we can't move pinned entries, so release any local pins now. */ local_unpin_all_entries(cache_ptr, file_ptr, FALSE); min_count = 10 * (file_mpi_rank % 4); max_count = min_count + 100; - /* rename 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); - rename_entry(cache_ptr, file_ptr, i, + move_entry(cache_ptr, file_ptr, i, (i + (virt_num_data_entries / 2))); lock_and_unlock_random_entries(cache_ptr, file_ptr, 0, (virt_num_data_entries / 20), min_count, max_count); } - /* ...and then rename them back. */ + /* ...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); - rename_entry(cache_ptr, file_ptr, i, + move_entry(cache_ptr, file_ptr, i, (i + (virt_num_data_entries / 2))); lock_and_unlock_random_entries(cache_ptr, file_ptr, 0, (virt_num_data_entries / 40), @@ -5153,7 +5153,7 @@ smoke_check_5(void) * - H5AC_flush() * - H5AC_set() * - H5AC_mark_entry_dirty() - * H5AC_rename() + * H5AC_move_entry() * - H5AC_pin_protected_entry() * - H5AC_protect() * - H5AC_unpin_entry() @@ -5209,8 +5209,8 @@ trace_file_check(void) "H5AC_resize_pinned_entry 0x4 2 0\n", "H5AC_resize_pinned_entry 0x4 4 0\n", "H5AC_unpin_entry 4 0\n", - "H5AC_rename 0 8a65 15 0\n", - "H5AC_rename 8a65 0 15 0\n", + "H5AC_move_entry 0 8a65 15 0\n", + "H5AC_move_entry 8a65 0 15 0\n", "H5AC_flush 0x0 0\n", NULL }; @@ -5319,8 +5319,8 @@ trace_file_check(void) resize_entry(2, data[2].len); unpin_entry(cache_ptr, file_ptr, 2, TRUE, FALSE, FALSE); - rename_entry(cache_ptr, file_ptr, 0, 20); - rename_entry(cache_ptr, file_ptr, 0, 20); + move_entry(cache_ptr, file_ptr, 0, 20); + move_entry(cache_ptr, file_ptr, 0, 20); if ( H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0 ) { nerrors++; |