From 9f85fd57d2b5c7b6bf8245af942907c7d222a156 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Thu, 11 Feb 2010 09:43:34 -0500 Subject: [svn-r18228] Description: Diff reduction against v1 cache code, along with bringing in some very minor changes to the v1 cache code that weren't brought over to the v2 cache code. Tested on: Mac OS X/32 10.6.2 (amazon) debug & prod (h5committest not required on this branch) --- src/H5AC2.c | 211 ++++---- src/H5C2.c | 286 +++++------ src/H5C2pkg.h | 926 +++++++++++++++++----------------- test/cache2.c | 562 ++++++++++----------- test/cache2_api.c | 726 +++++++++++++-------------- test/cache2_common.c | 1343 ++++++++++++++++++-------------------------------- 6 files changed, 1812 insertions(+), 2242 deletions(-) diff --git a/src/H5AC2.c b/src/H5AC2.c index 1be2c89..beb2927 100644 --- a/src/H5AC2.c +++ b/src/H5AC2.c @@ -532,11 +532,11 @@ H5AC2_create(H5F_t * f, FUNC_ENTER_NOAPI(H5AC2_create, FAIL) - HDassert ( f ); - HDassert ( NULL == f->shared->cache2 ); - HDassert ( config_ptr != NULL ) ; - HDassert ( NELMTS(H5AC2_entry_type_names) == H5AC2_NTYPES); - HDassert ( H5C2__MAX_NUM_TYPE_IDS == H5AC2_NTYPES); + HDassert(f); + HDassert(NULL == f->shared->cache2); + HDassert(config_ptr != NULL); + HDcompile_assert(NELMTS(H5AC2_entry_type_names) == H5AC2_NTYPES); + HDcompile_assert(H5C2__MAX_NUM_TYPE_IDS == H5AC2_NTYPES); result = H5AC2_validate_config(config_ptr); @@ -1257,6 +1257,104 @@ done: /*------------------------------------------------------------------------- + * Function: H5AC2_register_mdjsc_callback() + * + * Purpose: Register a metadata journaling status change callback, + * and return the index assigned to the callback in *idx_ptr. + * + * If config_ptr is not NULL, return the current metadata + * journaling configuration in *config_ptr. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: John Mainzer + * 8/15/08 + * + * Modifications: + * + * None. + * + *------------------------------------------------------------------------- + */ + +herr_t +H5AC2_register_mdjsc_callback(const H5F_t * file_ptr, + H5C2_mdj_status_change_func_t fcn_ptr, + void * data_ptr, + int32_t * idx_ptr, + H5C2_mdj_config_t * config_ptr) +{ + herr_t result; + herr_t ret_value=SUCCEED; /* Return value */ + H5C2_t * cache_ptr; +#if H5AC2__TRACE_FILE_ENABLED + char trace[256] = ""; + FILE * trace_file_ptr = NULL; +#endif /* H5AC2__TRACE_FILE_ENABLED */ + + FUNC_ENTER_NOAPI(H5AC2_register_mdjsc_callback, FAIL) + + if ( ( file_ptr == NULL ) || + ( ( cache_ptr = file_ptr->shared->cache2 ) == NULL ) || + ( fcn_ptr == NULL ) || + ( idx_ptr == NULL ) ) { + + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \ + "Invalid parameter(s) on entry."); + } + +#if H5AC2__TRACE_FILE_ENABLED + /* For the register metadata journaling status change callback + * call, fnc_ptr, data_ptr, and the returned idx are all that + * are needed. Write the return value to catch occult errors. + */ + if ( ( cache_ptr != NULL ) && + ( H5C2_get_trace_file_ptr(cache_ptr, &trace_file_ptr) >= 0 ) && + ( trace_file_ptr != NULL ) ) { + + sprintf(trace, "H5AC2_register_mdjsc_callback 0x%lx 0x%lx ", + (unsigned long)(fcn_ptr), (unsigned long)(data_ptr)); + } +#endif /* H5AC2__TRACE_FILE_ENABLED */ + + result = H5C2_register_mdjsc_callback(cache_ptr, + fcn_ptr, + data_ptr, + idx_ptr); + + if ( result < 0 ) { + + HGOTO_ERROR(H5E_CACHE, H5E_CANTJOURNAL, FAIL, \ + "H5C2_register_mdjsc_callback() failed."); + } + + if ( config_ptr != NULL ) { + + result = H5C2_get_journal_config((H5C2_t *)cache_ptr, config_ptr); + + if ( result < 0 ) { + + HGOTO_ERROR(H5E_CACHE, H5E_CANTJOURNAL, FAIL, \ + "H5C2_get_journal_config() failed."); + } + } + +done: + +#if H5AC2__TRACE_FILE_ENABLED + if ( trace_file_ptr != NULL ) { + + HDfprintf(trace_file_ptr, "%s %d %d\n", + trace, *idx_ptr, (int)ret_value); + } +#endif /* H5AC2__TRACE_FILE_ENABLED */ + + FUNC_LEAVE_NOAPI(ret_value) + +} /* H5AC2_register_mdjsc_callback() */ + + +/*------------------------------------------------------------------------- * Function: H5AC2_expunge_entry * * Purpose: Expunge the target entry from the cache without writing it @@ -2353,104 +2451,6 @@ done: /*------------------------------------------------------------------------- - * Function: H5AC2_register_mdjsc_callback() - * - * Purpose: Register a metadata journaling status change callback, - * and return the index assigned to the callback in *idx_ptr. - * - * If config_ptr is not NULL, return the current metadata - * journaling configuration in *config_ptr. - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: John Mainzer - * 8/15/08 - * - * Modifications: - * - * None. - * - *------------------------------------------------------------------------- - */ - -herr_t -H5AC2_register_mdjsc_callback(const H5F_t * file_ptr, - H5C2_mdj_status_change_func_t fcn_ptr, - void * data_ptr, - int32_t * idx_ptr, - H5C2_mdj_config_t * config_ptr) -{ - herr_t result; - herr_t ret_value=SUCCEED; /* Return value */ - H5C2_t * cache_ptr; -#if H5AC2__TRACE_FILE_ENABLED - char trace[256] = ""; - FILE * trace_file_ptr = NULL; -#endif /* H5AC2__TRACE_FILE_ENABLED */ - - FUNC_ENTER_NOAPI(H5AC2_register_mdjsc_callback, FAIL) - - if ( ( file_ptr == NULL ) || - ( ( cache_ptr = file_ptr->shared->cache2 ) == NULL ) || - ( fcn_ptr == NULL ) || - ( idx_ptr == NULL ) ) { - - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \ - "Invalid parameter(s) on entry."); - } - -#if H5AC2__TRACE_FILE_ENABLED - /* For the register metadata journaling status change callback - * call, fnc_ptr, data_ptr, and the returned idx are all that - * are needed. Write the return value to catch occult errors. - */ - if ( ( cache_ptr != NULL ) && - ( H5C2_get_trace_file_ptr(cache_ptr, &trace_file_ptr) >= 0 ) && - ( trace_file_ptr != NULL ) ) { - - sprintf(trace, "H5AC2_register_mdjsc_callback 0x%lx 0x%lx ", - (unsigned long)(fcn_ptr), (unsigned long)(data_ptr)); - } -#endif /* H5AC2__TRACE_FILE_ENABLED */ - - result = H5C2_register_mdjsc_callback(cache_ptr, - fcn_ptr, - data_ptr, - idx_ptr); - - if ( result < 0 ) { - - HGOTO_ERROR(H5E_CACHE, H5E_CANTJOURNAL, FAIL, \ - "H5C2_register_mdjsc_callback() failed."); - } - - if ( config_ptr != NULL ) { - - result = H5C2_get_journal_config((H5C2_t *)cache_ptr, config_ptr); - - if ( result < 0 ) { - - HGOTO_ERROR(H5E_CACHE, H5E_CANTJOURNAL, FAIL, \ - "H5C2_get_journal_config() failed."); - } - } - -done: - -#if H5AC2__TRACE_FILE_ENABLED - if ( trace_file_ptr != NULL ) { - - HDfprintf(trace_file_ptr, "%s %d %d\n", - trace, *idx_ptr, (int)ret_value); - } -#endif /* H5AC2__TRACE_FILE_ENABLED */ - - FUNC_LEAVE_NOAPI(ret_value) - -} /* H5AC2_register_mdjsc_callback() */ - - -/*------------------------------------------------------------------------- * Function: H5AC2_resize_pinned_entry * * Purpose: Resize a pinned entry. The target entry MUST be @@ -3876,7 +3876,7 @@ H5AC2_validate_config(H5AC2_cache_config_t * config_ptr) */ name_len = HDstrlen(config_ptr->trace_file_name); - if ( name_len <= 0 ) { + if ( name_len == 0 ) { HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \ "config_ptr->trace_file_name is empty.") @@ -3897,7 +3897,8 @@ H5AC2_validate_config(H5AC2_cache_config_t * config_ptr) if ( ( config_ptr->evictions_enabled == FALSE ) && ( ( config_ptr->incr_mode != H5C2_incr__off ) || - ( config_ptr->incr_mode != H5C2_decr__off ) ) ) { + ( config_ptr->flash_incr_mode != H5C2_flash_incr__off ) || + ( config_ptr->decr_mode != H5C2_decr__off ) ) ) { HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \ "Can't disable evictions while auto-resize is enabled.") diff --git a/src/H5C2.c b/src/H5C2.c index e416c08..b3b635f 100644 --- a/src/H5C2.c +++ b/src/H5C2.c @@ -130,7 +130,6 @@ #endif /* H5C2_PRINT_ENTRY_POINTS */ - /* * Private file-scope variables. @@ -485,6 +484,7 @@ H5C2_create(size_t max_cache_size, HDassert( max_type_id >= 0 ); HDassert( max_type_id < H5C2__MAX_NUM_TYPE_IDS ); + HDassert( type_name_table_ptr ); HDassert( ( write_permitted == TRUE ) || ( write_permitted == FALSE ) ); @@ -1121,7 +1121,6 @@ H5C2_expunge_entry(H5F_t * f, const H5C2_class_t * type, haddr_t addr) { - /* const char * fcn_name = "H5C2_expunge_entry()"; */ H5C2_t * cache_ptr; herr_t result; herr_t ret_value = SUCCEED; /* Return value */ @@ -2177,7 +2176,6 @@ H5C2_get_entry_status(const H5F_t * f, hbool_t * is_protected_ptr, hbool_t * is_pinned_ptr) { - /* const char * fcn_name = "H5C2_get_entry_status()"; */ H5C2_t * cache_ptr; herr_t ret_value = SUCCEED; /* Return value */ H5C2_cache_entry_t * entry_ptr = NULL; @@ -2459,7 +2457,6 @@ H5C2_insert_entry(H5F_t * f, void * thing, unsigned int flags) { - /* const char * fcn_name = "H5C2_insert_entry()"; */ H5C2_t * cache_ptr; herr_t result; herr_t ret_value = SUCCEED; /* Return value */ @@ -3837,7 +3834,6 @@ H5C2_protect(H5F_t * f, void * udata, unsigned flags) { - /* const char * fcn_name = "H5C2_protect()"; */ H5C2_t * cache_ptr; hbool_t hit; hbool_t first_flush; @@ -5438,7 +5434,6 @@ H5C2_unprotect(H5F_t * f, unsigned int flags, size_t new_size) { - /* const char * fcn_name = "H5C2_unprotect()"; */ H5C2_t * cache_ptr; hbool_t deleted; hbool_t dirtied; @@ -6162,7 +6157,6 @@ H5C2__auto_adjust_cache_size(H5F_t * f, H5C2_t * cache_ptr, hbool_t write_permitted) { - herr_t ret_value = SUCCEED; /* Return value */ herr_t result; hbool_t inserted_epoch_marker = FALSE; size_t new_max_cache_size = 0; @@ -6171,6 +6165,7 @@ H5C2__auto_adjust_cache_size(H5F_t * f, size_t old_min_clean_size = 0; double hit_rate; enum H5C2_resize_status status = in_spec2; /* will change if needed */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT(H5C2__auto_adjust_cache_size) @@ -6805,9 +6800,6 @@ H5C2__autoadjust__ageout__evict_aged_out_entries(H5F_t * f, H5C2_t * cache_ptr, hbool_t write_permitted) { - /* const char * fcn_name = - "H5C2__autoadjust__ageout__evict_aged_out_entries()"; */ - herr_t ret_value = SUCCEED; /* Return value */ herr_t result; size_t eviction_size_limit; size_t bytes_evicted = 0; @@ -6815,6 +6807,7 @@ H5C2__autoadjust__ageout__evict_aged_out_entries(H5F_t * f, H5C2_cache_entry_t * entry_ptr; H5C2_cache_entry_t * next_ptr; H5C2_cache_entry_t * prev_ptr; + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT(H5C2__autoadjust__ageout__evict_aged_out_entries) @@ -7294,8 +7287,6 @@ H5C2__flash_increase_cache_size(H5C2_t * cache_ptr, size_t old_entry_size, size_t new_entry_size) { - /* const char * fcn_name = "H5C2__flash_increase_cache_size()";*/ - herr_t ret_value = SUCCEED; /* Return value */ size_t new_max_cache_size = 0; size_t old_max_cache_size = 0; size_t new_min_clean_size = 0; @@ -7303,6 +7294,7 @@ H5C2__flash_increase_cache_size(H5C2_t * cache_ptr, size_t space_needed; enum H5C2_resize_status status = flash_increase2; /* may change */ double hit_rate; + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT(H5C2__flash_increase_cache_size) HDassert( cache_ptr ); @@ -7510,9 +7502,7 @@ H5C2_flush_invalidate_cache(const H5F_t * f, H5C2_t * cache_ptr, unsigned flags) { - /* const char * fcn_name = "H5C2_flush_invalidate_cache()"; */ herr_t status; - herr_t ret_value = SUCCEED; hbool_t done = FALSE; int32_t protected_entries = 0; int32_t i; @@ -7529,6 +7519,7 @@ H5C2_flush_invalidate_cache(const H5F_t * f, size_t actual_slist_size = 0; size_t initial_slist_size = 0; #endif /* H5C2_DO_SANITY_CHECKS */ + herr_t ret_value = SUCCEED; FUNC_ENTER_NOAPI(H5C2_flush_invalidate_cache, FAIL) @@ -8127,7 +8118,6 @@ H5C2_flush_single_entry(const H5F_t * f, unsigned flags, hbool_t del_entry_from_slist_on_destroy) { - /* const char * fcn_name = "H5C2_flush_single_entry()"; */ hbool_t destroy; hbool_t clear_only; hbool_t was_dirty; @@ -8311,45 +8301,45 @@ H5C2_flush_single_entry(const H5F_t * f, if ( cache_ptr->dLRU_head_ptr == NULL ) HDfprintf(stdout, "%s: cache_ptr->dLRU_head_ptr == NULL.\n", - fcn_name); + FUNC); if ( cache_ptr->dLRU_tail_ptr == NULL ) HDfprintf(stdout, "%s: cache_ptr->dLRU_tail_ptr == NULL.\n", - fcn_name); + FUNC); if ( cache_ptr->dLRU_list_len <= 0 ) HDfprintf(stdout, "%s: cache_ptr->dLRU_list_len <= 0.\n", - fcn_name); + FUNC); if ( cache_ptr->dLRU_list_size <= 0 ) HDfprintf(stdout, "%s: cache_ptr->dLRU_list_size <= 0.\n", - fcn_name); + FUNC); if ( cache_ptr->dLRU_list_size < entry_ptr->size ) HDfprintf(stdout, "%s: cache_ptr->dLRU_list_size < entry_ptr->size.\n", - fcn_name); + FUNC); if ( ( (cache_ptr->dLRU_list_size) == entry_ptr->size ) && ( ! ( (cache_ptr->dLRU_list_len) == 1 ) ) ) HDfprintf(stdout, "%s: dLRU_list_size == size && dLRU_list_len != 1\n", - fcn_name); + FUNC); if ( ( entry_ptr->aux_prev == NULL ) && ( cache_ptr->dLRU_head_ptr != entry_ptr ) ) HDfprintf(stdout, "%s: entry_ptr->aux_prev == NULL && dLRU_head_ptr != entry_ptr\n", - fcn_name); + FUNC); if ( ( entry_ptr->aux_next == NULL ) && ( cache_ptr->dLRU_tail_ptr != entry_ptr ) ) HDfprintf(stdout, "%s: entry_ptr->aux_next == NULL && dLRU_tail_ptr != entry_ptr\n", - fcn_name); + FUNC); if ( ( cache_ptr->dLRU_list_len == 1 ) && ( ! ( ( cache_ptr->dLRU_head_ptr == entry_ptr ) && @@ -8363,7 +8353,7 @@ H5C2_flush_single_entry(const H5F_t * f, { HDfprintf(stdout, "%s: single entry dlru sanity check fails\n", - fcn_name); + FUNC); } } @@ -8372,41 +8362,41 @@ H5C2_flush_single_entry(const H5F_t * f, if ( cache_ptr->cLRU_head_ptr == NULL ) HDfprintf(stdout, "%s: cache_ptr->cLRU_head_ptr == NULL.\n", - fcn_name); + FUNC); if ( cache_ptr->cLRU_tail_ptr == NULL ) HDfprintf(stdout, "%s: cache_ptr->cLRU_tail_ptr == NULL.\n", - fcn_name); + FUNC); if ( cache_ptr->cLRU_list_len <= 0 ) HDfprintf(stdout, "%s: cache_ptr->cLRU_list_len <= 0.\n", - fcn_name); + FUNC); if ( cache_ptr->cLRU_list_size <= 0 ) HDfprintf(stdout, "%s: cache_ptr->cLRU_list_size <= 0.\n", - fcn_name); + FUNC); if ( cache_ptr->cLRU_list_size < entry_ptr->size ) HDfprintf(stdout, "%s: cache_ptr->cLRU_list_size < entry_ptr->size.\n", - fcn_name); + FUNC); if ( ( (cache_ptr->cLRU_list_size) == entry_ptr->size ) && ( ! ( (cache_ptr->cLRU_list_len) == 1 ) ) ) HDfprintf(stdout, "%s: cLRU_list_size == size && cLRU_list_len != 1\n", - fcn_name); + FUNC); if ( ( entry_ptr->aux_prev == NULL ) && ( cache_ptr->cLRU_head_ptr != entry_ptr ) ) - HDfprintf(stdout, "%s: entry_ptr->aux_prev == NULL && cLRU_head_ptr != entry_ptr\n", fcn_name); + HDfprintf(stdout, "%s: entry_ptr->aux_prev == NULL && cLRU_head_ptr != entry_ptr\n", FUNC); if ( ( entry_ptr->aux_next == NULL ) && ( cache_ptr->cLRU_tail_ptr != entry_ptr ) ) - HDfprintf(stdout, "%s: entry_ptr->aux_next == NULL && cLRU_tail_ptr != entry_ptr\n", fcn_name); + HDfprintf(stdout, "%s: entry_ptr->aux_next == NULL && cLRU_tail_ptr != entry_ptr\n", FUNC); if ( ( cache_ptr->cLRU_list_len == 1 ) && ( ! ( ( cache_ptr->cLRU_head_ptr == entry_ptr ) && @@ -8420,7 +8410,7 @@ H5C2_flush_single_entry(const H5F_t * f, { HDfprintf(stdout, "%s: single entry clru sanity check fails\n", - fcn_name); + FUNC); } } } @@ -8535,12 +8525,17 @@ H5C2_flush_single_entry(const H5F_t * f, if ( serialize_flags != 0 ) { + + /* Check for unexpected flags from serialize callback */ + if(serialize_flags & ~(H5C2__SERIALIZE_RESIZED_FLAG | H5C2__SERIALIZE_RENAMED_FLAG)) + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unknown serialize flag(s)") + if ( destroy ) { if ( cache_ptr->mdj_enabled ) { HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ - "rename/resize on destroy when journaling enabled."); + "rename/resize on destroy when journaling enabled.") } /* We have already removed the entry from the @@ -8555,33 +8550,28 @@ H5C2_flush_single_entry(const H5F_t * f, * deallocate the old image, and allocate a new. */ - switch ( serialize_flags ) - { - case H5C2__SERIALIZE_RESIZED_FLAG: - H5C2__UPDATE_STATS_FOR_ENTRY_SIZE_CHANGE( \ - cache_ptr, \ - entry_ptr, \ - new_len) - entry_ptr->size = new_len; - entry_ptr->image_ptr = new_image_ptr; - break; - - case (H5C2__SERIALIZE_RESIZED_FLAG | - H5C2__SERIALIZE_RENAMED_FLAG): - H5C2__UPDATE_STATS_FOR_ENTRY_SIZE_CHANGE( \ - cache_ptr, \ - entry_ptr, \ - new_len) + if(serialize_flags & H5C2__SERIALIZE_RESIZED_FLAG) { + H5C2__UPDATE_STATS_FOR_ENTRY_SIZE_CHANGE(cache_ptr, \ + entry_ptr, \ + new_len) + + /* Check for resize+rename */ + if(serialize_flags & H5C2__SERIALIZE_RENAMED_FLAG) { + H5C2__UPDATE_STATS_FOR_RENAME(cache_ptr, \ + entry_ptr) entry_ptr->addr = new_addr; - entry_ptr->size = new_len; - entry_ptr->image_ptr = new_image_ptr; - break; - - default: - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \ - "unexpected serialize flag(s)") - break; - } + } /* end if */ + + entry_ptr->size = new_len; + entry_ptr->image_ptr = new_image_ptr; + } /* end if */ + else { + HDassert(serialize_flags & H5C2__SERIALIZE_RENAMED_FLAG); + + H5C2__UPDATE_STATS_FOR_RENAME(cache_ptr, \ + entry_ptr) + entry_ptr->addr = new_addr; + } /* end else */ } else { @@ -8599,99 +8589,79 @@ H5C2_flush_single_entry(const H5F_t * f, * cache data structures. */ - switch ( serialize_flags ) - { - case H5C2__SERIALIZE_RESIZED_FLAG: - H5C2__UPDATE_STATS_FOR_ENTRY_SIZE_CHANGE( \ - cache_ptr, \ - entry_ptr, \ - new_len) - /* The replacement policy code thinks the - * entry is already clean, so modify is_dirty - * to meet this expectation. - */ - entry_ptr->is_dirty = FALSE; - - /* update the hash table for the size change*/ - H5C2__UPDATE_INDEX_FOR_SIZE_CHANGE( \ - (cache_ptr), \ - (entry_ptr->size),\ - (new_len)); - - /* The entry can't be protected since we are - * in the process of flushing it. Thus we must - * update the replacement policy data - * structures for the size change. The macro - * deals with the pinned case. - */ - H5C2__UPDATE_RP_FOR_SIZE_CHANGE(cache_ptr, \ - entry_ptr, \ - new_len); - - /* The entry can't be in the slist, so no need - * to update the slist for the size change. - */ - - /* finally, set is_dirty to TRUE again, and - * update the size and image_ptr. - */ - entry_ptr->is_dirty = TRUE; - entry_ptr->size = new_len; - entry_ptr->image_ptr = new_image_ptr; - break; - - case (H5C2__SERIALIZE_RESIZED_FLAG | - H5C2__SERIALIZE_RENAMED_FLAG): - H5C2__UPDATE_STATS_FOR_ENTRY_SIZE_CHANGE( \ - cache_ptr, \ - entry_ptr, \ - new_len) - /* The replacement policy code thinks the - * entry is already clean, so modify is_dirty - * to meet this expectation. - */ - entry_ptr->is_dirty = FALSE; - - /* first update the hash table for the rename */ + if(serialize_flags & H5C2__SERIALIZE_RESIZED_FLAG) { + + H5C2__UPDATE_STATS_FOR_ENTRY_SIZE_CHANGE( \ + cache_ptr, \ + entry_ptr, \ + new_len) + + /* The replacement policy code thinks the + * entry is already clean, so modify is_dirty + * to meet this expectation. + */ + entry_ptr->is_dirty = FALSE; + + /* Check for resize+rename */ + if(serialize_flags & H5C2__SERIALIZE_RENAMED_FLAG) { + H5C2__UPDATE_STATS_FOR_RENAME(cache_ptr, \ + entry_ptr) + + /* update the hash table for the rename */ H5C2__DELETE_FROM_INDEX(cache_ptr, entry_ptr) entry_ptr->addr = new_addr; H5C2__INSERT_IN_INDEX(cache_ptr, entry_ptr, \ FAIL) + } /* end if */ + + /* update the hash table for the size change*/ + H5C2__UPDATE_INDEX_FOR_SIZE_CHANGE( \ + (cache_ptr), \ + (entry_ptr->size),\ + (new_len)); + + /* The entry can't be protected since we are + * in the process of flushing it. Thus we must + * update the replacement policy data + * structures for the size change. The macro + * deals with the pinned case. + */ + H5C2__UPDATE_RP_FOR_SIZE_CHANGE(cache_ptr, \ + entry_ptr, \ + new_len); + + /* The entry can't be in the slist, so no need + * to update the slist for the size change. + */ + + /* finally, set is_dirty to TRUE again, and + * update the size and image_ptr. + */ + entry_ptr->is_dirty = TRUE; + entry_ptr->size = new_len; + entry_ptr->image_ptr = new_image_ptr; + } /* end if */ + else { + HDassert(serialize_flags & H5C2__SERIALIZE_RENAMED_FLAG); + + /* The replacement policy code thinks the + * entry is already clean, so modify is_dirty + * to meet this expectation. + */ + entry_ptr->is_dirty = FALSE; + + H5C2__UPDATE_STATS_FOR_RENAME(cache_ptr, \ + entry_ptr) - /* update the hash table for the size change */ - H5C2__UPDATE_INDEX_FOR_SIZE_CHANGE( \ - (cache_ptr), \ - (entry_ptr->size),\ - (new_len)); - - /* The entry can't be protected since we are - * in the process of flushing it. Thus we must - * update the replacement policy data - * structures for the size change. The macro - * deals with the pinned case. - */ - H5C2__UPDATE_RP_FOR_SIZE_CHANGE(cache_ptr, \ - entry_ptr, \ - new_len); - - /* The entry can't be in the slist, so no need - * to update the slist for the size change. - */ - - /* finally, set is_dirty to TRUE again, and - * update the size and image_ptr. - */ - entry_ptr->is_dirty = TRUE; - - entry_ptr->size = new_len; - entry_ptr->image_ptr = new_image_ptr; - break; - - default: - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \ - "unexpected serialize flag(s)") - break; - } + /* first update the hash table for the rename */ + H5C2__DELETE_FROM_INDEX(cache_ptr, entry_ptr) + entry_ptr->addr = new_addr; + H5C2__INSERT_IN_INDEX(cache_ptr, entry_ptr, \ + FAIL) + + /* finally, set is_dirty to TRUE again */ + entry_ptr->is_dirty = TRUE; + } /* end else */ } } entry_ptr->image_up_to_date = TRUE; @@ -8870,12 +8840,11 @@ H5C2_load_entry(H5F_t * f, size_t len, void * udata_ptr) { - /* const char * fcn_name = "H5C2_load_entry()"; */ hbool_t dirty = FALSE; void * image_ptr = NULL; void * thing = NULL; - void * ret_value = NULL; H5C2_cache_entry_t * entry_ptr = NULL; + void * ret_value = NULL; FUNC_ENTER_NOAPI_NOINIT(H5C2_load_entry) @@ -9145,8 +9114,6 @@ H5C2_make_space_in_cache(H5F_t * f, size_t space_needed, hbool_t write_permitted) { - /* const char * fcn_name = "H5C2_make_space_in_cache()"; */ - herr_t ret_value = SUCCEED; /* Return value */ herr_t result; int32_t entries_examined = 0; int32_t initial_list_len; @@ -9158,6 +9125,7 @@ H5C2_make_space_in_cache(H5F_t * f, H5C2_cache_entry_t * entry_ptr; H5C2_cache_entry_t * prev_ptr; H5C2_cache_entry_t * next_ptr; + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT(H5C2_make_space_in_cache) @@ -9228,7 +9196,7 @@ H5C2_make_space_in_cache(H5F_t * f, if ( result < 0 ) { HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \ - "unable to flush entry 1") + "unable to flush entry") } if ( prev_ptr != NULL ) { @@ -9326,7 +9294,7 @@ H5C2_make_space_in_cache(H5F_t * f, if ( result < 0 ) { HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, \ - "unable to flush entry 2") + "unable to flush entry") } if ( prev_ptr != NULL ) { @@ -9357,23 +9325,23 @@ H5C2_make_space_in_cache(H5F_t * f, #if 0 /* This debuging code may be useful in the future -- keep it for now. */ if ( ! ( prev_ptr->is_dirty ) ) { HDfprintf(stdout, "%s: ! prev_ptr->is_dirty\n", - fcn_name); + FUNC); } if ( prev_ptr->aux_next != next_ptr ) { HDfprintf(stdout, "%s: prev_ptr->next != next_ptr\n", - fcn_name); + FUNC); } if ( prev_ptr->is_protected ) { HDfprintf(stdout, "%s: prev_ptr->is_protected\n", - fcn_name); + FUNC); } if ( prev_ptr->is_pinned ) { HDfprintf(stdout, "%s:prev_ptr->is_pinned\n", - fcn_name); + FUNC); } HDfprintf(stdout, "%s: re-starting scan of dirty list\n", - fcn_name); + FUNC); #endif /* JRM */ entry_ptr = cache_ptr->dLRU_tail_ptr; diff --git a/src/H5C2pkg.h b/src/H5C2pkg.h index f706dbc..9909ca2 100644 --- a/src/H5C2pkg.h +++ b/src/H5C2pkg.h @@ -1720,70 +1720,70 @@ if ( ( (entry_ptr) == NULL ) || \ #define H5C2__AUX_DLL_APPEND(entry_ptr, head_ptr, tail_ptr, len, Size, fail_val)\ H5C2__AUX_DLL_PRE_INSERT_SC(entry_ptr, head_ptr, tail_ptr, len, Size, \ - fail_val) \ - if ( (head_ptr) == NULL ) \ - { \ - (head_ptr) = (entry_ptr); \ - (tail_ptr) = (entry_ptr); \ - } \ - else \ - { \ - (tail_ptr)->aux_next = (entry_ptr); \ - (entry_ptr)->aux_prev = (tail_ptr); \ - (tail_ptr) = (entry_ptr); \ - } \ - (len)++; \ + fail_val) \ + if ( (head_ptr) == NULL ) \ + { \ + (head_ptr) = (entry_ptr); \ + (tail_ptr) = (entry_ptr); \ + } \ + else \ + { \ + (tail_ptr)->aux_next = (entry_ptr); \ + (entry_ptr)->aux_prev = (tail_ptr); \ + (tail_ptr) = (entry_ptr); \ + } \ + (len)++; \ (Size) += entry_ptr->size; #define H5C2__AUX_DLL_PREPEND(entry_ptr, head_ptr, tail_ptr, len, Size, fv) \ H5C2__AUX_DLL_PRE_INSERT_SC(entry_ptr, head_ptr, tail_ptr, len, Size, \ - fv) \ - if ( (head_ptr) == NULL ) \ - { \ - (head_ptr) = (entry_ptr); \ - (tail_ptr) = (entry_ptr); \ - } \ - else \ - { \ - (head_ptr)->aux_prev = (entry_ptr); \ - (entry_ptr)->aux_next = (head_ptr); \ - (head_ptr) = (entry_ptr); \ - } \ - (len)++; \ + fv) \ + if ( (head_ptr) == NULL ) \ + { \ + (head_ptr) = (entry_ptr); \ + (tail_ptr) = (entry_ptr); \ + } \ + else \ + { \ + (head_ptr)->aux_prev = (entry_ptr); \ + (entry_ptr)->aux_next = (head_ptr); \ + (head_ptr) = (entry_ptr); \ + } \ + (len)++; \ (Size) += entry_ptr->size; #define H5C2__AUX_DLL_REMOVE(entry_ptr, head_ptr, tail_ptr, len, Size, fv) \ H5C2__AUX_DLL_PRE_REMOVE_SC(entry_ptr, head_ptr, tail_ptr, len, Size, \ - fv) \ - { \ - if ( (head_ptr) == (entry_ptr) ) \ - { \ - (head_ptr) = (entry_ptr)->aux_next; \ - if ( (head_ptr) != NULL ) \ - { \ - (head_ptr)->aux_prev = NULL; \ - } \ - } \ - else \ - { \ - (entry_ptr)->aux_prev->aux_next = (entry_ptr)->aux_next; \ - } \ - if ( (tail_ptr) == (entry_ptr) ) \ - { \ - (tail_ptr) = (entry_ptr)->aux_prev; \ - if ( (tail_ptr) != NULL ) \ - { \ - (tail_ptr)->aux_next = NULL; \ - } \ - } \ - else \ - { \ - (entry_ptr)->aux_next->aux_prev = (entry_ptr)->aux_prev; \ - } \ - entry_ptr->aux_next = NULL; \ - entry_ptr->aux_prev = NULL; \ - (len)--; \ - (Size) -= entry_ptr->size; \ + fv) \ + { \ + if ( (head_ptr) == (entry_ptr) ) \ + { \ + (head_ptr) = (entry_ptr)->aux_next; \ + if ( (head_ptr) != NULL ) \ + { \ + (head_ptr)->aux_prev = NULL; \ + } \ + } \ + else \ + { \ + (entry_ptr)->aux_prev->aux_next = (entry_ptr)->aux_next; \ + } \ + if ( (tail_ptr) == (entry_ptr) ) \ + { \ + (tail_ptr) = (entry_ptr)->aux_prev; \ + if ( (tail_ptr) != NULL ) \ + { \ + (tail_ptr)->aux_next = NULL; \ + } \ + } \ + else \ + { \ + (entry_ptr)->aux_next->aux_prev = (entry_ptr)->aux_prev; \ + } \ + entry_ptr->aux_next = NULL; \ + entry_ptr->aux_prev = NULL; \ + (len)--; \ + (Size) -= entry_ptr->size; \ } #if H5C2_DO_SANITY_CHECKS @@ -2010,22 +2010,22 @@ if ( ( (entry_ptr) == NULL ) || \ (((cache_ptr)->renames)[(entry_ptr)->type->id])++; #define H5C2__UPDATE_STATS_FOR_ENTRY_SIZE_CHANGE(cache_ptr, entry_ptr, new_size)\ - if ( cache_ptr->flush_in_progress ) { \ - ((cache_ptr)->cache_flush_size_changes[(entry_ptr)->type->id])++; \ - } \ - if ( entry_ptr->flush_in_progress ) { \ - ((cache_ptr)->entry_flush_size_changes[(entry_ptr)->type->id])++; \ - } \ - if ( (entry_ptr)->size < (new_size) ) { \ - ((cache_ptr)->size_increases[(entry_ptr)->type->id])++; \ - if ( (cache_ptr)->index_size > (cache_ptr)->max_index_size ) \ - (cache_ptr)->max_index_size = (cache_ptr)->index_size; \ - if ( (cache_ptr)->slist_size > (cache_ptr)->max_slist_size ) \ - (cache_ptr)->max_slist_size = (cache_ptr)->slist_size; \ - if ( (cache_ptr)->pl_size > (cache_ptr)->max_pl_size ) \ - (cache_ptr)->max_pl_size = (cache_ptr)->pl_size; \ - } else if ( (entry_ptr)->size > (new_size) ) { \ - ((cache_ptr)->size_decreases[(entry_ptr)->type->id])++; \ + if ( cache_ptr->flush_in_progress ) { \ + ((cache_ptr)->cache_flush_size_changes[(entry_ptr)->type->id])++; \ + } \ + if ( entry_ptr->flush_in_progress ) { \ + ((cache_ptr)->entry_flush_size_changes[(entry_ptr)->type->id])++; \ + } \ + if ( (entry_ptr)->size < (new_size) ) { \ + ((cache_ptr)->size_increases[(entry_ptr)->type->id])++; \ + if ( (cache_ptr)->index_size > (cache_ptr)->max_index_size ) \ + (cache_ptr)->max_index_size = (cache_ptr)->index_size; \ + if ( (cache_ptr)->slist_size > (cache_ptr)->max_slist_size ) \ + (cache_ptr)->max_slist_size = (cache_ptr)->slist_size; \ + if ( (cache_ptr)->pl_size > (cache_ptr)->max_pl_size ) \ + (cache_ptr)->max_pl_size = (cache_ptr)->pl_size; \ + } else if ( (entry_ptr)->size > (new_size) ) { \ + ((cache_ptr)->size_decreases[(entry_ptr)->type->id])++; \ } #define H5C2__UPDATE_STATS_FOR_HT_INSERTION(cache_ptr) \ @@ -2049,9 +2049,9 @@ if ( ( (entry_ptr) == NULL ) || \ #if H5C2_COLLECT_CACHE_ENTRY_STATS #define H5C2__RESET_CACHE_ENTRY_STATS(entry_ptr) \ - (entry_ptr)->accesses = 0; \ - (entry_ptr)->clears = 0; \ - (entry_ptr)->flushes = 0; \ + (entry_ptr)->accesses = 0; \ + (entry_ptr)->clears = 0; \ + (entry_ptr)->flushes = 0; \ (entry_ptr)->pins = 0; #define H5C2__UPDATE_STATS_FOR_CLEAR(cache_ptr, entry_ptr) \ @@ -2277,100 +2277,100 @@ if ( ( (entry_ptr) == NULL ) || \ #if H5C2_DO_SANITY_CHECKS #define H5C2__PRE_HT_INSERT_SC(cache_ptr, entry_ptr, fail_val) \ -if ( ( (cache_ptr) == NULL ) || \ - ( (cache_ptr)->magic != H5C2__H5C2_T_MAGIC ) || \ - ( (entry_ptr) == NULL ) || \ - ( ! H5F_addr_defined((entry_ptr)->addr) ) || \ - ( (entry_ptr)->ht_next != NULL ) || \ - ( (entry_ptr)->ht_prev != NULL ) || \ - ( (entry_ptr)->size <= 0 ) || \ +if ( ( (cache_ptr) == NULL ) || \ + ( (cache_ptr)->magic != H5C2__H5C2_T_MAGIC ) || \ + ( (entry_ptr) == NULL ) || \ + ( ! H5F_addr_defined((entry_ptr)->addr) ) || \ + ( (entry_ptr)->ht_next != NULL ) || \ + ( (entry_ptr)->ht_prev != NULL ) || \ + ( (entry_ptr)->size <= 0 ) || \ ( (k = H5C2__HASH_FCN((entry_ptr)->addr)) < 0 ) || \ ( k >= H5C2__HASH_TABLE_LEN ) ) { \ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, fail_val, \ - "Pre HT insert SC failed") \ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, fail_val, \ + "Pre HT insert SC failed") \ } -#define H5C2__PRE_HT_REMOVE_SC(cache_ptr, entry_ptr) \ +#define H5C2__PRE_HT_REMOVE_SC(cache_ptr, entry_ptr) \ if ( ( (cache_ptr) == NULL ) || \ - ( (cache_ptr)->magic != H5C2__H5C2_T_MAGIC ) || \ + ( (cache_ptr)->magic != H5C2__H5C2_T_MAGIC ) || \ ( (cache_ptr)->index_len < 1 ) || \ ( (entry_ptr) == NULL ) || \ ( (cache_ptr)->index_size < (entry_ptr)->size ) || \ ( ! H5F_addr_defined((entry_ptr)->addr) ) || \ ( (entry_ptr)->size <= 0 ) || \ - ( H5C2__HASH_FCN((entry_ptr)->addr) < 0 ) || \ - ( H5C2__HASH_FCN((entry_ptr)->addr) >= H5C2__HASH_TABLE_LEN ) || \ - ( ((cache_ptr)->index)[(H5C2__HASH_FCN((entry_ptr)->addr))] \ + ( H5C2__HASH_FCN((entry_ptr)->addr) < 0 ) || \ + ( H5C2__HASH_FCN((entry_ptr)->addr) >= H5C2__HASH_TABLE_LEN ) || \ + ( ((cache_ptr)->index)[(H5C2__HASH_FCN((entry_ptr)->addr))] \ == NULL ) || \ - ( ( ((cache_ptr)->index)[(H5C2__HASH_FCN((entry_ptr)->addr))] \ + ( ( ((cache_ptr)->index)[(H5C2__HASH_FCN((entry_ptr)->addr))] \ != (entry_ptr) ) && \ ( (entry_ptr)->ht_prev == NULL ) ) || \ - ( ( ((cache_ptr)->index)[(H5C2__HASH_FCN((entry_ptr)->addr))] == \ + ( ( ((cache_ptr)->index)[(H5C2__HASH_FCN((entry_ptr)->addr))] == \ (entry_ptr) ) && \ ( (entry_ptr)->ht_prev != NULL ) ) ) { \ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Pre HT remove SC failed") \ } #define H5C2__PRE_HT_SEARCH_SC(cache_ptr, Addr, fail_val) \ -if ( ( (cache_ptr) == NULL ) || \ - ( (cache_ptr)->magic != H5C2__H5C2_T_MAGIC ) || \ - ( ! H5F_addr_defined(Addr) ) || \ +if ( ( (cache_ptr) == NULL ) || \ + ( (cache_ptr)->magic != H5C2__H5C2_T_MAGIC ) || \ + ( ! H5F_addr_defined(Addr) ) || \ ( H5C2__HASH_FCN(Addr) < 0 ) || \ - ( H5C2__HASH_FCN(Addr) >= H5C2__HASH_TABLE_LEN ) ) { \ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, fail_val, "Pre HT search SC failed") \ + ( H5C2__HASH_FCN(Addr) >= H5C2__HASH_TABLE_LEN ) ) { \ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, fail_val, "Pre HT search SC failed") \ } #define H5C2__POST_SUC_HT_SEARCH_SC(cache_ptr, entry_ptr, Addr, k, fail_val) \ -if ( ( (cache_ptr) == NULL ) || \ - ( (cache_ptr)->magic != H5C2__H5C2_T_MAGIC ) || \ - ( (cache_ptr)->index_len < 1 ) || \ - ( (entry_ptr) == NULL ) || \ - ( (cache_ptr)->index_size < (entry_ptr)->size ) || \ - ( H5F_addr_ne((entry_ptr)->addr, (Addr)) ) || \ - ( (entry_ptr)->size <= 0 ) || \ - ( ((cache_ptr)->index)[k] == NULL ) || \ - ( ( ((cache_ptr)->index)[k] != (entry_ptr) ) && \ - ( (entry_ptr)->ht_prev == NULL ) ) || \ - ( ( ((cache_ptr)->index)[k] == (entry_ptr) ) && \ - ( (entry_ptr)->ht_prev != NULL ) ) || \ - ( ( (entry_ptr)->ht_prev != NULL ) && \ - ( (entry_ptr)->ht_prev->ht_next != (entry_ptr) ) ) || \ - ( ( (entry_ptr)->ht_next != NULL ) && \ - ( (entry_ptr)->ht_next->ht_prev != (entry_ptr) ) ) ) { \ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, fail_val, \ - "Post successful HT search SC failed") \ +if ( ( (cache_ptr) == NULL ) || \ + ( (cache_ptr)->magic != H5C2__H5C2_T_MAGIC ) || \ + ( (cache_ptr)->index_len < 1 ) || \ + ( (entry_ptr) == NULL ) || \ + ( (cache_ptr)->index_size < (entry_ptr)->size ) || \ + ( H5F_addr_ne((entry_ptr)->addr, (Addr)) ) || \ + ( (entry_ptr)->size <= 0 ) || \ + ( ((cache_ptr)->index)[k] == NULL ) || \ + ( ( ((cache_ptr)->index)[k] != (entry_ptr) ) && \ + ( (entry_ptr)->ht_prev == NULL ) ) || \ + ( ( ((cache_ptr)->index)[k] == (entry_ptr) ) && \ + ( (entry_ptr)->ht_prev != NULL ) ) || \ + ( ( (entry_ptr)->ht_prev != NULL ) && \ + ( (entry_ptr)->ht_prev->ht_next != (entry_ptr) ) ) || \ + ( ( (entry_ptr)->ht_next != NULL ) && \ + ( (entry_ptr)->ht_next->ht_prev != (entry_ptr) ) ) ) { \ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, fail_val, \ + "Post successful HT search SC failed") \ } #define H5C2__POST_HT_SHIFT_TO_FRONT(cache_ptr, entry_ptr, k, fail_val) \ -if ( ( (cache_ptr) == NULL ) || \ - ( ((cache_ptr)->index)[k] != (entry_ptr) ) || \ - ( (entry_ptr)->ht_prev != NULL ) ) { \ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, fail_val, \ - "Post HT shift to front SC failed") \ +if ( ( (cache_ptr) == NULL ) || \ + ( ((cache_ptr)->index)[k] != (entry_ptr) ) || \ + ( (entry_ptr)->ht_prev != NULL ) ) { \ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, fail_val, \ + "Post HT shift to front SC failed") \ } #define H5C2__PRE_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size) \ +if ( ( (cache_ptr) == NULL ) || \ + ( (cache_ptr)->index_len <= 0 ) || \ + ( (cache_ptr)->index_size <= 0 ) || \ + ( (new_size) <= 0 ) || \ + ( (old_size) > (cache_ptr)->index_size ) || \ + ( (new_size) <= 0 ) || \ + ( ( (cache_ptr)->index_len == 1 ) && \ + ( (cache_ptr)->index_size != (old_size) ) ) ) { \ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ + "Pre HT entry size change SC failed") \ +} + +#define H5C2__POST_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size) \ if ( ( (cache_ptr) == NULL ) || \ ( (cache_ptr)->index_len <= 0 ) || \ ( (cache_ptr)->index_size <= 0 ) || \ - ( (new_size) <= 0 ) || \ - ( (old_size) > (cache_ptr)->index_size ) || \ - ( (new_size) <= 0 ) || \ + ( (new_size) > (cache_ptr)->index_size ) || \ ( ( (cache_ptr)->index_len == 1 ) && \ - ( (cache_ptr)->index_size != (old_size) ) ) ) { \ + ( (cache_ptr)->index_size != (new_size) ) ) ) { \ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ - "Pre HT entry size change SC failed") \ -} - -#define H5C2__POST_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size) \ -if ( ( (cache_ptr) == NULL ) || \ - ( (cache_ptr)->index_len <= 0 ) || \ - ( (cache_ptr)->index_size <= 0 ) || \ - ( (new_size) > (cache_ptr)->index_size ) || \ - ( ( (cache_ptr)->index_len == 1 ) && \ - ( (cache_ptr)->index_size != (new_size) ) ) ) { \ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ - "Post HT entry size change SC failed") \ + "Post HT entry size change SC failed") \ } #else /* H5C2_DO_SANITY_CHECKS */ @@ -2387,30 +2387,30 @@ if ( ( (cache_ptr) == NULL ) || \ #define H5C2__INSERT_IN_INDEX(cache_ptr, entry_ptr, fail_val) \ -{ \ - int k; \ +{ \ + int k; \ H5C2__PRE_HT_INSERT_SC(cache_ptr, entry_ptr, fail_val) \ k = H5C2__HASH_FCN((entry_ptr)->addr); \ - if ( ((cache_ptr)->index)[k] == NULL ) \ - { \ - ((cache_ptr)->index)[k] = (entry_ptr); \ - } \ - else \ - { \ - (entry_ptr)->ht_next = ((cache_ptr)->index)[k]; \ - (entry_ptr)->ht_next->ht_prev = (entry_ptr); \ - ((cache_ptr)->index)[k] = (entry_ptr); \ - } \ - (cache_ptr)->index_len++; \ - (cache_ptr)->index_size += (entry_ptr)->size; \ + if ( ((cache_ptr)->index)[k] == NULL ) \ + { \ + ((cache_ptr)->index)[k] = (entry_ptr); \ + } \ + else \ + { \ + (entry_ptr)->ht_next = ((cache_ptr)->index)[k]; \ + (entry_ptr)->ht_next->ht_prev = (entry_ptr); \ + ((cache_ptr)->index)[k] = (entry_ptr); \ + } \ + (cache_ptr)->index_len++; \ + (cache_ptr)->index_size += (entry_ptr)->size; \ H5C2__UPDATE_STATS_FOR_HT_INSERTION(cache_ptr) \ } -#define H5C2__DELETE_FROM_INDEX(cache_ptr, entry_ptr) \ +#define H5C2__DELETE_FROM_INDEX(cache_ptr, entry_ptr) \ { \ int k; \ - H5C2__PRE_HT_REMOVE_SC(cache_ptr, entry_ptr) \ - k = H5C2__HASH_FCN((entry_ptr)->addr); \ + H5C2__PRE_HT_REMOVE_SC(cache_ptr, entry_ptr) \ + k = H5C2__HASH_FCN((entry_ptr)->addr); \ if ( (entry_ptr)->ht_next ) \ { \ (entry_ptr)->ht_next->ht_prev = (entry_ptr)->ht_prev; \ @@ -2427,79 +2427,79 @@ if ( ( (cache_ptr) == NULL ) || \ (entry_ptr)->ht_prev = NULL; \ (cache_ptr)->index_len--; \ (cache_ptr)->index_size -= (entry_ptr)->size; \ - H5C2__UPDATE_STATS_FOR_HT_DELETION(cache_ptr) \ + H5C2__UPDATE_STATS_FOR_HT_DELETION(cache_ptr) \ } -#define H5C2__SEARCH_INDEX(cache_ptr, Addr, entry_ptr, fail_val) \ -{ \ - int k; \ - int depth = 0; \ +#define H5C2__SEARCH_INDEX(cache_ptr, Addr, entry_ptr, fail_val) \ +{ \ + int k; \ + int depth = 0; \ H5C2__PRE_HT_SEARCH_SC(cache_ptr, Addr, fail_val) \ k = H5C2__HASH_FCN(Addr); \ - entry_ptr = ((cache_ptr)->index)[k]; \ - while ( ( entry_ptr ) && ( H5F_addr_ne(Addr, (entry_ptr)->addr) ) ) \ - { \ - (entry_ptr) = (entry_ptr)->ht_next; \ - (depth)++; \ - } \ - if ( entry_ptr ) \ - { \ + entry_ptr = ((cache_ptr)->index)[k]; \ + while ( ( entry_ptr ) && ( H5F_addr_ne(Addr, (entry_ptr)->addr) ) ) \ + { \ + (entry_ptr) = (entry_ptr)->ht_next; \ + (depth)++; \ + } \ + if ( entry_ptr ) \ + { \ H5C2__POST_SUC_HT_SEARCH_SC(cache_ptr, entry_ptr, Addr, k, fail_val) \ - if ( entry_ptr != ((cache_ptr)->index)[k] ) \ - { \ - if ( (entry_ptr)->ht_next ) \ - { \ - (entry_ptr)->ht_next->ht_prev = (entry_ptr)->ht_prev; \ - } \ - HDassert( (entry_ptr)->ht_prev != NULL ); \ - (entry_ptr)->ht_prev->ht_next = (entry_ptr)->ht_next; \ - ((cache_ptr)->index)[k]->ht_prev = (entry_ptr); \ - (entry_ptr)->ht_next = ((cache_ptr)->index)[k]; \ - (entry_ptr)->ht_prev = NULL; \ - ((cache_ptr)->index)[k] = (entry_ptr); \ + if ( entry_ptr != ((cache_ptr)->index)[k] ) \ + { \ + if ( (entry_ptr)->ht_next ) \ + { \ + (entry_ptr)->ht_next->ht_prev = (entry_ptr)->ht_prev; \ + } \ + HDassert( (entry_ptr)->ht_prev != NULL ); \ + (entry_ptr)->ht_prev->ht_next = (entry_ptr)->ht_next; \ + ((cache_ptr)->index)[k]->ht_prev = (entry_ptr); \ + (entry_ptr)->ht_next = ((cache_ptr)->index)[k]; \ + (entry_ptr)->ht_prev = NULL; \ + ((cache_ptr)->index)[k] = (entry_ptr); \ H5C2__POST_HT_SHIFT_TO_FRONT(cache_ptr, entry_ptr, k, fail_val) \ - } \ - } \ + } \ + } \ H5C2__UPDATE_STATS_FOR_HT_SEARCH(cache_ptr, (entry_ptr != NULL), depth) \ } #define H5C2__SEARCH_INDEX_NO_STATS(cache_ptr, Addr, entry_ptr, fail_val) \ -{ \ - int k; \ - int depth = 0; \ +{ \ + int k; \ + int depth = 0; \ H5C2__PRE_HT_SEARCH_SC(cache_ptr, Addr, fail_val) \ k = H5C2__HASH_FCN(Addr); \ - entry_ptr = ((cache_ptr)->index)[k]; \ - while ( ( entry_ptr ) && ( H5F_addr_ne(Addr, (entry_ptr)->addr) ) ) \ - { \ - (entry_ptr) = (entry_ptr)->ht_next; \ - (depth)++; \ - } \ - if ( entry_ptr ) \ - { \ + entry_ptr = ((cache_ptr)->index)[k]; \ + while ( ( entry_ptr ) && ( H5F_addr_ne(Addr, (entry_ptr)->addr) ) ) \ + { \ + (entry_ptr) = (entry_ptr)->ht_next; \ + (depth)++; \ + } \ + if ( entry_ptr ) \ + { \ H5C2__POST_SUC_HT_SEARCH_SC(cache_ptr, entry_ptr, Addr, k, fail_val) \ - if ( entry_ptr != ((cache_ptr)->index)[k] ) \ - { \ - if ( (entry_ptr)->ht_next ) \ - { \ - (entry_ptr)->ht_next->ht_prev = (entry_ptr)->ht_prev; \ - } \ - HDassert( (entry_ptr)->ht_prev != NULL ); \ - (entry_ptr)->ht_prev->ht_next = (entry_ptr)->ht_next; \ - ((cache_ptr)->index)[k]->ht_prev = (entry_ptr); \ - (entry_ptr)->ht_next = ((cache_ptr)->index)[k]; \ - (entry_ptr)->ht_prev = NULL; \ - ((cache_ptr)->index)[k] = (entry_ptr); \ + if ( entry_ptr != ((cache_ptr)->index)[k] ) \ + { \ + if ( (entry_ptr)->ht_next ) \ + { \ + (entry_ptr)->ht_next->ht_prev = (entry_ptr)->ht_prev; \ + } \ + HDassert( (entry_ptr)->ht_prev != NULL ); \ + (entry_ptr)->ht_prev->ht_next = (entry_ptr)->ht_next; \ + ((cache_ptr)->index)[k]->ht_prev = (entry_ptr); \ + (entry_ptr)->ht_next = ((cache_ptr)->index)[k]; \ + (entry_ptr)->ht_prev = NULL; \ + ((cache_ptr)->index)[k] = (entry_ptr); \ H5C2__POST_HT_SHIFT_TO_FRONT(cache_ptr, entry_ptr, k, fail_val) \ - } \ - } \ + } \ + } \ } #define H5C2__UPDATE_INDEX_FOR_SIZE_CHANGE(cache_ptr, old_size, new_size) \ -{ \ +{ \ H5C2__PRE_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size) \ - (cache_ptr)->index_size -= old_size; \ - (cache_ptr)->index_size += new_size; \ + (cache_ptr)->index_size -= old_size; \ + (cache_ptr)->index_size += new_size; \ H5C2__POST_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size) \ } @@ -2566,10 +2566,10 @@ if ( ( (cache_ptr) == NULL ) || \ #if H5C2_DO_SANITY_CHECKS -#define H5C2__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, fail_val) \ +#define H5C2__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, fail_val) \ { \ HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ + HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ HDassert( (entry_ptr) ); \ HDassert( (entry_ptr)->size > 0 ); \ HDassert( H5F_addr_defined((entry_ptr)->addr) ); \ @@ -2593,10 +2593,10 @@ if ( ( (cache_ptr) == NULL ) || \ #else /* H5C2_DO_SANITY_CHECKS */ -#define H5C2__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, fail_val) \ +#define H5C2__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, fail_val) \ { \ HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ + HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ HDassert( (entry_ptr) ); \ HDassert( (entry_ptr)->size > 0 ); \ HDassert( H5F_addr_defined((entry_ptr)->addr) ); \ @@ -2651,10 +2651,10 @@ if ( ( (cache_ptr) == NULL ) || \ *------------------------------------------------------------------------- */ -#define H5C2__REMOVE_ENTRY_FROM_SLIST(cache_ptr, entry_ptr) \ +#define H5C2__REMOVE_ENTRY_FROM_SLIST(cache_ptr, entry_ptr) \ { \ HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ + HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ HDassert( (entry_ptr) ); \ HDassert( !((entry_ptr)->is_protected) ); \ HDassert( !((entry_ptr)->is_read_only) ); \ @@ -2706,46 +2706,46 @@ if ( ( (cache_ptr) == NULL ) || \ #if H5C2_DO_SANITY_CHECKS #define H5C2__UPDATE_SLIST_FOR_SIZE_CHANGE(cache_ptr, old_size, new_size) \ -{ \ - HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ - HDassert( (old_size) > 0 ); \ - HDassert( (new_size) > 0 ); \ - HDassert( (old_size) <= (cache_ptr)->slist_size ); \ - HDassert( (cache_ptr)->slist_len > 0 ); \ - HDassert( ((cache_ptr)->slist_len > 1) || \ - ( (cache_ptr)->slist_size == (old_size) ) ); \ - \ - (cache_ptr)->slist_size -= (old_size); \ - (cache_ptr)->slist_size += (new_size); \ - \ - (cache_ptr)->slist_size_increase -= (int64_t)(old_size); \ - (cache_ptr)->slist_size_increase += (int64_t)(new_size); \ - \ - HDassert( (new_size) <= (cache_ptr)->slist_size ); \ - HDassert( ( (cache_ptr)->slist_len > 1 ) || \ - ( (cache_ptr)->slist_size == (new_size) ) ); \ +{ \ + HDassert( (cache_ptr) ); \ + HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ + HDassert( (old_size) > 0 ); \ + HDassert( (new_size) > 0 ); \ + HDassert( (old_size) <= (cache_ptr)->slist_size ); \ + HDassert( (cache_ptr)->slist_len > 0 ); \ + HDassert( ((cache_ptr)->slist_len > 1) || \ + ( (cache_ptr)->slist_size == (old_size) ) ); \ + \ + (cache_ptr)->slist_size -= (old_size); \ + (cache_ptr)->slist_size += (new_size); \ + \ + (cache_ptr)->slist_size_increase -= (int64_t)(old_size); \ + (cache_ptr)->slist_size_increase += (int64_t)(new_size); \ + \ + HDassert( (new_size) <= (cache_ptr)->slist_size ); \ + HDassert( ( (cache_ptr)->slist_len > 1 ) || \ + ( (cache_ptr)->slist_size == (new_size) ) ); \ } /* H5C2__REMOVE_ENTRY_FROM_SLIST */ #else /* H5C2_DO_SANITY_CHECKS */ #define H5C2__UPDATE_SLIST_FOR_SIZE_CHANGE(cache_ptr, old_size, new_size) \ -{ \ - HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ - HDassert( (old_size) > 0 ); \ - HDassert( (new_size) > 0 ); \ - HDassert( (old_size) <= (cache_ptr)->slist_size ); \ - HDassert( (cache_ptr)->slist_len > 0 ); \ - HDassert( ((cache_ptr)->slist_len > 1) || \ - ( (cache_ptr)->slist_size == (old_size) ) ); \ - \ - (cache_ptr)->slist_size -= (old_size); \ - (cache_ptr)->slist_size += (new_size); \ - \ - HDassert( (new_size) <= (cache_ptr)->slist_size ); \ - HDassert( ( (cache_ptr)->slist_len > 1 ) || \ - ( (cache_ptr)->slist_size == (new_size) ) ); \ +{ \ + HDassert( (cache_ptr) ); \ + HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ + HDassert( (old_size) > 0 ); \ + HDassert( (new_size) > 0 ); \ + HDassert( (old_size) <= (cache_ptr)->slist_size ); \ + HDassert( (cache_ptr)->slist_len > 0 ); \ + HDassert( ((cache_ptr)->slist_len > 1) || \ + ( (cache_ptr)->slist_size == (old_size) ) ); \ + \ + (cache_ptr)->slist_size -= (old_size); \ + (cache_ptr)->slist_size += (new_size); \ + \ + HDassert( (new_size) <= (cache_ptr)->slist_size ); \ + HDassert( ( (cache_ptr)->slist_len > 1 ) || \ + ( (cache_ptr)->slist_size == (new_size) ) ); \ } /* H5C2__REMOVE_ENTRY_FROM_SLIST */ #endif /* H5C2_DO_SANITY_CHECKS */ @@ -2801,99 +2801,99 @@ if ( ( (cache_ptr) == NULL ) || \ #if H5C2_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS #define H5C2__FAKE_RP_FOR_MOST_RECENT_ACCESS(cache_ptr, entry_ptr, fail_val) \ -{ \ - HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ - HDassert( (entry_ptr) ); \ - HDassert( !((entry_ptr)->is_protected) ); \ - HDassert( !((entry_ptr)->is_read_only) ); \ - HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \ - HDassert( (entry_ptr)->size > 0 ); \ - HDassert( (entry_ptr)->last_trans == 0 ); \ - \ - if ( ! ((entry_ptr)->is_pinned) ) { \ - \ - /* modified LRU specific code */ \ - \ - /* remove the entry from the LRU list, and re-insert it at the head. \ - */ \ - \ +{ \ + HDassert( (cache_ptr) ); \ + HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ + HDassert( (entry_ptr) ); \ + HDassert( !((entry_ptr)->is_protected) ); \ + HDassert( !((entry_ptr)->is_read_only) ); \ + HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \ + HDassert( (entry_ptr)->size > 0 ); \ + HDassert( (entry_ptr)->last_trans == 0 ); \ + \ + if ( ! ((entry_ptr)->is_pinned) ) { \ + \ + /* modified LRU specific code */ \ + \ + /* remove the entry from the LRU list, and re-insert it at the head.\ + */ \ + \ H5C2__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ - (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ - (cache_ptr)->LRU_list_size, (fail_val)) \ - \ + (cache_ptr)->LRU_tail_ptr, \ + (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_size, (fail_val)) \ + \ H5C2__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ - (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ - (cache_ptr)->LRU_list_size, (fail_val)) \ - \ - /* Use the dirty flag to infer whether the entry is on the clean or \ - * dirty LRU list, and remove it. Then insert it at the head of \ - * the same LRU list. \ - * \ - * At least initially, all entries should be clean. That may \ - * change, so we may as well deal with both cases now. \ - */ \ - \ - if ( (entry_ptr)->is_dirty ) { \ + (cache_ptr)->LRU_tail_ptr, \ + (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_size, (fail_val)) \ + \ + /* Use the dirty flag to infer whether the entry is on the clean or \ + * dirty LRU list, and remove it. Then insert it at the head of \ + * the same LRU list. \ + * \ + * At least initially, all entries should be clean. That may \ + * change, so we may as well deal with both cases now. \ + */ \ + \ + if ( (entry_ptr)->is_dirty ) { \ H5C2__AUX_DLL_REMOVE((entry_ptr), (cache_ptr)->dLRU_head_ptr, \ - (cache_ptr)->dLRU_tail_ptr, \ - (cache_ptr)->dLRU_list_len, \ - (cache_ptr)->dLRU_list_size, (fail_val)) \ - \ + (cache_ptr)->dLRU_tail_ptr, \ + (cache_ptr)->dLRU_list_len, \ + (cache_ptr)->dLRU_list_size, (fail_val)) \ + \ H5C2__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->dLRU_head_ptr, \ - (cache_ptr)->dLRU_tail_ptr, \ - (cache_ptr)->dLRU_list_len, \ - (cache_ptr)->dLRU_list_size, (fail_val)) \ - } else { \ + (cache_ptr)->dLRU_tail_ptr, \ + (cache_ptr)->dLRU_list_len, \ + (cache_ptr)->dLRU_list_size, (fail_val)) \ + } else { \ H5C2__AUX_DLL_REMOVE((entry_ptr), (cache_ptr)->cLRU_head_ptr, \ - (cache_ptr)->cLRU_tail_ptr, \ - (cache_ptr)->cLRU_list_len, \ - (cache_ptr)->cLRU_list_size, (fail_val)) \ - \ + (cache_ptr)->cLRU_tail_ptr, \ + (cache_ptr)->cLRU_list_len, \ + (cache_ptr)->cLRU_list_size, (fail_val)) \ + \ H5C2__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->cLRU_head_ptr, \ - (cache_ptr)->cLRU_tail_ptr, \ - (cache_ptr)->cLRU_list_len, \ - (cache_ptr)->cLRU_list_size, (fail_val)) \ - } \ - \ - /* End modified LRU specific code. */ \ - } \ + (cache_ptr)->cLRU_tail_ptr, \ + (cache_ptr)->cLRU_list_len, \ + (cache_ptr)->cLRU_list_size, (fail_val)) \ + } \ + \ + /* End modified LRU specific code. */ \ + } \ } /* H5C2__FAKE_RP_FOR_MOST_RECENT_ACCESS */ #else /* H5C2_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ #define H5C2__FAKE_RP_FOR_MOST_RECENT_ACCESS(cache_ptr, entry_ptr, fail_val) \ -{ \ - HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ - HDassert( (entry_ptr) ); \ - HDassert( !((entry_ptr)->is_protected) ); \ - HDassert( !((entry_ptr)->is_read_only) ); \ - HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \ - HDassert( (entry_ptr)->size > 0 ); \ - HDassert( (entry_ptr)->last_trans == 0 ); \ - \ - if ( ! ((entry_ptr)->is_pinned) ) { \ - \ - /* modified LRU specific code */ \ - \ - /* remove the entry from the LRU list, and re-insert it at the head \ - */ \ - \ +{ \ + HDassert( (cache_ptr) ); \ + HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ + HDassert( (entry_ptr) ); \ + HDassert( !((entry_ptr)->is_protected) ); \ + HDassert( !((entry_ptr)->is_read_only) ); \ + HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \ + HDassert( (entry_ptr)->size > 0 ); \ + HDassert( (entry_ptr)->last_trans == 0 ); \ + \ + if ( ! ((entry_ptr)->is_pinned) ) { \ + \ + /* modified LRU specific code */ \ + \ + /* remove the entry from the LRU list, and re-insert it at the head \ + */ \ + \ H5C2__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ - (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ - (cache_ptr)->LRU_list_size, (fail_val)) \ - \ + (cache_ptr)->LRU_tail_ptr, \ + (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_size, (fail_val)) \ + \ H5C2__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ - (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ - (cache_ptr)->LRU_list_size, (fail_val)) \ - \ - /* End modified LRU specific code. */ \ - } \ + (cache_ptr)->LRU_tail_ptr, \ + (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_size, (fail_val)) \ + \ + /* End modified LRU specific code. */ \ + } \ } /* H5C2__FAKE_RP_FOR_MOST_RECENT_ACCESS */ #endif /* H5C2_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ @@ -2948,10 +2948,10 @@ if ( ( (cache_ptr) == NULL ) || \ #if H5C2_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS -#define H5C2__UPDATE_RP_FOR_EVICTION(cache_ptr, entry_ptr, fail_val) \ +#define H5C2__UPDATE_RP_FOR_EVICTION(cache_ptr, entry_ptr, fail_val) \ { \ HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ + HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ HDassert( (entry_ptr) ); \ HDassert( !((entry_ptr)->is_protected) ); \ HDassert( !((entry_ptr)->is_read_only) ); \ @@ -2964,7 +2964,7 @@ if ( ( (cache_ptr) == NULL ) || \ \ /* remove the entry from the LRU list. */ \ \ - H5C2__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ + H5C2__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ @@ -2976,12 +2976,12 @@ if ( ( (cache_ptr) == NULL ) || \ \ if ( (entry_ptr)->is_dirty ) { \ \ - H5C2__AUX_DLL_REMOVE((entry_ptr), (cache_ptr)->dLRU_head_ptr, \ + H5C2__AUX_DLL_REMOVE((entry_ptr), (cache_ptr)->dLRU_head_ptr, \ (cache_ptr)->dLRU_tail_ptr, \ (cache_ptr)->dLRU_list_len, \ (cache_ptr)->dLRU_list_size, (fail_val)) \ } else { \ - H5C2__AUX_DLL_REMOVE((entry_ptr), (cache_ptr)->cLRU_head_ptr, \ + H5C2__AUX_DLL_REMOVE((entry_ptr), (cache_ptr)->cLRU_head_ptr, \ (cache_ptr)->cLRU_tail_ptr, \ (cache_ptr)->cLRU_list_len, \ (cache_ptr)->cLRU_list_size, (fail_val)) \ @@ -2991,10 +2991,10 @@ if ( ( (cache_ptr) == NULL ) || \ #else /* H5C2_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ -#define H5C2__UPDATE_RP_FOR_EVICTION(cache_ptr, entry_ptr, fail_val) \ +#define H5C2__UPDATE_RP_FOR_EVICTION(cache_ptr, entry_ptr, fail_val) \ { \ HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ + HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ HDassert( (entry_ptr) ); \ HDassert( !((entry_ptr)->is_protected) ); \ HDassert( !((entry_ptr)->is_read_only) ); \ @@ -3007,7 +3007,7 @@ if ( ( (cache_ptr) == NULL ) || \ \ /* remove the entry from the LRU list. */ \ \ - H5C2__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ + H5C2__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ @@ -3067,10 +3067,10 @@ if ( ( (cache_ptr) == NULL ) || \ #if H5C2_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS -#define H5C2__UPDATE_RP_FOR_FLUSH(cache_ptr, entry_ptr, fail_val) \ +#define H5C2__UPDATE_RP_FOR_FLUSH(cache_ptr, entry_ptr, fail_val) \ { \ HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ + HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ HDassert( (entry_ptr) ); \ HDassert( !((entry_ptr)->is_protected) ); \ HDassert( !((entry_ptr)->is_read_only) ); \ @@ -3086,12 +3086,12 @@ if ( ( (cache_ptr) == NULL ) || \ * head. \ */ \ \ - H5C2__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ + H5C2__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ - H5C2__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ + H5C2__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ @@ -3108,18 +3108,18 @@ if ( ( (cache_ptr) == NULL ) || \ */ \ \ if ( (entry_ptr)->is_dirty ) { \ - H5C2__AUX_DLL_REMOVE((entry_ptr), (cache_ptr)->dLRU_head_ptr, \ + H5C2__AUX_DLL_REMOVE((entry_ptr), (cache_ptr)->dLRU_head_ptr, \ (cache_ptr)->dLRU_tail_ptr, \ (cache_ptr)->dLRU_list_len, \ (cache_ptr)->dLRU_list_size, (fail_val)) \ } else { \ - H5C2__AUX_DLL_REMOVE((entry_ptr), (cache_ptr)->cLRU_head_ptr, \ + H5C2__AUX_DLL_REMOVE((entry_ptr), (cache_ptr)->cLRU_head_ptr, \ (cache_ptr)->cLRU_tail_ptr, \ (cache_ptr)->cLRU_list_len, \ (cache_ptr)->cLRU_list_size, (fail_val)) \ } \ \ - H5C2__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->cLRU_head_ptr, \ + H5C2__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->cLRU_head_ptr, \ (cache_ptr)->cLRU_tail_ptr, \ (cache_ptr)->cLRU_list_len, \ (cache_ptr)->cLRU_list_size, (fail_val)) \ @@ -3130,10 +3130,10 @@ if ( ( (cache_ptr) == NULL ) || \ #else /* H5C2_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ -#define H5C2__UPDATE_RP_FOR_FLUSH(cache_ptr, entry_ptr, fail_val) \ +#define H5C2__UPDATE_RP_FOR_FLUSH(cache_ptr, entry_ptr, fail_val) \ { \ HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ + HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ HDassert( (entry_ptr) ); \ HDassert( !((entry_ptr)->is_protected) ); \ HDassert( !((entry_ptr)->is_read_only) ); \ @@ -3149,12 +3149,12 @@ if ( ( (cache_ptr) == NULL ) || \ * head. \ */ \ \ - H5C2__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ + H5C2__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ \ - H5C2__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ + H5C2__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ @@ -3226,10 +3226,10 @@ if ( ( (cache_ptr) == NULL ) || \ #if H5C2_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS -#define H5C2__UPDATE_RP_FOR_INSERTION(cache_ptr, entry_ptr, fail_val) \ +#define H5C2__UPDATE_RP_FOR_INSERTION(cache_ptr, entry_ptr, fail_val) \ { \ HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ + HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ HDassert( (entry_ptr) ); \ HDassert( !((entry_ptr)->is_protected) ); \ HDassert( !((entry_ptr)->is_read_only) ); \ @@ -3241,7 +3241,7 @@ if ( ( (cache_ptr) == NULL ) || \ \ if ( (entry_ptr)->is_pinned ) { \ \ - H5C2__DLL_PREPEND((entry_ptr), (cache_ptr)->pel_head_ptr, \ + H5C2__DLL_PREPEND((entry_ptr), (cache_ptr)->pel_head_ptr, \ (cache_ptr)->pel_tail_ptr, \ (cache_ptr)->pel_len, \ (cache_ptr)->pel_size, (fail_val)) \ @@ -3250,7 +3250,7 @@ if ( ( (cache_ptr) == NULL ) || \ \ HDassert( (cache_ptr)->mdj_enabled ); \ HDassert( (cache_ptr)->trans_in_progress ); \ - H5C2__DLL_PREPEND((entry_ptr), \ + H5C2__DLL_PREPEND((entry_ptr), \ ((cache_ptr)->jwipl_head_ptr), \ ((cache_ptr)->jwipl_tail_ptr), \ ((cache_ptr)->jwipl_len), \ @@ -3262,7 +3262,7 @@ if ( ( (cache_ptr) == NULL ) || \ \ /* insert the entry at the head of the LRU list. */ \ \ - H5C2__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ + H5C2__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ @@ -3272,12 +3272,12 @@ if ( ( (cache_ptr) == NULL ) || \ */ \ \ if ( entry_ptr->is_dirty ) { \ - H5C2__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->dLRU_head_ptr, \ + H5C2__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->dLRU_head_ptr, \ (cache_ptr)->dLRU_tail_ptr, \ (cache_ptr)->dLRU_list_len, \ (cache_ptr)->dLRU_list_size, (fail_val)) \ } else { \ - H5C2__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->cLRU_head_ptr, \ + H5C2__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->cLRU_head_ptr, \ (cache_ptr)->cLRU_tail_ptr, \ (cache_ptr)->cLRU_list_len, \ (cache_ptr)->cLRU_list_size, (fail_val)) \ @@ -3289,10 +3289,10 @@ if ( ( (cache_ptr) == NULL ) || \ #else /* H5C2_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ -#define H5C2__UPDATE_RP_FOR_INSERTION(cache_ptr, entry_ptr, fail_val) \ +#define H5C2__UPDATE_RP_FOR_INSERTION(cache_ptr, entry_ptr, fail_val) \ { \ HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ + HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ HDassert( (entry_ptr) ); \ HDassert( !((entry_ptr)->is_protected) ); \ HDassert( !((entry_ptr)->is_read_only) ); \ @@ -3304,7 +3304,7 @@ if ( ( (cache_ptr) == NULL ) || \ \ if ( (entry_ptr)->is_pinned ) { \ \ - H5C2__DLL_PREPEND((entry_ptr), (cache_ptr)->pel_head_ptr, \ + H5C2__DLL_PREPEND((entry_ptr), (cache_ptr)->pel_head_ptr, \ (cache_ptr)->pel_tail_ptr, \ (cache_ptr)->pel_len, \ (cache_ptr)->pel_size, (fail_val)) \ @@ -3313,7 +3313,7 @@ if ( ( (cache_ptr) == NULL ) || \ \ HDassert( (cache_ptr)->mdj_enabled ); \ HDassert( (cache_ptr)->trans_in_progress ); \ - H5C2__DLL_PREPEND((entry_ptr), \ + H5C2__DLL_PREPEND((entry_ptr), \ ((cache_ptr)->jwipl_head_ptr), \ ((cache_ptr)->jwipl_tail_ptr), \ ((cache_ptr)->jwipl_len), \ @@ -3325,7 +3325,7 @@ if ( ( (cache_ptr) == NULL ) || \ \ /* insert the entry at the head of the LRU list. */ \ \ - H5C2__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ + H5C2__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ @@ -3371,11 +3371,11 @@ if ( ( (cache_ptr) == NULL ) || \ #if H5C2_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS -#define H5C2__UPDATE_RP_FOR_JOURNAL_WRITE_COMPLETE(cache_ptr, entry_ptr, \ +#define H5C2__UPDATE_RP_FOR_JOURNAL_WRITE_COMPLETE(cache_ptr, entry_ptr, \ fail_val) \ { \ HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ + HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ HDassert( (cache_ptr)->mdj_enabled ); \ HDassert( (entry_ptr) ); \ HDassert( !((entry_ptr)->is_protected) ); \ @@ -3386,7 +3386,7 @@ if ( ( (cache_ptr) == NULL ) || \ HDassert( (entry_ptr)->is_dirty ); \ HDassert( (entry_ptr)->last_trans == 0 ); \ \ - H5C2__DLL_REMOVE((entry_ptr), \ + H5C2__DLL_REMOVE((entry_ptr), \ ((cache_ptr)->jwipl_head_ptr), \ ((cache_ptr)->jwipl_tail_ptr), \ ((cache_ptr)->jwipl_len), \ @@ -3397,7 +3397,7 @@ if ( ( (cache_ptr) == NULL ) || \ \ /* insert the entry at the head of the LRU list. */ \ \ - H5C2__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ + H5C2__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ @@ -3407,12 +3407,12 @@ if ( ( (cache_ptr) == NULL ) || \ */ \ \ if ( entry_ptr->is_dirty ) { \ - H5C2__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->dLRU_head_ptr, \ + H5C2__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->dLRU_head_ptr, \ (cache_ptr)->dLRU_tail_ptr, \ (cache_ptr)->dLRU_list_len, \ (cache_ptr)->dLRU_list_size, (fail_val)) \ } else { \ - H5C2__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->cLRU_head_ptr, \ + H5C2__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->cLRU_head_ptr, \ (cache_ptr)->cLRU_tail_ptr, \ (cache_ptr)->cLRU_list_len, \ (cache_ptr)->cLRU_list_size, (fail_val)) \ @@ -3424,11 +3424,11 @@ if ( ( (cache_ptr) == NULL ) || \ #else /* H5C2_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ -#define H5C2__UPDATE_RP_FOR_JOURNAL_WRITE_COMPLETE(cache_ptr, entry_ptr, \ +#define H5C2__UPDATE_RP_FOR_JOURNAL_WRITE_COMPLETE(cache_ptr, entry_ptr, \ fail_val) \ { \ HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ + HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ HDassert( (cache_ptr)->mdj_enabled ); \ HDassert( (entry_ptr) ); \ HDassert( !((entry_ptr)->is_protected) ); \ @@ -3439,7 +3439,7 @@ if ( ( (cache_ptr) == NULL ) || \ HDassert( (entry_ptr)->is_dirty ); \ HDassert( (entry_ptr)->last_trans == 0 ); \ \ - H5C2__DLL_REMOVE((entry_ptr), \ + H5C2__DLL_REMOVE((entry_ptr), \ ((cache_ptr)->jwipl_head_ptr), \ ((cache_ptr)->jwipl_tail_ptr), \ ((cache_ptr)->jwipl_len), \ @@ -3450,7 +3450,7 @@ if ( ( (cache_ptr) == NULL ) || \ \ /* insert the entry at the head of the LRU list. */ \ \ - H5C2__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ + H5C2__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ @@ -3497,10 +3497,10 @@ if ( ( (cache_ptr) == NULL ) || \ #if H5C2_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS -#define H5C2__UPDATE_RP_FOR_LOAD(cache_ptr, entry_ptr, fail_val) \ +#define H5C2__UPDATE_RP_FOR_LOAD(cache_ptr, entry_ptr, fail_val) \ { \ HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ + HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ HDassert( (entry_ptr) ); \ HDassert( !((entry_ptr)->is_protected) ); \ HDassert( !((entry_ptr)->is_pinned) ); \ @@ -3513,7 +3513,7 @@ if ( ( (cache_ptr) == NULL ) || \ \ /* insert the entry at the head of the LRU list. */ \ \ - H5C2__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ + H5C2__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ @@ -3523,12 +3523,12 @@ if ( ( (cache_ptr) == NULL ) || \ */ \ \ if ( entry_ptr->is_dirty ) { \ - H5C2__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->dLRU_head_ptr, \ + H5C2__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->dLRU_head_ptr, \ (cache_ptr)->dLRU_tail_ptr, \ (cache_ptr)->dLRU_list_len, \ (cache_ptr)->dLRU_list_size, (fail_val)) \ } else { \ - H5C2__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->cLRU_head_ptr, \ + H5C2__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->cLRU_head_ptr, \ (cache_ptr)->cLRU_tail_ptr, \ (cache_ptr)->cLRU_list_len, \ (cache_ptr)->cLRU_list_size, (fail_val)) \ @@ -3539,10 +3539,10 @@ if ( ( (cache_ptr) == NULL ) || \ #else /* H5C2_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ -#define H5C2__UPDATE_RP_FOR_LOAD(cache_ptr, entry_ptr, fail_val) \ +#define H5C2__UPDATE_RP_FOR_LOAD(cache_ptr, entry_ptr, fail_val) \ { \ HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ + HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ HDassert( (entry_ptr) ); \ HDassert( !((entry_ptr)->is_protected) ); \ HDassert( !((entry_ptr)->is_pinned) ); \ @@ -3555,7 +3555,7 @@ if ( ( (cache_ptr) == NULL ) || \ \ /* insert the entry at the head of the LRU list. */ \ \ - H5C2__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ + H5C2__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ @@ -3620,10 +3620,10 @@ if ( ( (cache_ptr) == NULL ) || \ #if H5C2_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS -#define H5C2__UPDATE_RP_FOR_PROTECT(cache_ptr, entry_ptr, fail_val) \ +#define H5C2__UPDATE_RP_FOR_PROTECT(cache_ptr, entry_ptr, fail_val) \ { \ HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ + HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ HDassert( (entry_ptr) ); \ HDassert( !((entry_ptr)->is_protected) ); \ HDassert( !((entry_ptr)->is_read_only) ); \ @@ -3632,7 +3632,7 @@ if ( ( (cache_ptr) == NULL ) || \ \ if ( (entry_ptr)->is_pinned ) { \ \ - H5C2__DLL_REMOVE((entry_ptr), (cache_ptr)->pel_head_ptr, \ + H5C2__DLL_REMOVE((entry_ptr), (cache_ptr)->pel_head_ptr, \ (cache_ptr)->pel_tail_ptr, \ (cache_ptr)->pel_len, \ (cache_ptr)->pel_size, (fail_val)) \ @@ -3641,7 +3641,7 @@ if ( ( (cache_ptr) == NULL ) || \ \ HDassert( (cache_ptr)->mdj_enabled ); \ HDassert( (entry_ptr)->is_dirty ); \ - H5C2__DLL_REMOVE((entry_ptr), \ + H5C2__DLL_REMOVE((entry_ptr), \ ((cache_ptr)->jwipl_head_ptr), \ ((cache_ptr)->jwipl_tail_ptr), \ ((cache_ptr)->jwipl_len), \ @@ -3654,7 +3654,7 @@ if ( ( (cache_ptr) == NULL ) || \ \ /* remove the entry from the LRU list. */ \ \ - H5C2__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ + H5C2__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ @@ -3665,14 +3665,14 @@ if ( ( (cache_ptr) == NULL ) || \ \ if ( (entry_ptr)->is_dirty ) { \ \ - H5C2__AUX_DLL_REMOVE((entry_ptr), (cache_ptr)->dLRU_head_ptr, \ + H5C2__AUX_DLL_REMOVE((entry_ptr), (cache_ptr)->dLRU_head_ptr, \ (cache_ptr)->dLRU_tail_ptr, \ (cache_ptr)->dLRU_list_len, \ (cache_ptr)->dLRU_list_size, (fail_val)) \ \ } else { \ \ - H5C2__AUX_DLL_REMOVE((entry_ptr), (cache_ptr)->cLRU_head_ptr, \ + H5C2__AUX_DLL_REMOVE((entry_ptr), (cache_ptr)->cLRU_head_ptr, \ (cache_ptr)->cLRU_tail_ptr, \ (cache_ptr)->cLRU_list_len, \ (cache_ptr)->cLRU_list_size, (fail_val)) \ @@ -3685,7 +3685,7 @@ if ( ( (cache_ptr) == NULL ) || \ * pinned, now add the entry to the protected list. \ */ \ \ - H5C2__DLL_APPEND((entry_ptr), (cache_ptr)->pl_head_ptr, \ + H5C2__DLL_APPEND((entry_ptr), (cache_ptr)->pl_head_ptr, \ (cache_ptr)->pl_tail_ptr, \ (cache_ptr)->pl_len, \ (cache_ptr)->pl_size, (fail_val)) \ @@ -3693,10 +3693,10 @@ if ( ( (cache_ptr) == NULL ) || \ #else /* H5C2_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ -#define H5C2__UPDATE_RP_FOR_PROTECT(cache_ptr, entry_ptr, fail_val) \ +#define H5C2__UPDATE_RP_FOR_PROTECT(cache_ptr, entry_ptr, fail_val) \ { \ HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ + HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ HDassert( (entry_ptr) ); \ HDassert( !((entry_ptr)->is_protected) ); \ HDassert( !((entry_ptr)->is_read_only) ); \ @@ -3705,7 +3705,7 @@ if ( ( (cache_ptr) == NULL ) || \ \ if ( (entry_ptr)->is_pinned ) { \ \ - H5C2__DLL_REMOVE((entry_ptr), (cache_ptr)->pel_head_ptr, \ + H5C2__DLL_REMOVE((entry_ptr), (cache_ptr)->pel_head_ptr, \ (cache_ptr)->pel_tail_ptr, \ (cache_ptr)->pel_len, \ (cache_ptr)->pel_size, (fail_val)) \ @@ -3714,7 +3714,7 @@ if ( ( (cache_ptr) == NULL ) || \ \ HDassert( (cache_ptr)->mdj_enabled ); \ HDassert( (entry_ptr)->is_dirty ); \ - H5C2__DLL_REMOVE((entry_ptr), \ + H5C2__DLL_REMOVE((entry_ptr), \ ((cache_ptr)->jwipl_head_ptr), \ ((cache_ptr)->jwipl_tail_ptr), \ ((cache_ptr)->jwipl_len), \ @@ -3727,7 +3727,7 @@ if ( ( (cache_ptr) == NULL ) || \ \ /* remove the entry from the LRU list. */ \ \ - H5C2__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ + H5C2__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ @@ -3739,10 +3739,10 @@ if ( ( (cache_ptr) == NULL ) || \ * pinned, now add the entry to the protected list. \ */ \ \ - H5C2__DLL_APPEND((entry_ptr), (cache_ptr)->pl_head_ptr, \ - (cache_ptr)->pl_tail_ptr, \ - (cache_ptr)->pl_len, \ - (cache_ptr)->pl_size, (fail_val)) \ + H5C2__DLL_APPEND((entry_ptr), (cache_ptr)->pl_head_ptr, \ + (cache_ptr)->pl_tail_ptr, \ + (cache_ptr)->pl_len, \ + (cache_ptr)->pl_size, (fail_val)) \ } /* H5C2__UPDATE_RP_FOR_PROTECT */ #endif /* H5C2_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ @@ -3812,11 +3812,11 @@ if ( ( (cache_ptr) == NULL ) || \ #if H5C2_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS -#define H5C2__UPDATE_RP_FOR_RENAME(cache_ptr, entry_ptr, was_dirty, \ +#define H5C2__UPDATE_RP_FOR_RENAME(cache_ptr, entry_ptr, was_dirty, \ had_jwip, fail_val) \ { \ HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ + HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ HDassert( (entry_ptr) ); \ HDassert( !((entry_ptr)->is_protected) ); \ HDassert( !((entry_ptr)->is_read_only) ); \ @@ -3837,7 +3837,7 @@ if ( ( (cache_ptr) == NULL ) || \ HDassert( (entry_ptr)->last_trans != 0 ); \ HDassert( was_dirty ); \ HDassert( (entry_ptr)->is_dirty ); \ - H5C2__DLL_REMOVE((entry_ptr), \ + H5C2__DLL_REMOVE((entry_ptr), \ ((cache_ptr)->jwipl_head_ptr), \ ((cache_ptr)->jwipl_tail_ptr), \ ((cache_ptr)->jwipl_len), \ @@ -3850,7 +3850,7 @@ if ( ( (cache_ptr) == NULL ) || \ \ /* remove the entry from the LRU list */ \ \ - H5C2__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ + H5C2__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ @@ -3860,7 +3860,7 @@ if ( ( (cache_ptr) == NULL ) || \ */ \ if ( was_dirty ) { \ \ - H5C2__AUX_DLL_REMOVE((entry_ptr), \ + H5C2__AUX_DLL_REMOVE((entry_ptr), \ (cache_ptr)->dLRU_head_ptr, \ (cache_ptr)->dLRU_tail_ptr, \ (cache_ptr)->dLRU_list_len, \ @@ -3869,7 +3869,7 @@ if ( ( (cache_ptr) == NULL ) || \ \ } else { \ \ - H5C2__AUX_DLL_REMOVE((entry_ptr), \ + H5C2__AUX_DLL_REMOVE((entry_ptr), \ (cache_ptr)->cLRU_head_ptr, \ (cache_ptr)->cLRU_tail_ptr, \ (cache_ptr)->cLRU_list_len, \ @@ -3886,7 +3886,7 @@ if ( ( (cache_ptr) == NULL ) || \ HDassert( (cache_ptr)->mdj_enabled ); \ HDassert( (cache_ptr)->trans_in_progress ); \ HDassert( (entry_ptr)->is_dirty ); \ - H5C2__DLL_PREPEND((entry_ptr), \ + H5C2__DLL_PREPEND((entry_ptr), \ ((cache_ptr)->jwipl_head_ptr), \ ((cache_ptr)->jwipl_tail_ptr), \ ((cache_ptr)->jwipl_len), \ @@ -3896,7 +3896,7 @@ if ( ( (cache_ptr) == NULL ) || \ \ /* begin modified LRU specific code */ \ \ - H5C2__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ + H5C2__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ @@ -3907,7 +3907,7 @@ if ( ( (cache_ptr) == NULL ) || \ \ if ( (entry_ptr)->is_dirty ) { \ \ - H5C2__AUX_DLL_PREPEND((entry_ptr), \ + H5C2__AUX_DLL_PREPEND((entry_ptr), \ (cache_ptr)->dLRU_head_ptr, \ (cache_ptr)->dLRU_tail_ptr, \ (cache_ptr)->dLRU_list_len, \ @@ -3916,7 +3916,7 @@ if ( ( (cache_ptr) == NULL ) || \ \ } else { \ \ - H5C2__AUX_DLL_PREPEND((entry_ptr), \ + H5C2__AUX_DLL_PREPEND((entry_ptr), \ (cache_ptr)->cLRU_head_ptr, \ (cache_ptr)->cLRU_tail_ptr, \ (cache_ptr)->cLRU_list_len, \ @@ -3931,11 +3931,11 @@ if ( ( (cache_ptr) == NULL ) || \ #else /* H5C2_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ -#define H5C2__UPDATE_RP_FOR_RENAME(cache_ptr, entry_ptr, was_dirty, \ +#define H5C2__UPDATE_RP_FOR_RENAME(cache_ptr, entry_ptr, was_dirty, \ had_jwip, fail_val) \ { \ HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ + HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ HDassert( (entry_ptr) ); \ HDassert( !((entry_ptr)->is_protected) ); \ HDassert( !((entry_ptr)->is_read_only) ); \ @@ -3956,7 +3956,7 @@ if ( ( (cache_ptr) == NULL ) || \ HDassert( (entry_ptr)->last_trans != 0 ); \ HDassert( was_dirty ); \ HDassert( (entry_ptr)->is_dirty ); \ - H5C2__DLL_REMOVE((entry_ptr), \ + H5C2__DLL_REMOVE((entry_ptr), \ ((cache_ptr)->jwipl_head_ptr), \ ((cache_ptr)->jwipl_tail_ptr), \ ((cache_ptr)->jwipl_len), \ @@ -3969,7 +3969,7 @@ if ( ( (cache_ptr) == NULL ) || \ \ /* remove the entry from the LRU list */ \ \ - H5C2__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ + H5C2__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ @@ -3984,7 +3984,7 @@ if ( ( (cache_ptr) == NULL ) || \ HDassert( (cache_ptr)->mdj_enabled ); \ HDassert( (cache_ptr)->trans_in_progress ); \ HDassert( (entry_ptr)->is_dirty ); \ - H5C2__DLL_PREPEND((entry_ptr), \ + H5C2__DLL_PREPEND((entry_ptr), \ ((cache_ptr)->jwipl_head_ptr), \ ((cache_ptr)->jwipl_tail_ptr), \ ((cache_ptr)->jwipl_len), \ @@ -3994,7 +3994,7 @@ if ( ( (cache_ptr) == NULL ) || \ \ /* begin modified LRU specific code */ \ \ - H5C2__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ + H5C2__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ @@ -4048,10 +4048,10 @@ if ( ( (cache_ptr) == NULL ) || \ #if H5C2_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS -#define H5C2__UPDATE_RP_FOR_SIZE_CHANGE(cache_ptr, entry_ptr, new_size) \ +#define H5C2__UPDATE_RP_FOR_SIZE_CHANGE(cache_ptr, entry_ptr, new_size) \ { \ HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ + HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ HDassert( (entry_ptr) ); \ HDassert( !((entry_ptr)->is_protected) ); \ HDassert( !((entry_ptr)->is_read_only) ); \ @@ -4061,7 +4061,7 @@ if ( ( (cache_ptr) == NULL ) || \ \ if ( (entry_ptr)->is_pinned ) { \ \ - H5C2__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->pel_len, \ + H5C2__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->pel_len, \ (cache_ptr)->pel_size, \ (entry_ptr)->size, \ (new_size)); \ @@ -4070,7 +4070,7 @@ if ( ( (cache_ptr) == NULL ) || \ \ HDassert( (cache_ptr)->mdj_enabled ); \ HDassert( (entry_ptr)->is_dirty ); \ - H5C2__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->jwipl_len, \ + H5C2__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->jwipl_len, \ (cache_ptr)->jwipl_size, \ (entry_ptr)->size, \ (new_size)); \ @@ -4081,7 +4081,7 @@ if ( ( (cache_ptr) == NULL ) || \ \ /* Update the size of the LRU list */ \ \ - H5C2__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->LRU_list_len, \ + H5C2__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, \ (entry_ptr)->size, \ (new_size)); \ @@ -4093,14 +4093,14 @@ if ( ( (cache_ptr) == NULL ) || \ \ if ( (entry_ptr)->is_dirty ) { \ \ - H5C2__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->dLRU_list_len, \ + H5C2__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->dLRU_list_len, \ (cache_ptr)->dLRU_list_size, \ (entry_ptr)->size, \ (new_size)); \ \ } else { \ \ - H5C2__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->cLRU_list_len, \ + H5C2__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->cLRU_list_len, \ (cache_ptr)->cLRU_list_size, \ (entry_ptr)->size, \ (new_size)); \ @@ -4113,10 +4113,10 @@ if ( ( (cache_ptr) == NULL ) || \ #else /* H5C2_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ -#define H5C2__UPDATE_RP_FOR_SIZE_CHANGE(cache_ptr, entry_ptr, new_size) \ +#define H5C2__UPDATE_RP_FOR_SIZE_CHANGE(cache_ptr, entry_ptr, new_size) \ { \ HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ + HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ HDassert( (entry_ptr) ); \ HDassert( !((entry_ptr)->is_protected) ); \ HDassert( !((entry_ptr)->is_read_only) ); \ @@ -4126,7 +4126,7 @@ if ( ( (cache_ptr) == NULL ) || \ \ if ( (entry_ptr)->is_pinned ) { \ \ - H5C2__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->pel_len, \ + H5C2__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->pel_len, \ (cache_ptr)->pel_size, \ (entry_ptr)->size, \ (new_size)); \ @@ -4135,7 +4135,7 @@ if ( ( (cache_ptr) == NULL ) || \ \ HDassert( (cache_ptr)->mdj_enabled ); \ HDassert( (entry_ptr)->is_dirty ); \ - H5C2__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->jwipl_len, \ + H5C2__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->jwipl_len, \ (cache_ptr)->jwipl_size, \ (entry_ptr)->size, \ (new_size)); \ @@ -4146,7 +4146,7 @@ if ( ( (cache_ptr) == NULL ) || \ \ /* Update the size of the LRU list */ \ \ - H5C2__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->LRU_list_len, \ + H5C2__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, \ (entry_ptr)->size, \ (new_size)); \ @@ -4194,10 +4194,10 @@ if ( ( (cache_ptr) == NULL ) || \ #if H5C2_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS -#define H5C2__UPDATE_RP_FOR_UNPIN(cache_ptr, entry_ptr, fail_val) \ +#define H5C2__UPDATE_RP_FOR_UNPIN(cache_ptr, entry_ptr, fail_val) \ { \ HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ + HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ HDassert( (entry_ptr) ); \ HDassert( !((entry_ptr)->is_protected) ); \ HDassert( !((entry_ptr)->is_read_only) ); \ @@ -4208,7 +4208,7 @@ if ( ( (cache_ptr) == NULL ) || \ /* Regardless of the replacement policy, remove the entry from the \ * pinned entry list. \ */ \ - H5C2__DLL_REMOVE((entry_ptr), (cache_ptr)->pel_head_ptr, \ + H5C2__DLL_REMOVE((entry_ptr), (cache_ptr)->pel_head_ptr, \ (cache_ptr)->pel_tail_ptr, (cache_ptr)->pel_len, \ (cache_ptr)->pel_size, (fail_val)) \ \ @@ -4217,7 +4217,7 @@ if ( ( (cache_ptr) == NULL ) || \ /* put the entry in the jwip list */ \ HDassert( (cache_ptr)->mdj_enabled ); \ HDassert( (entry_ptr)->is_dirty ); \ - H5C2__DLL_PREPEND((entry_ptr), \ + H5C2__DLL_PREPEND((entry_ptr), \ ((cache_ptr)->jwipl_head_ptr), \ ((cache_ptr)->jwipl_tail_ptr), \ ((cache_ptr)->jwipl_len), \ @@ -4229,7 +4229,7 @@ if ( ( (cache_ptr) == NULL ) || \ \ /* insert the entry at the head of the LRU list. */ \ \ - H5C2__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ + H5C2__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ @@ -4240,7 +4240,7 @@ if ( ( (cache_ptr) == NULL ) || \ \ if ( (entry_ptr)->is_dirty ) { \ \ - H5C2__AUX_DLL_PREPEND((entry_ptr), \ + H5C2__AUX_DLL_PREPEND((entry_ptr), \ (cache_ptr)->dLRU_head_ptr, \ (cache_ptr)->dLRU_tail_ptr, \ (cache_ptr)->dLRU_list_len, \ @@ -4249,7 +4249,7 @@ if ( ( (cache_ptr) == NULL ) || \ \ } else { \ \ - H5C2__AUX_DLL_PREPEND((entry_ptr), \ + H5C2__AUX_DLL_PREPEND((entry_ptr), \ (cache_ptr)->cLRU_head_ptr, \ (cache_ptr)->cLRU_tail_ptr, \ (cache_ptr)->cLRU_list_len, \ @@ -4264,10 +4264,10 @@ if ( ( (cache_ptr) == NULL ) || \ #else /* H5C2_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ -#define H5C2__UPDATE_RP_FOR_UNPIN(cache_ptr, entry_ptr, fail_val) \ +#define H5C2__UPDATE_RP_FOR_UNPIN(cache_ptr, entry_ptr, fail_val) \ { \ HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ + HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ HDassert( (entry_ptr) ); \ HDassert( !((entry_ptr)->is_protected) ); \ HDassert( !((entry_ptr)->is_read_only) ); \ @@ -4278,7 +4278,7 @@ if ( ( (cache_ptr) == NULL ) || \ /* Regardless of the replacement policy, remove the entry from the \ * pinned entry list. \ */ \ - H5C2__DLL_REMOVE((entry_ptr), (cache_ptr)->pel_head_ptr, \ + H5C2__DLL_REMOVE((entry_ptr), (cache_ptr)->pel_head_ptr, \ (cache_ptr)->pel_tail_ptr, (cache_ptr)->pel_len, \ (cache_ptr)->pel_size, (fail_val)) \ \ @@ -4287,7 +4287,7 @@ if ( ( (cache_ptr) == NULL ) || \ /* put the entry in the jwip list */ \ HDassert( (cache_ptr)->mdj_enabled ); \ HDassert( (entry_ptr)->is_dirty ); \ - H5C2__DLL_PREPEND((entry_ptr), \ + H5C2__DLL_PREPEND((entry_ptr), \ ((cache_ptr)->jwipl_head_ptr), \ ((cache_ptr)->jwipl_tail_ptr), \ ((cache_ptr)->jwipl_len), \ @@ -4299,7 +4299,7 @@ if ( ( (cache_ptr) == NULL ) || \ \ /* insert the entry at the head of the LRU list. */ \ \ - H5C2__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ + H5C2__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ (cache_ptr)->LRU_tail_ptr, \ (cache_ptr)->LRU_list_len, \ (cache_ptr)->LRU_list_size, (fail_val)) \ @@ -4362,10 +4362,10 @@ if ( ( (cache_ptr) == NULL ) || \ #if H5C2_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS -#define H5C2__UPDATE_RP_FOR_UNPROTECT(cache_ptr, entry_ptr, fail_val) \ +#define H5C2__UPDATE_RP_FOR_UNPROTECT(cache_ptr, entry_ptr, fail_val) \ { \ HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ + HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ HDassert( (entry_ptr) ); \ HDassert( (entry_ptr)->is_protected); \ HDassert( (entry_ptr)->size > 0 ); \ @@ -4373,23 +4373,23 @@ if ( ( (cache_ptr) == NULL ) || \ /* Regardless of the replacement policy, remove the entry from the \ * protected list. \ */ \ - H5C2__DLL_REMOVE((entry_ptr), (cache_ptr)->pl_head_ptr, \ + H5C2__DLL_REMOVE((entry_ptr), (cache_ptr)->pl_head_ptr, \ (cache_ptr)->pl_tail_ptr, (cache_ptr)->pl_len, \ (cache_ptr)->pl_size, (fail_val)) \ \ if ( (entry_ptr)->is_pinned ) { \ \ - H5C2__DLL_PREPEND((entry_ptr), (cache_ptr)->pel_head_ptr, \ - (cache_ptr)->pel_tail_ptr, \ - (cache_ptr)->pel_len, \ - (cache_ptr)->pel_size, (fail_val)) \ + H5C2__DLL_PREPEND((entry_ptr), (cache_ptr)->pel_head_ptr, \ + (cache_ptr)->pel_tail_ptr, \ + (cache_ptr)->pel_len, \ + (cache_ptr)->pel_size, (fail_val)) \ \ } else if ( (entry_ptr)->last_trans != 0 ) { \ \ /* put the entry in the jwip list */ \ HDassert( (cache_ptr)->mdj_enabled ); \ HDassert( (entry_ptr)->is_dirty ); \ - H5C2__DLL_PREPEND((entry_ptr), \ + H5C2__DLL_PREPEND((entry_ptr), \ ((cache_ptr)->jwipl_head_ptr), \ ((cache_ptr)->jwipl_tail_ptr), \ ((cache_ptr)->jwipl_len), \ @@ -4401,10 +4401,10 @@ if ( ( (cache_ptr) == NULL ) || \ \ /* insert the entry at the head of the LRU list. */ \ \ - H5C2__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ - (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ - (cache_ptr)->LRU_list_size, (fail_val)) \ + H5C2__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ + (cache_ptr)->LRU_tail_ptr, \ + (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_size, (fail_val)) \ \ /* Similarly, insert the entry at the head of either the clean or \ * dirty LRU list as appropriate. \ @@ -4412,17 +4412,17 @@ if ( ( (cache_ptr) == NULL ) || \ \ if ( (entry_ptr)->is_dirty ) { \ \ - H5C2__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->dLRU_head_ptr, \ - (cache_ptr)->dLRU_tail_ptr, \ - (cache_ptr)->dLRU_list_len, \ - (cache_ptr)->dLRU_list_size, (fail_val)) \ + H5C2__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->dLRU_head_ptr, \ + (cache_ptr)->dLRU_tail_ptr, \ + (cache_ptr)->dLRU_list_len, \ + (cache_ptr)->dLRU_list_size, (fail_val)) \ \ } else { \ \ - H5C2__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->cLRU_head_ptr, \ - (cache_ptr)->cLRU_tail_ptr, \ - (cache_ptr)->cLRU_list_len, \ - (cache_ptr)->cLRU_list_size, (fail_val)) \ + H5C2__AUX_DLL_PREPEND((entry_ptr), (cache_ptr)->cLRU_head_ptr, \ + (cache_ptr)->cLRU_tail_ptr, \ + (cache_ptr)->cLRU_list_len, \ + (cache_ptr)->cLRU_list_size, (fail_val)) \ } \ \ /* End modified LRU specific code. */ \ @@ -4432,10 +4432,10 @@ if ( ( (cache_ptr) == NULL ) || \ #else /* H5C2_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ -#define H5C2__UPDATE_RP_FOR_UNPROTECT(cache_ptr, entry_ptr, fail_val) \ +#define H5C2__UPDATE_RP_FOR_UNPROTECT(cache_ptr, entry_ptr, fail_val) \ { \ HDassert( (cache_ptr) ); \ - HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ + HDassert( (cache_ptr)->magic == H5C2__H5C2_T_MAGIC ); \ HDassert( (entry_ptr) ); \ HDassert( (entry_ptr)->is_protected); \ HDassert( (entry_ptr)->size > 0 ); \ @@ -4443,13 +4443,13 @@ if ( ( (cache_ptr) == NULL ) || \ /* Regardless of the replacement policy, remove the entry from the \ * protected list. \ */ \ - H5C2__DLL_REMOVE((entry_ptr), (cache_ptr)->pl_head_ptr, \ + H5C2__DLL_REMOVE((entry_ptr), (cache_ptr)->pl_head_ptr, \ (cache_ptr)->pl_tail_ptr, (cache_ptr)->pl_len, \ (cache_ptr)->pl_size, (fail_val)) \ \ if ( (entry_ptr)->is_pinned ) { \ \ - H5C2__DLL_PREPEND((entry_ptr), (cache_ptr)->pel_head_ptr, \ + H5C2__DLL_PREPEND((entry_ptr), (cache_ptr)->pel_head_ptr, \ (cache_ptr)->pel_tail_ptr, \ (cache_ptr)->pel_len, \ (cache_ptr)->pel_size, (fail_val)) \ @@ -4459,7 +4459,7 @@ if ( ( (cache_ptr) == NULL ) || \ /* put the entry in the jwip list */ \ HDassert( (cache_ptr)->mdj_enabled ); \ HDassert( (entry_ptr)->is_dirty ); \ - H5C2__DLL_PREPEND((entry_ptr), \ + H5C2__DLL_PREPEND((entry_ptr), \ ((cache_ptr)->jwipl_head_ptr), \ ((cache_ptr)->jwipl_tail_ptr), \ ((cache_ptr)->jwipl_len), \ @@ -4471,10 +4471,10 @@ if ( ( (cache_ptr) == NULL ) || \ \ /* insert the entry at the head of the LRU list. */ \ \ - H5C2__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ - (cache_ptr)->LRU_tail_ptr, \ - (cache_ptr)->LRU_list_len, \ - (cache_ptr)->LRU_list_size, (fail_val)) \ + H5C2__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \ + (cache_ptr)->LRU_tail_ptr, \ + (cache_ptr)->LRU_list_len, \ + (cache_ptr)->LRU_list_size, (fail_val)) \ \ /* End modified LRU specific code. */ \ } \ diff --git a/test/cache2.c b/test/cache2.c index 4865ce8..f9fde85 100644 --- a/test/cache2.c +++ b/test/cache2.c @@ -209,61 +209,61 @@ smoke_check_1(void) fcn_name, mile_stone++, (int)pass2); row_major_scan_forward2(/* file_ptr */ file_ptr, - /* max_index */ max_index, - /* lag */ lag, - /* verbose */ FALSE, - /* reset_stats */ TRUE, - /* display_stats */ display_stats, - /* display_detailed_stats */ FALSE, - /* do_inserts */ TRUE, - /* dirty_inserts */ dirty_inserts, - /* do_renames */ TRUE, - /* rename_to_main_addr */ FALSE, - /* do_destroys */ TRUE, - /* do_mult_ro_protects */ TRUE, - /* dirty_destroys */ dirty_destroys, - /* dirty_unprotects */ dirty_unprotects); + /* max_index */ max_index, + /* lag */ lag, + /* verbose */ FALSE, + /* reset_stats */ TRUE, + /* display_stats */ display_stats, + /* display_detailed_stats */ FALSE, + /* do_inserts */ TRUE, + /* dirty_inserts */ dirty_inserts, + /* do_renames */ TRUE, + /* rename_to_main_addr */ FALSE, + /* do_destroys */ TRUE, + /* do_mult_ro_protects */ TRUE, + /* dirty_destroys */ dirty_destroys, + /* dirty_unprotects */ dirty_unprotects); if ( show_progress ) /* 4 */ HDfprintf(stdout, "%s() - %0d -- pass2 = %d\n", fcn_name, mile_stone++, (int)pass2); row_major_scan_backward2(/* file_ptr */ file_ptr, - /* max_index */ max_index, - /* lag */ lag, - /* verbose */ FALSE, - /* reset_stats */ TRUE, - /* display_stats */ display_stats, - /* display_detailed_stats */ FALSE, - /* do_inserts */ FALSE, - /* dirty_inserts */ dirty_inserts, - /* do_renames */ TRUE, - /* rename_to_main_addr */ TRUE, - /* do_destroys */ FALSE, - /* do_mult_ro_protects */ TRUE, - /* dirty_destroys */ dirty_destroys, - /* dirty_unprotects */ dirty_unprotects); - - if ( show_progress ) /* 5 */ - HDfprintf(stdout, "%s() - %0d -- pass2 = %d\n", - fcn_name, mile_stone++, (int)pass2); - - row_major_scan_forward2(/* file_ptr */ file_ptr, - /* max_index */ max_index, + /* max_index */ max_index, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, /* display_stats */ display_stats, /* display_detailed_stats */ FALSE, - /* do_inserts */ TRUE, + /* do_inserts */ FALSE, /* dirty_inserts */ dirty_inserts, /* do_renames */ TRUE, - /* rename_to_main_addr */ FALSE, + /* rename_to_main_addr */ TRUE, /* do_destroys */ FALSE, /* do_mult_ro_protects */ TRUE, /* dirty_destroys */ dirty_destroys, /* dirty_unprotects */ dirty_unprotects); + if ( show_progress ) /* 5 */ + HDfprintf(stdout, "%s() - %0d -- pass2 = %d\n", + fcn_name, mile_stone++, (int)pass2); + + row_major_scan_forward2(/* file_ptr */ file_ptr, + /* max_index */ max_index, + /* lag */ lag, + /* verbose */ FALSE, + /* reset_stats */ TRUE, + /* display_stats */ display_stats, + /* display_detailed_stats */ FALSE, + /* do_inserts */ TRUE, + /* dirty_inserts */ dirty_inserts, + /* do_renames */ TRUE, + /* rename_to_main_addr */ FALSE, + /* do_destroys */ FALSE, + /* do_mult_ro_protects */ TRUE, + /* dirty_destroys */ dirty_destroys, + /* dirty_unprotects */ dirty_unprotects); + if ( show_progress ) /* 6 */ HDfprintf(stdout, "%s() - %0d -- pass2 = %d\n", fcn_name, mile_stone++, (int)pass2); @@ -271,24 +271,24 @@ smoke_check_1(void) /* flush and destroy all entries in the cache: */ flush_cache2(/* file_ptr */ file_ptr, - /* destroy_entries */ TRUE, - /* dump_stats */ FALSE, - /* dump_detailed_stats */ FALSE); + /* destroy_entries */ TRUE, + /* dump_stats */ FALSE, + /* dump_detailed_stats */ FALSE); if ( show_progress ) /* 7 */ HDfprintf(stdout, "%s() - %0d -- pass2 = %d\n", fcn_name, mile_stone++, (int)pass2); col_major_scan_forward2(/* file_ptr */ file_ptr, - /* max_index */ max_index, - /* lag */ lag, - /* verbose */ FALSE, - /* reset_stats */ TRUE, - /* display_stats */ display_stats, - /* display_detailed_stats */ TRUE, - /* do_inserts */ TRUE, - /* dirty_inserts */ dirty_inserts, - /* dirty_unprotects */ dirty_unprotects); + /* max_index */ max_index, + /* lag */ lag, + /* verbose */ FALSE, + /* reset_stats */ TRUE, + /* display_stats */ display_stats, + /* display_detailed_stats */ TRUE, + /* do_inserts */ TRUE, + /* dirty_inserts */ dirty_inserts, + /* dirty_unprotects */ dirty_unprotects); if ( show_progress ) /* 8 */ HDfprintf(stdout, "%s() - %0d -- pass2 = %d\n", @@ -297,24 +297,24 @@ smoke_check_1(void) /* flush all entries in the cache: */ flush_cache2(/* file_ptr */ file_ptr, - /* destroy_entries */ FALSE, - /* dump_stats */ FALSE, - /* dump_detailed_stats */ FALSE); + /* destroy_entries */ FALSE, + /* dump_stats */ FALSE, + /* dump_detailed_stats */ FALSE); if ( show_progress ) /* 9 */ HDfprintf(stdout, "%s() - %0d -- pass2 = %d\n", fcn_name, mile_stone++, (int)pass2); col_major_scan_backward2(/* file_ptr */ file_ptr, - /* max_index */ max_index, - /* lag */ lag, - /* verbose */ FALSE, - /* reset_stats */ TRUE, - /* display_stats */ display_stats, - /* display_detailed_stats */ TRUE, - /* do_inserts */ TRUE, - /* dirty_inserts */ dirty_inserts, - /* dirty_unprotects */ dirty_unprotects); + /* max_index */ max_index, + /* lag */ lag, + /* verbose */ FALSE, + /* reset_stats */ TRUE, + /* display_stats */ display_stats, + /* display_detailed_stats */ TRUE, + /* do_inserts */ TRUE, + /* dirty_inserts */ dirty_inserts, + /* dirty_unprotects */ dirty_unprotects); if ( show_progress ) /* 10 */ HDfprintf(stdout, "%s() - %0d -- pass2 = %d\n", @@ -430,61 +430,61 @@ smoke_check_2(void) fcn_name, mile_stone++, (int)pass2); row_major_scan_forward2(/* file_ptr */ file_ptr, - /* max_index */ max_index, - /* lag */ lag, - /* verbose */ FALSE, - /* reset_stats */ TRUE, - /* display_stats */ display_stats, - /* display_detailed_stats */ TRUE, - /* do_inserts */ TRUE, - /* dirty_inserts */ dirty_inserts, - /* do_renames */ TRUE, - /* rename_to_main_addr */ FALSE, - /* do_destroys */ TRUE, - /* do_mult_ro_protects */ TRUE, - /* dirty_destroys */ dirty_destroys, - /* dirty_unprotects */ dirty_unprotects); + /* max_index */ max_index, + /* lag */ lag, + /* verbose */ FALSE, + /* reset_stats */ TRUE, + /* display_stats */ display_stats, + /* display_detailed_stats */ TRUE, + /* do_inserts */ TRUE, + /* dirty_inserts */ dirty_inserts, + /* do_renames */ TRUE, + /* rename_to_main_addr */ FALSE, + /* do_destroys */ TRUE, + /* do_mult_ro_protects */ TRUE, + /* dirty_destroys */ dirty_destroys, + /* dirty_unprotects */ dirty_unprotects); if ( show_progress ) /* 4 */ HDfprintf(stdout, "%s() - %0d -- pass2 = %d\n", fcn_name, mile_stone++, (int)pass2); row_major_scan_backward2(/* file_ptr */ file_ptr, - /* max_index */ max_index, - /* lag */ lag, - /* verbose */ FALSE, - /* reset_stats */ TRUE, - /* display_stats */ display_stats, - /* display_detailed_stats */ TRUE, - /* do_inserts */ FALSE, - /* dirty_inserts */ dirty_inserts, - /* do_renames */ TRUE, - /* rename_to_main_addr */ TRUE, - /* do_destroys */ FALSE, - /* do_mult_ro_protects */ TRUE, - /* dirty_destroys */ dirty_destroys, - /* dirty_unprotects */ dirty_unprotects); - - if ( show_progress ) /* 5 */ - HDfprintf(stdout, "%s() - %0d -- pass2 = %d\n", - fcn_name, mile_stone++, (int)pass2); - - row_major_scan_forward2(/* file_ptr */ file_ptr, - /* max_index */ max_index, + /* max_index */ max_index, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, /* display_stats */ display_stats, /* display_detailed_stats */ TRUE, - /* do_inserts */ TRUE, + /* do_inserts */ FALSE, /* dirty_inserts */ dirty_inserts, /* do_renames */ TRUE, - /* rename_to_main_addr */ FALSE, + /* rename_to_main_addr */ TRUE, /* do_destroys */ FALSE, /* do_mult_ro_protects */ TRUE, /* dirty_destroys */ dirty_destroys, /* dirty_unprotects */ dirty_unprotects); + if ( show_progress ) /* 5 */ + HDfprintf(stdout, "%s() - %0d -- pass2 = %d\n", + fcn_name, mile_stone++, (int)pass2); + + row_major_scan_forward2(/* file_ptr */ file_ptr, + /* max_index */ max_index, + /* lag */ lag, + /* verbose */ FALSE, + /* reset_stats */ TRUE, + /* display_stats */ display_stats, + /* display_detailed_stats */ TRUE, + /* do_inserts */ TRUE, + /* dirty_inserts */ dirty_inserts, + /* do_renames */ TRUE, + /* rename_to_main_addr */ FALSE, + /* do_destroys */ FALSE, + /* do_mult_ro_protects */ TRUE, + /* dirty_destroys */ dirty_destroys, + /* dirty_unprotects */ dirty_unprotects); + if ( show_progress ) /* 6 */ HDfprintf(stdout, "%s() - %0d -- pass2 = %d\n", fcn_name, mile_stone++, (int)pass2); @@ -501,15 +501,15 @@ smoke_check_2(void) fcn_name, mile_stone++, (int)pass2); col_major_scan_forward2(/* file_ptr */ file_ptr, - /* max_index */ max_index, - /* lag */ lag, - /* verbose */ FALSE, - /* reset_stats */ TRUE, - /* display_stats */ display_stats, - /* display_detailed_stats */ TRUE, - /* do_inserts */ TRUE, - /* dirty_inserts */ dirty_inserts, - /* dirty_unprotects */ dirty_unprotects); + /* max_index */ max_index, + /* lag */ lag, + /* verbose */ FALSE, + /* reset_stats */ TRUE, + /* display_stats */ display_stats, + /* display_detailed_stats */ TRUE, + /* do_inserts */ TRUE, + /* dirty_inserts */ dirty_inserts, + /* dirty_unprotects */ dirty_unprotects); if ( show_progress ) /* 8 */ HDfprintf(stdout, "%s() - %0d -- pass2 = %d\n", @@ -518,24 +518,24 @@ smoke_check_2(void) /* flush all entries in the cache: */ flush_cache2(/* file_ptr */ file_ptr, - /* destroy_entries */ FALSE, - /* dump_stats */ FALSE, - /* dump_detailed_stats */ FALSE); + /* destroy_entries */ FALSE, + /* dump_stats */ FALSE, + /* dump_detailed_stats */ FALSE); if ( show_progress ) /* 9 */ HDfprintf(stdout, "%s() - %0d -- pass2 = %d\n", fcn_name, mile_stone++, (int)pass2); col_major_scan_backward2(/* file_ptr */ file_ptr, - /* max_index */ max_index, - /* lag */ lag, - /* verbose */ FALSE, - /* reset_stats */ TRUE, - /* display_stats */ display_stats, - /* display_detailed_stats */ TRUE, - /* do_inserts */ TRUE, - /* dirty_inserts */ dirty_inserts, - /* dirty_unprotects */ dirty_unprotects); + /* max_index */ max_index, + /* lag */ lag, + /* verbose */ FALSE, + /* reset_stats */ TRUE, + /* display_stats */ display_stats, + /* display_detailed_stats */ TRUE, + /* do_inserts */ TRUE, + /* dirty_inserts */ dirty_inserts, + /* dirty_unprotects */ dirty_unprotects); if ( show_progress ) /* 10 */ HDfprintf(stdout, "%s() - %0d -- pass2 = %d\n", @@ -871,20 +871,20 @@ smoke_check_4(void) fcn_name, mile_stone++, (int)pass2); row_major_scan_forward2(/* file_ptr */ file_ptr, - /* max_index */ max_index, - /* lag */ lag, - /* verbose */ FALSE, - /* reset_stats */ TRUE, - /* display_stats */ display_stats, - /* display_detailed_stats */ TRUE, - /* do_inserts */ TRUE, - /* dirty_inserts */ dirty_inserts, - /* do_renames */ TRUE, - /* rename_to_main_addr */ FALSE, - /* do_destroys */ TRUE, - /* do_mult_ro_protects */ TRUE, - /* dirty_destroys */ dirty_destroys, - /* dirty_unprotects */ dirty_unprotects); + /* max_index */ max_index, + /* lag */ lag, + /* verbose */ FALSE, + /* reset_stats */ TRUE, + /* display_stats */ display_stats, + /* display_detailed_stats */ TRUE, + /* do_inserts */ TRUE, + /* dirty_inserts */ dirty_inserts, + /* do_renames */ TRUE, + /* rename_to_main_addr */ FALSE, + /* do_destroys */ TRUE, + /* do_mult_ro_protects */ TRUE, + /* dirty_destroys */ dirty_destroys, + /* dirty_unprotects */ dirty_unprotects); if ( show_progress ) /* 4 */ HDfprintf(stdout, "%s() - %0d -- pass2 = %d\n", @@ -1669,13 +1669,13 @@ smoke_check_7(void) fcn_name, mile_stone++, (int)pass2); hl_row_major_scan_forward2(/* file_ptr */ file_ptr, - /* max_index */ max_index, - /* verbose */ FALSE, - /* reset_stats */ TRUE, - /* display_stats */ display_stats, - /* display_detailed_stats */ FALSE, - /* do_inserts */ FALSE, - /* dirty_inserts */ dirty_inserts); + /* max_index */ max_index, + /* verbose */ FALSE, + /* reset_stats */ TRUE, + /* display_stats */ display_stats, + /* display_detailed_stats */ FALSE, + /* do_inserts */ FALSE, + /* dirty_inserts */ dirty_inserts); if ( show_progress ) /* 4 */ HDfprintf(stdout, "%s() - %0d -- pass2 = %d\n", @@ -2963,22 +2963,22 @@ write_permitted_check(void) static unsigned check_insert_entry(void) { - const char * fcn_name = "check_insert_entry"; - int entry_type = PICO_ENTRY_TYPE; - int i; - int point = 0; - int subpoint = 0; - herr_t result; - hbool_t in_cache; - hbool_t is_dirty; - hbool_t is_protected; - hbool_t is_pinned; - hbool_t show_progress = FALSE; - size_t entry_size; - H5F_t * file_ptr = NULL; + const char * fcn_name = "check_insert_entry"; + int entry_type = PICO_ENTRY_TYPE; + int i; + int point = 0; + int subpoint = 0; + herr_t result; + hbool_t in_cache; + hbool_t is_dirty; + hbool_t is_protected; + hbool_t is_pinned; + hbool_t show_progress = FALSE; + size_t entry_size; + H5F_t * file_ptr = NULL; H5C2_t * cache_ptr = NULL; - test_entry_t * base_addr; - test_entry_t * entry_ptr; + test_entry_t * base_addr; + test_entry_t * entry_ptr; struct H5C2_cache_entry_t * search_ptr; @@ -3019,10 +3019,10 @@ check_insert_entry(void) insert_entry2(file_ptr, entry_type, 0, TRUE, H5C2__NO_FLAGS_SET); insert_entry2(file_ptr, entry_type, 1, TRUE, - H5C2__SET_FLUSH_MARKER_FLAG); + H5C2__SET_FLUSH_MARKER_FLAG); insert_entry2(file_ptr, entry_type, 2, TRUE, H5C2__PIN_ENTRY_FLAG); insert_entry2(file_ptr, entry_type, 3, TRUE, - (H5C2__SET_FLUSH_MARKER_FLAG | H5C2__PIN_ENTRY_FLAG)); + (H5C2__SET_FLUSH_MARKER_FLAG | H5C2__PIN_ENTRY_FLAG)); } if ( show_progress ) { @@ -3058,7 +3058,7 @@ check_insert_entry(void) if ( result < 0 ) { pass2 = FALSE; - failure_mssg2 = "H5AC_get_entry_status() reports failure."; + failure_mssg2 = "H5C2_get_entry_status() reports failure."; } if ( show_progress ) { @@ -3109,7 +3109,7 @@ check_insert_entry(void) fcn_name, i, point, subpoint++); } - /* Thats all we can get from H5AC_get_entry_status(). + /* Thats all we can get from H5C2_get_entry_status(). * Now start looking at the cache data structures directly. */ @@ -3375,7 +3375,7 @@ check_flush_cache(void) reset_entries2(); file_ptr = setup_cache2((size_t)(2 * 1024 * 1024), - (size_t)(1 * 1024 * 1024)); + (size_t)(1 * 1024 * 1024)); } if ( show_progress ) { /* 1 */ @@ -3510,7 +3510,7 @@ check_flush_cache__empty_cache(H5F_t * file_ptr) if ( pass2 ) { result = H5C2_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, - H5C2__FLUSH_INVALIDATE_FLAG); + H5C2__FLUSH_INVALIDATE_FLAG); if ( result < 0 ) { @@ -3522,7 +3522,7 @@ check_flush_cache__empty_cache(H5F_t * file_ptr) if ( pass2 ) { result = H5C2_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, - H5C2__FLUSH_CLEAR_ONLY_FLAG); + H5C2__FLUSH_CLEAR_ONLY_FLAG); if ( result < 0 ) { @@ -3535,7 +3535,7 @@ check_flush_cache__empty_cache(H5F_t * file_ptr) if ( pass2 ) { result = H5C2_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, - H5C2__FLUSH_MARKED_ENTRIES_FLAG); + H5C2__FLUSH_MARKED_ENTRIES_FLAG); if ( result < 0 ) { @@ -5432,8 +5432,7 @@ check_flush_cache__multi_entry_test(H5F_t * file_ptr, if ( pass2 ) { - result = H5C2_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, - flush_flags); + result = H5C2_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, flush_flags); if ( result < 0 ) { @@ -5525,7 +5524,7 @@ check_flush_cache__multi_entry_test(H5F_t * file_ptr, if ( pass2 ) { result = H5C2_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, - H5C2__FLUSH_INVALIDATE_FLAG); + H5C2__FLUSH_INVALIDATE_FLAG); if ( result < 0 ) { @@ -5684,8 +5683,7 @@ check_flush_cache__pe_multi_entry_test(H5F_t * file_ptr, if ( pass2 ) { - result = H5C2_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, - flush_flags); + result = H5C2_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, flush_flags); if ( result < 0 ) { @@ -5725,15 +5723,15 @@ check_flush_cache__pe_multi_entry_test(H5F_t * file_ptr, #if 0 /* This is useful debugging code. Lets keep it around. */ HDfprintf(stdout, - "desrlzd = %d(%d), clrd = %d(%d), srlzd = %d(%d), dest = %d(%d)\n", - (int)(entry_ptr->deserialized), - (int)(spec[i].expected_deserialized), - (int)(entry_ptr->cleared), - (int)(spec[i].expected_cleared), - (int)(entry_ptr->serialized), - (int)(spec[i].expected_serialized), - (int)(entry_ptr->destroyed), - (int)(spec[i].expected_destroyed)); + "desrlzd = %d(%d), clrd = %d(%d), srlzd = %d(%d), dest = %d(%d)\n", + (int)(entry_ptr->deserialized), + (int)(spec[i].expected_deserialized), + (int)(entry_ptr->cleared), + (int)(spec[i].expected_cleared), + (int)(entry_ptr->serialized), + (int)(spec[i].expected_serialized), + (int)(entry_ptr->destroyed), + (int)(spec[i].expected_destroyed)); #endif @@ -5777,7 +5775,7 @@ check_flush_cache__pe_multi_entry_test(H5F_t * file_ptr, if ( pass2 ) { result = H5C2_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, - H5C2__FLUSH_INVALIDATE_FLAG); + H5C2__FLUSH_INVALIDATE_FLAG); if ( result < 0 ) { @@ -9818,8 +9816,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr, if ( pass2 ) { - result = H5C2_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, - flush_flags); + result = H5C2_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, flush_flags); if ( result < 0 ) { @@ -9860,15 +9857,15 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr, #if 0 /* This is useful debugging code. Lets keep it around. */ HDfprintf(stdout, - "desrlzd = %d(%d), clrd = %d(%d), srlzd = %d(%d), dest = %d(%d)\n", - (int)(entry_ptr->deserialized), - (int)(spec[i].expected_deserialized), - (int)(entry_ptr->cleared), - (int)(spec[i].expected_cleared), - (int)(entry_ptr->serialized), - (int)(spec[i].expected_serialized), - (int)(entry_ptr->destroyed), - (int)(spec[i].expected_destroyed)); + "desrlzd = %d(%d), clrd = %d(%d), srlzd = %d(%d), dest = %d(%d)\n", + (int)(entry_ptr->deserialized), + (int)(spec[i].expected_deserialized), + (int)(entry_ptr->cleared), + (int)(spec[i].expected_cleared), + (int)(entry_ptr->serialized), + (int)(spec[i].expected_serialized), + (int)(entry_ptr->destroyed), + (int)(spec[i].expected_destroyed)); HDfprintf(stdout, "entry_ptr->header.is_dirty = %d\n", (int)(entry_ptr->header.is_dirty)); @@ -9889,8 +9886,8 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr, while ( ( pass2 ) && ( i < check_size ) ) { if ( check[i].in_cache != entry_in_cache2(cache_ptr, - check[i].entry_type, - check[i].entry_index) ) { + check[i].entry_type, + check[i].entry_index) ) { pass2 = FALSE; HDsnprintf(msg, (size_t)128, @@ -10063,7 +10060,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr, if ( pass2 ) { result = H5C2_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, - H5C2__FLUSH_INVALIDATE_FLAG); + H5C2__FLUSH_INVALIDATE_FLAG); if ( result < 0 ) { @@ -10462,9 +10459,9 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) /* verify the expected status of all entries we have loaded to date: */ num_large_entries = 1; verify_entry_status2(cache_ptr, - 0, - (num_variable_entries + num_monster_entries + num_large_entries), - expected); + 0, + (num_variable_entries + num_monster_entries + num_large_entries), + expected); } } @@ -11293,7 +11290,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr) if ( pass2 ) { result = H5C2_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, - H5C2__FLUSH_INVALIDATE_FLAG); + H5C2__FLUSH_INVALIDATE_FLAG); if ( result < 0 ) { @@ -13158,8 +13155,7 @@ check_flush_cache__single_entry_test(H5F_t * file_ptr, if ( pass2 ) { - result = H5C2_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, - flush_flags); + result = H5C2_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, flush_flags); if ( result < 0 ) { @@ -13190,15 +13186,15 @@ check_flush_cache__single_entry_test(H5F_t * file_ptr, #if 1 /* This is useful debugging code -- lets keep it for a while */ HDfprintf(stdout, - "desrlzd = %d(%d), clrd = %d(%d), srlzd = %d(%d), dest = %d(%d)\n", - (int)(entry_ptr->deserialized), - (int)expected_deserialized, - (int)(entry_ptr->cleared), - (int)expected_cleared, - (int)(entry_ptr->serialized), - (int)expected_serialized, - (int)(entry_ptr->destroyed), - (int)expected_destroyed); + "desrlzd = %d(%d), clrd = %d(%d), srlzd = %d(%d), dest = %d(%d)\n", + (int)(entry_ptr->deserialized), + (int)expected_deserialized, + (int)(entry_ptr->cleared), + (int)expected_cleared, + (int)(entry_ptr->serialized), + (int)expected_serialized, + (int)(entry_ptr->destroyed), + (int)expected_destroyed); #endif pass2 = FALSE; HDsnprintf(msg, (size_t)128, @@ -13236,7 +13232,7 @@ check_flush_cache__single_entry_test(H5F_t * file_ptr, if ( pass2 ) { result = H5C2_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, - H5C2__FLUSH_INVALIDATE_FLAG); + H5C2__FLUSH_INVALIDATE_FLAG); if ( result < 0 ) { @@ -13376,8 +13372,7 @@ check_flush_cache__pinned_single_entry_test(H5F_t * file_ptr, if ( pass2 ) { - result = H5C2_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, - flush_flags); + result = H5C2_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, flush_flags); if ( result < 0 ) { @@ -13407,15 +13402,15 @@ check_flush_cache__pinned_single_entry_test(H5F_t * file_ptr, #endif #if 0 /* this is useful debugging code -- keep it around */ HDfprintf(stdout, - "desrlzd = %d(%d), clrd = %d(%d), srlzd = %d(%d), dest = %d(%d)\n", - (int)(entry_ptr->deserialized), - (int)expected_deserialized, - (int)(entry_ptr->cleared), - (int)expected_cleared, - (int)(entry_ptr->serialized), - (int)expected_serialized, - (int)(entry_ptr->destroyed), - (int)expected_destroyed); + "desrlzd = %d(%d), clrd = %d(%d), srlzd = %d(%d), dest = %d(%d)\n", + (int)(entry_ptr->deserialized), + (int)expected_deserialized, + (int)(entry_ptr->cleared), + (int)expected_cleared, + (int)(entry_ptr->serialized), + (int)expected_serialized, + (int)(entry_ptr->destroyed), + (int)expected_destroyed); #endif pass2 = FALSE; HDsnprintf(msg, (size_t)128, @@ -13469,7 +13464,7 @@ check_flush_cache__pinned_single_entry_test(H5F_t * file_ptr, if ( pass2 ) { result = H5C2_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, - H5C2__FLUSH_INVALIDATE_FLAG); + H5C2__FLUSH_INVALIDATE_FLAG); if ( result < 0 ) { @@ -13562,7 +13557,7 @@ check_get_entry_status(void) pass2 = FALSE; HDsnprintf(msg, (size_t)128, - "H5AC_get_entry_status() reports failure 1."); + "H5C2_get_entry_status() reports failure 1."); failure_mssg2 = msg; } else if ( in_cache ) { @@ -13586,7 +13581,7 @@ check_get_entry_status(void) pass2 = FALSE; HDsnprintf(msg, (size_t)128, - "H5AC_get_entry_status() reports failure 2."); + "H5C2_get_entry_status() reports failure 2."); failure_mssg2 = msg; } else if ( !in_cache || is_dirty || is_protected || is_pinned ) { @@ -13608,7 +13603,7 @@ check_get_entry_status(void) pass2 = FALSE; HDsnprintf(msg, (size_t)128, - "H5AC_get_entry_status() reports failure 3."); + "H5C2_get_entry_status() reports failure 3."); failure_mssg2 = msg; } else if ( !in_cache || is_dirty || !is_protected || is_pinned ) { @@ -13630,7 +13625,7 @@ check_get_entry_status(void) pass2 = FALSE; HDsnprintf(msg, (size_t)128, - "H5AC_get_entry_status() reports failure 4."); + "H5C2_get_entry_status() reports failure 4."); failure_mssg2 = msg; } else if ( !in_cache || is_dirty || is_protected || !is_pinned ) { @@ -13652,7 +13647,7 @@ check_get_entry_status(void) pass2 = FALSE; HDsnprintf(msg, (size_t)128, - "H5AC_get_entry_status() reports failure 5."); + "H5C2_get_entry_status() reports failure 5."); failure_mssg2 = msg; } else if ( !in_cache || !is_dirty || is_protected || !is_pinned ) { @@ -13674,7 +13669,7 @@ check_get_entry_status(void) pass2 = FALSE; HDsnprintf(msg, (size_t)128, - "H5AC_get_entry_status() reports failure 6."); + "H5C2_get_entry_status() reports failure 6."); failure_mssg2 = msg; } else if ( !in_cache || !is_dirty || is_protected || is_pinned ) { @@ -13774,7 +13769,7 @@ check_expunge_entry(void) pass2 = FALSE; HDsnprintf(msg, (size_t)128, - "H5AC_get_entry_status() reports failure 1."); + "H5C2_get_entry_status() reports failure 1."); failure_mssg2 = msg; } else if ( in_cache ) { @@ -13812,7 +13807,7 @@ check_expunge_entry(void) pass2 = FALSE; HDsnprintf(msg, (size_t)128, - "H5AC_get_entry_status() reports failure 2."); + "H5C2_get_entry_status() reports failure 2."); failure_mssg2 = msg; } else if ( !in_cache || is_dirty || is_protected || is_pinned ) { @@ -13858,7 +13853,7 @@ check_expunge_entry(void) pass2 = FALSE; HDsnprintf(msg, (size_t)128, - "H5AC_get_entry_status() reports failure 3."); + "H5C2_get_entry_status() reports failure 3."); failure_mssg2 = msg; } else if ( in_cache ) { @@ -13900,7 +13895,7 @@ check_expunge_entry(void) pass2 = FALSE; HDsnprintf(msg, (size_t)128, - "H5AC_get_entry_status() reports failure 4."); + "H5C2_get_entry_status() reports failure 4."); failure_mssg2 = msg; } else if ( in_cache ) { @@ -13939,7 +13934,7 @@ check_expunge_entry(void) pass2 = FALSE; HDsnprintf(msg, (size_t)128, - "H5AC_get_entry_status() reports failure 5."); + "H5C2_get_entry_status() reports failure 5."); failure_mssg2 = msg; } else if ( !in_cache || !is_dirty || is_protected || is_pinned ) { @@ -13980,7 +13975,7 @@ check_expunge_entry(void) pass2 = FALSE; HDsnprintf(msg, (size_t)128, - "H5AC_get_entry_status() reports failure 6."); + "H5C2_get_entry_status() reports failure 6."); failure_mssg2 = msg; } else if ( in_cache ) { @@ -14713,8 +14708,7 @@ check_rename_entry__run_test(H5F_t * file_ptr, } } - unpin_entry2(file_ptr, spec_ptr->entry_type, - spec_ptr->entry_index); + unpin_entry2(file_ptr, spec_ptr->entry_type, spec_ptr->entry_index); } else { @@ -14972,7 +14966,7 @@ check_resize_entry(void) pass2 = FALSE; HDsnprintf(msg, (size_t)128, - "H5AC_get_entry_status() reports failure 1."); + "H5C2_get_entry_status() reports failure 1."); failure_mssg2 = msg; } else if ( !in_cache || is_dirty || !is_protected || is_pinned ) { @@ -15042,7 +15036,7 @@ check_resize_entry(void) pass2 = FALSE; HDsnprintf(msg, (size_t)128, - "H5AC_get_entry_status() reports failure 2."); + "H5C2_get_entry_status() reports failure 2."); failure_mssg2 = msg; } else if ( !in_cache || !is_dirty || is_protected || is_pinned || @@ -15115,7 +15109,7 @@ check_resize_entry(void) pass2 = FALSE; HDsnprintf(msg, (size_t)128, - "H5AC_get_entry_status() reports failure 3."); + "H5C2_get_entry_status() reports failure 3."); failure_mssg2 = msg; } else if ( !in_cache || !is_dirty || is_protected || is_pinned || @@ -15180,7 +15174,7 @@ check_resize_entry(void) pass2 = FALSE; HDsnprintf(msg, (size_t)128, - "H5AC_get_entry_status() reports failure 4."); + "H5C2_get_entry_status() reports failure 4."); failure_mssg2 = msg; } else if ( !in_cache || !is_dirty || is_protected || ! is_pinned || @@ -15241,7 +15235,7 @@ check_resize_entry(void) pass2 = FALSE; HDsnprintf(msg, (size_t)128, - "H5AC_get_entry_status() reports failure 5."); + "H5C2_get_entry_status() reports failure 5."); failure_mssg2 = msg; } else if ( !in_cache || !is_dirty || is_protected || ! is_pinned || @@ -15278,7 +15272,7 @@ check_resize_entry(void) pass2 = FALSE; HDsnprintf(msg, (size_t)128, - "H5AC_get_entry_status() reports failure 6."); + "H5C2_get_entry_status() reports failure 6."); failure_mssg2 = msg; } else if ( in_cache ) { @@ -15399,7 +15393,7 @@ check_resize_entry(void) pass2 = FALSE; HDsnprintf(msg, (size_t)128, - "H5AC_get_entry_status() reports failure 7."); + "H5C2_get_entry_status() reports failure 7."); failure_mssg2 = msg; } else if ( !in_cache || is_dirty || !is_protected || is_pinned ) { @@ -15471,7 +15465,7 @@ check_resize_entry(void) pass2 = FALSE; HDsnprintf(msg, (size_t)128, - "H5AC_get_entry_status() reports failure 8."); + "H5C2_get_entry_status() reports failure 8."); failure_mssg2 = msg; } else if ( !in_cache || !is_dirty || is_protected || is_pinned || @@ -15544,7 +15538,7 @@ check_resize_entry(void) pass2 = FALSE; HDsnprintf(msg, (size_t)128, - "H5AC_get_entry_status() reports failure 9."); + "H5C2_get_entry_status() reports failure 9."); failure_mssg2 = msg; } else if ( !in_cache || !is_dirty || is_protected || is_pinned || @@ -15611,7 +15605,7 @@ check_resize_entry(void) pass2 = FALSE; HDsnprintf(msg, (size_t)128, - "H5AC_get_entry_status() reports failure 10."); + "H5C2_get_entry_status() reports failure 10."); failure_mssg2 = msg; } else if ( !in_cache || !is_dirty || is_protected || ! is_pinned || @@ -15672,7 +15666,7 @@ check_resize_entry(void) pass2 = FALSE; HDsnprintf(msg, (size_t)128, - "H5AC_get_entry_status() reports failure 11."); + "H5C2_get_entry_status() reports failure 11."); failure_mssg2 = msg; } else if ( !in_cache || !is_dirty || is_protected || ! is_pinned || @@ -15709,7 +15703,7 @@ check_resize_entry(void) pass2 = FALSE; HDsnprintf(msg, (size_t)128, - "H5AC_get_entry_status() reports failure 12."); + "H5C2_get_entry_status() reports failure 12."); failure_mssg2 = msg; } else if ( in_cache ) { @@ -16015,7 +16009,7 @@ check_evictions_enabled(void) pass2 = FALSE; HDsnprintf(msg, (size_t)128, - "H5AC_get_entry_status() reports failure 1."); + "H5C2_get_entry_status() reports failure 1."); failure_mssg2 = msg; } else if ( in_cache ) { @@ -16078,7 +16072,7 @@ check_evictions_enabled(void) pass2 = FALSE; HDsnprintf(msg, (size_t)128, - "H5AC_get_entry_status() reports failure 2."); + "H5C2_get_entry_status() reports failure 2."); failure_mssg2 = msg; } else if ( in_cache ) { @@ -16285,7 +16279,7 @@ check_evictions_enabled(void) pass2 = FALSE; HDsnprintf(msg, (size_t)128, - "H5AC_get_entry_status() reports failure 3."); + "H5C2_get_entry_status() reports failure 3."); failure_mssg2 = msg; } else if ( in_cache ) { @@ -16321,7 +16315,7 @@ check_evictions_enabled(void) pass2 = FALSE; HDsnprintf(msg, (size_t)128, - "H5AC_get_entry_status() reports failure 4."); + "H5C2_get_entry_status() reports failure 4."); failure_mssg2 = msg; } else if ( in_cache ) { @@ -16450,7 +16444,7 @@ check_evictions_enabled(void) pass2 = FALSE; HDsnprintf(msg, (size_t)128, - "H5AC_get_entry_status() reports failure 5."); + "H5C2_get_entry_status() reports failure 5."); failure_mssg2 = msg; } else if ( in_cache ) { @@ -16563,8 +16557,7 @@ check_flush_protected_err(void) protect_entry2(file_ptr, 0, 0); - if ( H5C2_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, - H5C2__NO_FLAGS_SET) + if ( H5C2_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C2__NO_FLAGS_SET) >= 0 ) { pass2 = FALSE; @@ -16574,8 +16567,7 @@ check_flush_protected_err(void) unprotect_entry2(file_ptr, 0, 0, TRUE, H5C2__NO_FLAGS_SET); - if ( H5C2_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, - H5C2__NO_FLAGS_SET) + if ( H5C2_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C2__NO_FLAGS_SET) < 0 ) { pass2 = FALSE; @@ -16749,15 +16741,14 @@ check_destroy_protected_err(void) reset_entries2(); file_ptr = setup_cache2((size_t)(2 * 1024), - (size_t)(1 * 1024)); + (size_t)(1 * 1024)); protect_entry2(file_ptr, 0, 0); if ( H5C2_dest(file_ptr, H5P_DATASET_XFER_DEFAULT) >= 0 ) { pass2 = FALSE; - failure_mssg2 = - "destroy succeeded on cache with protected entry.\n"; + failure_mssg2 = "destroy succeeded on cache with protected entry.\n"; } else { @@ -17718,7 +17709,7 @@ check_expunge_entry_errs(void) if ( pass2 ) { result = H5C2_expunge_entry(file_ptr, H5P_DATASET_XFER_DEFAULT, - &(types2[0]), entry_ptr->addr); + &(types2[0]), entry_ptr->addr); if ( result > 0 ) { @@ -17736,7 +17727,7 @@ check_expunge_entry_errs(void) if ( pass2 ) { result = H5C2_expunge_entry(file_ptr, H5P_DATASET_XFER_DEFAULT, - &(types2[0]), entry_ptr->addr); + &(types2[0]), entry_ptr->addr); if ( result > 0 ) { @@ -17754,7 +17745,7 @@ check_expunge_entry_errs(void) if ( pass2 ) { result = H5C2_expunge_entry(file_ptr, H5P_DATASET_XFER_DEFAULT, - &(types2[0]), entry_ptr->addr); + &(types2[0]), entry_ptr->addr); if ( result < 0 ) { @@ -17866,8 +17857,7 @@ check_resize_entry_errs(void) if ( pass2 ) { - result = H5C2_resize_pinned_entry((void *)entry_ptr, - (size_t)0); + result = H5C2_resize_pinned_entry((void *)entry_ptr, (size_t)0); if ( result > 0 ) { @@ -18362,7 +18352,7 @@ check_auto_cache_resize(void) /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), - /* enum H5C2_cache_flash_incr_mode */ + /* enum H5C2_cache_flash_incr_mode */ /* flash_incr_mode = */ H5C2_flash_incr__off, /* double flash_multiple = */ 2.0, /* double flash_threshold = */ 0.5, @@ -21520,7 +21510,7 @@ check_auto_cache_resize(void) * code increases the cache size when and as expected. */ - /* Place the cache in a know state via a flush destroy on the cache + /* Place the cache in a known state via a flush-destroy on the cache * to clear out all entries, and then a reset on all the entries. * Then configure the cache for the flash cache size increase tests, * and force the flash size increase code through all its operational @@ -21724,8 +21714,7 @@ check_auto_cache_resize(void) if ( result != SUCCEED ) { pass2 = FALSE; - failure_mssg2 = - "H5C2_set_cache_auto_resize_config failed 13.\n"; + failure_mssg2 = "H5C2_set_cache_auto_resize_config failed 13.\n"; } } @@ -21883,8 +21872,7 @@ check_auto_cache_resize(void) if ( result != SUCCEED ) { pass2 = FALSE; - failure_mssg2 = - "H5C2_set_cache_auto_resize_config failed 13.\n"; + failure_mssg2 = "H5C2_set_cache_auto_resize_config failed 13.\n"; } } @@ -22057,8 +22045,7 @@ check_auto_cache_resize(void) if ( result != SUCCEED ) { pass2 = FALSE; - failure_mssg2 = - "H5C2_set_cache_auto_resize_config failed 14.\n"; + failure_mssg2 = "H5C2_set_cache_auto_resize_config failed 14.\n"; } } @@ -22215,8 +22202,7 @@ check_auto_cache_resize(void) if ( result != SUCCEED ) { pass2 = FALSE; - failure_mssg2 = - "H5C2_set_cache_auto_resize_config failed 15.\n"; + failure_mssg2 = "H5C2_set_cache_auto_resize_config failed 15.\n"; } } @@ -22689,7 +22675,7 @@ check_auto_cache_resize_disable(void) /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), - /* enum H5C2_cache_flash_incr_mode */ + /* enum H5C2_cache_flash_incr_mode */ /* flash_incr_mode = */ H5C2_flash_incr__off, /* double flash_multiple = */ 2.0, /* double flash_threshold = */ 0.5, @@ -25450,7 +25436,7 @@ check_auto_cache_resize_epoch_markers(void) /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), - /* enum H5C2_cache_flash_incr_mode */ + /* enum H5C2_cache_flash_incr_mode */ /* flash_incr_mode = */ H5C2_flash_incr__off, /* double flash_multiple = */ 2.0, /* double flash_threshold = */ 0.5, @@ -26198,7 +26184,7 @@ check_auto_cache_resize_input_errs(void) /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), - /* enum H5C2_cache_flash_incr_mode */ + /* enum H5C2_cache_flash_incr_mode */ /* flash_incr_mode = */ H5C2_flash_incr__off, /* double flash_multiple = */ 2.0, /* double flash_threshold = */ 0.5, @@ -27558,7 +27544,7 @@ check_auto_cache_resize_input_errs(void) if ( pass2 ) { - invalid_auto_size_ctl.version = H5C2__CURR_AUTO_SIZE_CTL_VER; + invalid_auto_size_ctl.version = H5C2__CURR_AUTO_SIZE_CTL_VER; invalid_auto_size_ctl.rpt_fcn = NULL; invalid_auto_size_ctl.set_initial_size = TRUE; @@ -27608,7 +27594,7 @@ check_auto_cache_resize_input_errs(void) pass2 = FALSE; failure_mssg2 = - "H5C2_set_cache_auto_resize_config accepted bad flash_incr_mode.\n"; + "H5C2_set_cache_auto_resize_config accepted bad flash_incr_mode.\n"; } } @@ -27634,7 +27620,7 @@ check_auto_cache_resize_input_errs(void) if ( pass2 ) { - invalid_auto_size_ctl.version = H5C2__CURR_AUTO_SIZE_CTL_VER; + invalid_auto_size_ctl.version = H5C2__CURR_AUTO_SIZE_CTL_VER; invalid_auto_size_ctl.rpt_fcn = NULL; invalid_auto_size_ctl.set_initial_size = TRUE; @@ -27684,7 +27670,7 @@ check_auto_cache_resize_input_errs(void) pass2 = FALSE; failure_mssg2 = - "H5C2_set_cache_auto_resize_config accepted bad flash_multiple(1).\n"; + "H5C2_set_cache_auto_resize_config accepted bad flash_multiple(1).\n"; } } @@ -27708,7 +27694,7 @@ check_auto_cache_resize_input_errs(void) if ( pass2 ) { - invalid_auto_size_ctl.version = H5C2__CURR_AUTO_SIZE_CTL_VER; + invalid_auto_size_ctl.version = H5C2__CURR_AUTO_SIZE_CTL_VER; invalid_auto_size_ctl.rpt_fcn = NULL; invalid_auto_size_ctl.set_initial_size = TRUE; @@ -27758,7 +27744,7 @@ check_auto_cache_resize_input_errs(void) pass2 = FALSE; failure_mssg2 = - "H5C2_set_cache_auto_resize_config accepted bad flash_multiple(2).\n"; + "H5C2_set_cache_auto_resize_config accepted bad flash_multiple(2).\n"; } } @@ -27784,7 +27770,7 @@ check_auto_cache_resize_input_errs(void) if ( pass2 ) { - invalid_auto_size_ctl.version = H5C2__CURR_AUTO_SIZE_CTL_VER; + invalid_auto_size_ctl.version = H5C2__CURR_AUTO_SIZE_CTL_VER; invalid_auto_size_ctl.rpt_fcn = NULL; invalid_auto_size_ctl.set_initial_size = TRUE; @@ -27834,7 +27820,7 @@ check_auto_cache_resize_input_errs(void) pass2 = FALSE; failure_mssg2 = - "H5C2_set_cache_auto_resize_config accepted bad flash_threshold(1).\n"; + "H5C2_set_cache_auto_resize_config accepted bad flash_threshold(1).\n"; } } @@ -27858,7 +27844,7 @@ check_auto_cache_resize_input_errs(void) if ( pass2 ) { - invalid_auto_size_ctl.version = H5C2__CURR_AUTO_SIZE_CTL_VER; + invalid_auto_size_ctl.version = H5C2__CURR_AUTO_SIZE_CTL_VER; invalid_auto_size_ctl.rpt_fcn = NULL; invalid_auto_size_ctl.set_initial_size = TRUE; @@ -27908,7 +27894,7 @@ check_auto_cache_resize_input_errs(void) pass2 = FALSE; failure_mssg2 = - "H5C2_set_cache_auto_resize_config accepted bad flash_threshold(2).\n"; + "H5C2_set_cache_auto_resize_config accepted bad flash_threshold(2).\n"; } } @@ -28655,7 +28641,7 @@ check_auto_cache_resize_aux_fcns(void) /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), - /* enum H5C2_cache_flash_incr_mode */ + /* enum H5C2_cache_flash_incr_mode */ /* flash_incr_mode = */ H5C2_flash_incr__off, /* double flash_multiple = */ 2.0, /* double flash_threshold = */ 0.5, @@ -28691,7 +28677,7 @@ check_auto_cache_resize_aux_fcns(void) reset_entries2(); file_ptr = setup_cache2((size_t)(2 * 1024), - (size_t)(1 * 1024)); + (size_t)(1 * 1024)); cache_ptr = file_ptr->shared->cache2; } diff --git a/test/cache2_api.c b/test/cache2_api.c index 90e497e..49e5ef7 100644 --- a/test/cache2_api.c +++ b/test/cache2_api.c @@ -88,36 +88,36 @@ check_fapl_mdc_api_calls(void) H5AC2_cache_config_t default_config = H5AC2__DEFAULT_CACHE_CONFIG; H5AC2_cache_config_t mod_config = { - /* int version = */ H5AC2__CURR_CACHE_CONFIG_VERSION, - /* hbool_t rpt_fcn_enabled = */ FALSE, - /* hbool_t open_trace_file = */ FALSE, - /* hbool_t close_trace_file = */ FALSE, - /* char trace_file_name[] = */ "", - /* hbool_t evictions_enabled = */ TRUE, - /* hbool_t set_initial_size = */ TRUE, - /* size_t initial_size = */ (1 * 1024 * 1024 + 1), - /* double min_clean_fraction = */ 0.2, - /* size_t max_size = */ (16 * 1024 * 1024 + 1), - /* size_t min_size = */ ( 1 * 1024 * 1024 + 1), - /* long int epoch_length = */ 50001, + /* int version = */ H5AC2__CURR_CACHE_CONFIG_VERSION, + /* hbool_t rpt_fcn_enabled = */ FALSE, + /* hbool_t open_trace_file = */ FALSE, + /* hbool_t close_trace_file = */ FALSE, + /* char trace_file_name[] = */ "", + /* hbool_t evictions_enabled = */ TRUE, + /* hbool_t set_initial_size = */ TRUE, + /* size_t initial_size = */ (1 * 1024 * 1024 + 1), + /* double min_clean_fraction = */ 0.2, + /* size_t max_size = */ (16 * 1024 * 1024 + 1), + /* size_t min_size = */ ( 1 * 1024 * 1024 + 1), + /* long int epoch_length = */ 50001, /* enum H5C2_cache_incr_mode incr_mode = */ H5C2_incr__threshold, - /* double lower_hr_threshold = */ 0.91, - /* double increment = */ 2.1, - /* hbool_t apply_max_increment = */ TRUE, - /* size_t max_increment = */ (4 * 1024 * 1024 + 1), + /* double lower_hr_threshold = */ 0.91, + /* double increment = */ 2.1, + /* hbool_t apply_max_increment = */ TRUE, + /* size_t max_increment = */ (4 * 1024 * 1024 + 1), /* enum H5C2_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C2_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* flash_incr_mode = */ H5C2_flash_incr__off, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C2_cache_decr_mode decr_mode = */ H5C2_decr__age_out, - /* double upper_hr_threshold = */ 0.998, - /* double decrement = */ 0.91, - /* hbool_t apply_max_decrement = */ TRUE, - /* size_t max_decrement = */ (1 * 1024 * 1024 - 1), - /* int epochs_before_eviction = */ 4, - /* hbool_t apply_empty_reserve = */ TRUE, - /* double empty_reserve = */ 0.05, - /* int dirty_bytes_threshold = */ (256 * 1024) + /* double upper_hr_threshold = */ 0.998, + /* double decrement = */ 0.91, + /* hbool_t apply_max_decrement = */ TRUE, + /* size_t max_decrement = */ (1 * 1024 * 1024 - 1), + /* int epochs_before_eviction = */ 4, + /* hbool_t apply_empty_reserve = */ TRUE, + /* double empty_reserve = */ 0.05, + /* int dirty_bytes_threshold = */ (256 * 1024) }; H5AC2_cache_config_t scratch; H5C2_auto_size_ctl_t default_auto_size_ctl; @@ -490,8 +490,7 @@ check_fapl_mdc_api_calls(void) scratch.version = H5C2__CURR_AUTO_SIZE_CTL_VER; - result = H5Pget_mdc_config(test_fapl_id, - (H5AC_cache_config_t *)&scratch); + result = H5Pget_mdc_config(test_fapl_id, (H5AC_cache_config_t *)&scratch); if ( result < 0 ) { @@ -590,136 +589,136 @@ check_file_mdc_api_calls(void) H5AC2_cache_config_t default_config = H5AC2__DEFAULT_CACHE_CONFIG; H5AC2_cache_config_t mod_config_1 = { - /* int version = */ H5C2__CURR_AUTO_SIZE_CTL_VER, - /* hbool_t rpt_fcn_enabled = */ FALSE, - /* hbool_t open_trace_file = */ FALSE, - /* hbool_t close_trace_file = */ FALSE, - /* char trace_file_name[] = */ "", - /* hbool_t evictions_enabled = */ TRUE, - /* hbool_t set_initial_size = */ TRUE, - /* size_t initial_size = */ (1 * 1024 * 1024 + 1), - /* double min_clean_fraction = */ 0.2, - /* size_t max_size = */ (16 * 1024 * 1024 + 1), - /* size_t min_size = */ ( 1 * 1024 * 1024 + 1), - /* long int epoch_length = */ 50001, + /* int version = */ H5C2__CURR_AUTO_SIZE_CTL_VER, + /* hbool_t rpt_fcn_enabled = */ FALSE, + /* hbool_t open_trace_file = */ FALSE, + /* hbool_t close_trace_file = */ FALSE, + /* char trace_file_name[] = */ "", + /* hbool_t evictions_enabled = */ TRUE, + /* hbool_t set_initial_size = */ TRUE, + /* size_t initial_size = */ (1 * 1024 * 1024 + 1), + /* double min_clean_fraction = */ 0.2, + /* size_t max_size = */ (16 * 1024 * 1024 + 1), + /* size_t min_size = */ ( 1 * 1024 * 1024 + 1), + /* long int epoch_length = */ 50001, /* enum H5C2_cache_incr_mode incr_mode = */ H5C2_incr__threshold, - /* double lower_hr_threshold = */ 0.91, - /* double increment = */ 2.1, - /* hbool_t apply_max_increment = */ TRUE, - /* size_t max_increment = */ (4 * 1024 * 1024 + 1), + /* double lower_hr_threshold = */ 0.91, + /* double increment = */ 2.1, + /* hbool_t apply_max_increment = */ TRUE, + /* size_t max_increment = */ (4 * 1024 * 1024 + 1), /* enum H5C2_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C2_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* flash_incr_mode = */ H5C2_flash_incr__off, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C2_cache_decr_mode decr_mode = */ H5C2_decr__age_out, - /* double upper_hr_threshold = */ 0.998, - /* double decrement = */ 0.91, - /* hbool_t apply_max_decrement = */ TRUE, - /* size_t max_decrement = */ (1 * 1024 * 1024 - 1), - /* int epochs_before_eviction = */ 4, - /* hbool_t apply_empty_reserve = */ TRUE, - /* double empty_reserve = */ 0.05, - /* int dirty_bytes_threshold = */ (256 * 1024) + /* double upper_hr_threshold = */ 0.998, + /* double decrement = */ 0.91, + /* hbool_t apply_max_decrement = */ TRUE, + /* size_t max_decrement = */ (1 * 1024 * 1024 - 1), + /* int epochs_before_eviction = */ 4, + /* hbool_t apply_empty_reserve = */ TRUE, + /* double empty_reserve = */ 0.05, + /* int dirty_bytes_threshold = */ (256 * 1024) }; H5AC2_cache_config_t mod_config_2 = { - /* int version = */ H5C2__CURR_AUTO_SIZE_CTL_VER, - /* hbool_t rpt_fcn_enabled = */ TRUE, - /* hbool_t open_trace_file = */ FALSE, - /* hbool_t close_trace_file = */ FALSE, - /* char trace_file_name[] = */ "", - /* hbool_t evictions_enabled = */ TRUE, - /* hbool_t set_initial_size = */ TRUE, - /* size_t initial_size = */ (512 * 1024), - /* double min_clean_fraction = */ 0.1, - /* size_t max_size = */ ( 8 * 1024 * 1024), - /* size_t min_size = */ ( 512 * 1024), - /* long int epoch_length = */ 25000, + /* int version = */ H5C2__CURR_AUTO_SIZE_CTL_VER, + /* hbool_t rpt_fcn_enabled = */ TRUE, + /* hbool_t open_trace_file = */ FALSE, + /* hbool_t close_trace_file = */ FALSE, + /* char trace_file_name[] = */ "", + /* hbool_t evictions_enabled = */ TRUE, + /* hbool_t set_initial_size = */ TRUE, + /* size_t initial_size = */ (512 * 1024), + /* double min_clean_fraction = */ 0.1, + /* size_t max_size = */ ( 8 * 1024 * 1024), + /* size_t min_size = */ ( 512 * 1024), + /* long int epoch_length = */ 25000, /* enum H5C2_cache_incr_mode incr_mode = */ H5C2_incr__threshold, - /* double lower_hr_threshold = */ 0.9, - /* double increment = */ 2.0, - /* hbool_t apply_max_increment = */ TRUE, - /* size_t max_increment = */ (2 * 1024 * 1024), + /* double lower_hr_threshold = */ 0.9, + /* double increment = */ 2.0, + /* hbool_t apply_max_increment = */ TRUE, + /* size_t max_increment = */ (2 * 1024 * 1024), /* enum H5C2_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C2_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* flash_incr_mode = */ H5C2_flash_incr__off, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C2_cache_decr_mode decr_mode = */ H5C2_decr__threshold, - /* double upper_hr_threshold = */ 0.9995, - /* double decrement = */ 0.95, - /* hbool_t apply_max_decrement = */ TRUE, - /* size_t max_decrement = */ (512 * 1024), - /* int epochs_before_eviction = */ 4, - /* hbool_t apply_empty_reserve = */ TRUE, - /* double empty_reserve = */ 0.05, - /* int dirty_bytes_threshold = */ (256 * 1024) + /* double upper_hr_threshold = */ 0.9995, + /* double decrement = */ 0.95, + /* hbool_t apply_max_decrement = */ TRUE, + /* size_t max_decrement = */ (512 * 1024), + /* int epochs_before_eviction = */ 4, + /* hbool_t apply_empty_reserve = */ TRUE, + /* double empty_reserve = */ 0.05, + /* int dirty_bytes_threshold = */ (256 * 1024) }; H5AC2_cache_config_t mod_config_3 = { - /* int version = */ H5C2__CURR_AUTO_SIZE_CTL_VER, - /* hbool_t rpt_fcn_enabled = */ FALSE, - /* hbool_t open_trace_file = */ FALSE, - /* hbool_t close_trace_file = */ FALSE, - /* char trace_file_name[] = */ "", - /* hbool_t evictions_enabled = */ TRUE, - /* hbool_t set_initial_size = */ TRUE, - /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.2, - /* size_t max_size = */ (16 * 1024 * 1024), - /* size_t min_size = */ ( 1 * 1024 * 1024), - /* long int epoch_length = */ 50000, + /* int version = */ H5C2__CURR_AUTO_SIZE_CTL_VER, + /* hbool_t rpt_fcn_enabled = */ FALSE, + /* hbool_t open_trace_file = */ FALSE, + /* hbool_t close_trace_file = */ FALSE, + /* char trace_file_name[] = */ "", + /* hbool_t evictions_enabled = */ TRUE, + /* hbool_t set_initial_size = */ TRUE, + /* size_t initial_size = */ (1 * 1024 * 1024), + /* double min_clean_fraction = */ 0.2, + /* size_t max_size = */ (16 * 1024 * 1024), + /* size_t min_size = */ ( 1 * 1024 * 1024), + /* long int epoch_length = */ 50000, /* enum H5C2_cache_incr_mode incr_mode = */ H5C2_incr__off, - /* double lower_hr_threshold = */ 0.90, - /* double increment = */ 2.0, - /* hbool_t apply_max_increment = */ TRUE, - /* size_t max_increment = */ (4 * 1024 * 1024), + /* double lower_hr_threshold = */ 0.90, + /* double increment = */ 2.0, + /* hbool_t apply_max_increment = */ TRUE, + /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C2_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C2_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* flash_incr_mode = */ H5C2_flash_incr__off, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C2_cache_decr_mode decr_mode = */ H5C2_decr__off, - /* double upper_hr_threshold = */ 0.999, - /* double decrement = */ 0.9, - /* hbool_t apply_max_decrement = */ FALSE, - /* size_t max_decrement = */ (1 * 1024 * 1024 - 1), - /* int epochs_before_eviction = */ 3, - /* hbool_t apply_empty_reserve = */ FALSE, - /* double empty_reserve = */ 0.05, - /* int dirty_bytes_threshold = */ (256 * 1024) + /* double upper_hr_threshold = */ 0.999, + /* double decrement = */ 0.9, + /* hbool_t apply_max_decrement = */ FALSE, + /* size_t max_decrement = */ (1 * 1024 * 1024 - 1), + /* int epochs_before_eviction = */ 3, + /* hbool_t apply_empty_reserve = */ FALSE, + /* double empty_reserve = */ 0.05, + /* int dirty_bytes_threshold = */ (256 * 1024) }; H5AC2_cache_config_t mod_config_4 = { - /* int version = */ H5C2__CURR_AUTO_SIZE_CTL_VER, - /* hbool_t rpt_fcn_enabled = */ FALSE, - /* hbool_t open_trace_file = */ FALSE, - /* hbool_t close_trace_file = */ FALSE, - /* char trace_file_name[] = */ "", - /* hbool_t evictions_enabled = */ TRUE, - /* hbool_t set_initial_size = */ TRUE, - /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.15, - /* size_t max_size = */ (20 * 1024 * 1024), - /* size_t min_size = */ ( 1 * 1024 * 1024), - /* long int epoch_length = */ 75000, + /* int version = */ H5C2__CURR_AUTO_SIZE_CTL_VER, + /* hbool_t rpt_fcn_enabled = */ FALSE, + /* hbool_t open_trace_file = */ FALSE, + /* hbool_t close_trace_file = */ FALSE, + /* char trace_file_name[] = */ "", + /* hbool_t evictions_enabled = */ TRUE, + /* hbool_t set_initial_size = */ TRUE, + /* size_t initial_size = */ (1 * 1024 * 1024), + /* double min_clean_fraction = */ 0.15, + /* size_t max_size = */ (20 * 1024 * 1024), + /* size_t min_size = */ ( 1 * 1024 * 1024), + /* long int epoch_length = */ 75000, /* enum H5C2_cache_incr_mode incr_mode = */ H5C2_incr__threshold, - /* double lower_hr_threshold = */ 0.9, - /* double increment = */ 2.0, - /* hbool_t apply_max_increment = */ TRUE, - /* size_t max_increment = */ (2 * 1024 * 1024), + /* double lower_hr_threshold = */ 0.9, + /* double increment = */ 2.0, + /* hbool_t apply_max_increment = */ TRUE, + /* size_t max_increment = */ (2 * 1024 * 1024), /* enum H5C2_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C2_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* flash_incr_mode = */ H5C2_flash_incr__off, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C2_cache_decr_mode decr_mode = */ H5C2_decr__age_out_with_threshold, - /* double upper_hr_threshold = */ 0.999, - /* double decrement = */ 0.9, - /* hbool_t apply_max_decrement = */ TRUE, - /* size_t max_decrement = */ (1 * 1024 * 1024), - /* int epochs_before_eviction = */ 3, - /* hbool_t apply_empty_reserve = */ TRUE, - /* double empty_reserve = */ 0.1, - /* int dirty_bytes_threshold = */ (256 * 1024) + /* double upper_hr_threshold = */ 0.999, + /* double decrement = */ 0.9, + /* hbool_t apply_max_decrement = */ TRUE, + /* size_t max_decrement = */ (1 * 1024 * 1024), + /* int epochs_before_eviction = */ 3, + /* hbool_t apply_empty_reserve = */ TRUE, + /* double empty_reserve = */ 0.1, + /* int dirty_bytes_threshold = */ (256 * 1024) }; TESTING("MDC/FILE related API calls"); @@ -763,8 +762,7 @@ check_file_mdc_api_calls(void) /* set alternate config 1 */ if ( pass2 ) { - if ( H5Fset_mdc_config(file_id, (H5AC_cache_config_t *)&mod_config_1) - < 0 ) { + if ( H5Fset_mdc_config(file_id, (H5AC_cache_config_t *)&mod_config_1) < 0 ) { pass2 = FALSE; failure_mssg2 = "H5Fset_mdc_config() failed 1.\n"; @@ -777,8 +775,7 @@ check_file_mdc_api_calls(void) /* set alternate config 2 */ if ( pass2 ) { - if ( H5Fset_mdc_config(file_id, (H5AC_cache_config_t *)&mod_config_2) - < 0 ) { + if ( H5Fset_mdc_config(file_id, (H5AC_cache_config_t *)&mod_config_2) < 0 ) { pass2 = FALSE; failure_mssg2 = "H5Fset_mdc_config() failed 2.\n"; @@ -791,8 +788,7 @@ check_file_mdc_api_calls(void) /* set alternate config 3 */ if ( pass2 ) { - if ( H5Fset_mdc_config(file_id, (H5AC_cache_config_t *)&mod_config_3) - < 0 ) { + if ( H5Fset_mdc_config(file_id, (H5AC_cache_config_t *)&mod_config_3) < 0 ) { pass2 = FALSE; failure_mssg2 = "H5Fset_mdc_config() failed 3.\n"; @@ -805,8 +801,7 @@ check_file_mdc_api_calls(void) /* set alternate config 4 */ if ( pass2 ) { - if ( H5Fset_mdc_config(file_id, (H5AC_cache_config_t *)&mod_config_4) - < 0 ) { + if ( H5Fset_mdc_config(file_id, (H5AC_cache_config_t *)&mod_config_4) < 0 ) { pass2 = FALSE; failure_mssg2 = "H5Fset_mdc_config() failed 4.\n"; @@ -952,102 +947,102 @@ mdc_api_call_smoke_check(void) H5AC2_cache_config_t default_config = H5AC2__DEFAULT_CACHE_CONFIG; H5AC2_cache_config_t mod_config_1 = { - /* int version = */ H5C2__CURR_AUTO_SIZE_CTL_VER, - /* hbool_t rpt_fcn_enabled = */ FALSE, - /* hbool_t open_trace_file = */ FALSE, - /* hbool_t close_trace_file = */ FALSE, - /* char trace_file_name[] = */ "", - /* hbool_t evictions_enabled = */ TRUE, - /* hbool_t set_initial_size = */ TRUE, - /* size_t initial_size = */ 500000, - /* double min_clean_fraction = */ 0.1, - /* size_t max_size = */ 16000000, - /* size_t min_size = */ 250000, - /* long int epoch_length = */ 50000, + /* int version = */ H5C2__CURR_AUTO_SIZE_CTL_VER, + /* hbool_t rpt_fcn_enabled = */ FALSE, + /* hbool_t open_trace_file = */ FALSE, + /* hbool_t close_trace_file = */ FALSE, + /* char trace_file_name[] = */ "", + /* hbool_t evictions_enabled = */ TRUE, + /* hbool_t set_initial_size = */ TRUE, + /* size_t initial_size = */ 500000, + /* double min_clean_fraction = */ 0.1, + /* size_t max_size = */ 16000000, + /* size_t min_size = */ 250000, + /* long int epoch_length = */ 50000, /* enum H5C2_cache_incr_mode incr_mode = */ H5C2_incr__off, - /* double lower_hr_threshold = */ 0.95, - /* double increment = */ 2.0, - /* hbool_t apply_max_increment = */ FALSE, - /* size_t max_increment = */ 4000000, + /* double lower_hr_threshold = */ 0.95, + /* double increment = */ 2.0, + /* hbool_t apply_max_increment = */ FALSE, + /* size_t max_increment = */ 4000000, /* enum H5C2_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C2_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* flash_incr_mode = */ H5C2_flash_incr__off, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C2_cache_decr_mode decr_mode = */ H5C2_decr__off, - /* double upper_hr_threshold = */ 0.999, - /* double decrement = */ 0.9, - /* hbool_t apply_max_decrement = */ FALSE, - /* size_t max_decrement = */ 1000000, - /* int epochs_before_eviction = */ 2, - /* hbool_t apply_empty_reserve = */ TRUE, - /* double empty_reserve = */ 0.05, - /* int dirty_bytes_threshold = */ (256 * 1024) + /* double upper_hr_threshold = */ 0.999, + /* double decrement = */ 0.9, + /* hbool_t apply_max_decrement = */ FALSE, + /* size_t max_decrement = */ 1000000, + /* int epochs_before_eviction = */ 2, + /* hbool_t apply_empty_reserve = */ TRUE, + /* double empty_reserve = */ 0.05, + /* int dirty_bytes_threshold = */ (256 * 1024) }; H5AC2_cache_config_t mod_config_2 = { - /* int version = */ H5C2__CURR_AUTO_SIZE_CTL_VER, - /* hbool_t rpt_fcn_enabled = */ FALSE, - /* hbool_t open_trace_file = */ FALSE, - /* hbool_t close_trace_file = */ FALSE, - /* char trace_file_name[] = */ "", - /* hbool_t evictions_enabled = */ TRUE, - /* hbool_t set_initial_size = */ TRUE, - /* size_t initial_size = */ 12000000, - /* double min_clean_fraction = */ 0.1, - /* size_t max_size = */ 16000000, - /* size_t min_size = */ 250000, - /* long int epoch_length = */ 50000, + /* int version = */ H5C2__CURR_AUTO_SIZE_CTL_VER, + /* hbool_t rpt_fcn_enabled = */ FALSE, + /* hbool_t open_trace_file = */ FALSE, + /* hbool_t close_trace_file = */ FALSE, + /* char trace_file_name[] = */ "", + /* hbool_t evictions_enabled = */ TRUE, + /* hbool_t set_initial_size = */ TRUE, + /* size_t initial_size = */ 12000000, + /* double min_clean_fraction = */ 0.1, + /* size_t max_size = */ 16000000, + /* size_t min_size = */ 250000, + /* long int epoch_length = */ 50000, /* enum H5C2_cache_incr_mode incr_mode = */ H5C2_incr__off, - /* double lower_hr_threshold = */ 0.95, - /* double increment = */ 2.0, - /* hbool_t apply_max_increment = */ FALSE, - /* size_t max_increment = */ 4000000, + /* double lower_hr_threshold = */ 0.95, + /* double increment = */ 2.0, + /* hbool_t apply_max_increment = */ FALSE, + /* size_t max_increment = */ 4000000, /* enum H5C2_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C2_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* flash_incr_mode = */ H5C2_flash_incr__off, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C2_cache_decr_mode decr_mode = */ H5C2_decr__off, - /* double upper_hr_threshold = */ 0.999, - /* double decrement = */ 0.9, - /* hbool_t apply_max_decrement = */ FALSE, - /* size_t max_decrement = */ 1000000, - /* int epochs_before_eviction = */ 2, - /* hbool_t apply_empty_reserve = */ TRUE, - /* double empty_reserve = */ 0.05, - /* int dirty_bytes_threshold = */ (256 * 1024) + /* double upper_hr_threshold = */ 0.999, + /* double decrement = */ 0.9, + /* hbool_t apply_max_decrement = */ FALSE, + /* size_t max_decrement = */ 1000000, + /* int epochs_before_eviction = */ 2, + /* hbool_t apply_empty_reserve = */ TRUE, + /* double empty_reserve = */ 0.05, + /* int dirty_bytes_threshold = */ (256 * 1024) }; H5AC2_cache_config_t mod_config_3 = { - /* int version = */ H5C2__CURR_AUTO_SIZE_CTL_VER, - /* hbool_t rpt_fcn_enabled = */ FALSE, - /* hbool_t open_trace_file = */ FALSE, - /* hbool_t close_trace_file = */ FALSE, - /* char trace_file_name[] = */ "", - /* hbool_t evictions_enabled = */ TRUE, - /* hbool_t set_initial_size = */ TRUE, - /* size_t initial_size = */ 2000000, - /* double min_clean_fraction = */ 0.1, - /* size_t max_size = */ 16000000, - /* size_t min_size = */ 250000, - /* long int epoch_length = */ 50000, + /* int version = */ H5C2__CURR_AUTO_SIZE_CTL_VER, + /* hbool_t rpt_fcn_enabled = */ FALSE, + /* hbool_t open_trace_file = */ FALSE, + /* hbool_t close_trace_file = */ FALSE, + /* char trace_file_name[] = */ "", + /* hbool_t evictions_enabled = */ TRUE, + /* hbool_t set_initial_size = */ TRUE, + /* size_t initial_size = */ 2000000, + /* double min_clean_fraction = */ 0.1, + /* size_t max_size = */ 16000000, + /* size_t min_size = */ 250000, + /* long int epoch_length = */ 50000, /* enum H5C2_cache_incr_mode incr_mode = */ H5C2_incr__off, - /* double lower_hr_threshold = */ 0.95, - /* double increment = */ 2.0, - /* hbool_t apply_max_increment = */ FALSE, - /* size_t max_increment = */ 4000000, + /* double lower_hr_threshold = */ 0.95, + /* double increment = */ 2.0, + /* hbool_t apply_max_increment = */ FALSE, + /* size_t max_increment = */ 4000000, /* enum H5C2_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C2_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* flash_incr_mode = */ H5C2_flash_incr__off, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C2_cache_decr_mode decr_mode = */ H5C2_decr__off, - /* double upper_hr_threshold = */ 0.999, - /* double decrement = */ 0.9, - /* hbool_t apply_max_decrement = */ FALSE, - /* size_t max_decrement = */ 1000000, - /* int epochs_before_eviction = */ 2, - /* hbool_t apply_empty_reserve = */ TRUE, - /* double empty_reserve = */ 0.05, - /* int dirty_bytes_threshold = */ (256 * 1024) + /* double upper_hr_threshold = */ 0.999, + /* double decrement = */ 0.9, + /* hbool_t apply_max_decrement = */ FALSE, + /* size_t max_decrement = */ 1000000, + /* int epochs_before_eviction = */ 2, + /* hbool_t apply_empty_reserve = */ TRUE, + /* double empty_reserve = */ 0.05, + /* int dirty_bytes_threshold = */ (256 * 1024) }; TESTING("MDC API smoke check"); @@ -1494,8 +1489,7 @@ mdc_api_call_smoke_check(void) /* set alternate config 3 */ if ( pass2 ) { - if ( H5Fset_mdc_config(file_id, (H5AC_cache_config_t *)&mod_config_3) - < 0 ) { + if ( H5Fset_mdc_config(file_id, (H5AC_cache_config_t *)&mod_config_3) < 0 ) { pass2 = FALSE; failure_mssg2 = "H5Fset_mdc_config() failed 3.\n"; @@ -1724,9 +1718,9 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C2_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C2_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* flash_incr_mode = */ H5C2_flash_incr__off, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C2_cache_decr_mode decr_mode = */ H5C2_decr__age_out_with_threshold, /* double upper_hr_threshold = */ 0.999, /* double decrement = */ 0.9, @@ -1757,9 +1751,9 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C2_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C2_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* flash_incr_mode = */ H5C2_flash_incr__off, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C2_cache_decr_mode decr_mode = */ H5C2_decr__age_out_with_threshold, /* double upper_hr_threshold = */ 0.999, /* double decrement = */ 0.9, @@ -1790,9 +1784,9 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C2_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C2_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* flash_incr_mode = */ H5C2_flash_incr__off, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C2_cache_decr_mode decr_mode = */ H5C2_decr__age_out_with_threshold, /* double upper_hr_threshold = */ 0.999, /* double decrement = */ 0.9, @@ -1823,9 +1817,9 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C2_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C2_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* flash_incr_mode = */ H5C2_flash_incr__off, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C2_cache_decr_mode decr_mode = */ H5C2_decr__age_out_with_threshold, /* double upper_hr_threshold = */ 0.999, /* double decrement = */ 0.9, @@ -1856,9 +1850,9 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C2_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C2_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* flash_incr_mode = */ H5C2_flash_incr__off, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C2_cache_decr_mode decr_mode = */ H5C2_decr__age_out_with_threshold, /* double upper_hr_threshold = */ 0.999, /* double decrement = */ 0.9, @@ -1889,9 +1883,9 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C2_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C2_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* flash_incr_mode = */ H5C2_flash_incr__off, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C2_cache_decr_mode decr_mode = */ H5C2_decr__age_out_with_threshold, /* double upper_hr_threshold = */ 0.999, /* double decrement = */ 0.9, @@ -1922,9 +1916,9 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C2_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C2_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* flash_incr_mode = */ H5C2_flash_incr__off, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C2_cache_decr_mode decr_mode = */ H5C2_decr__age_out_with_threshold, /* double upper_hr_threshold = */ 0.999, /* double decrement = */ 0.9, @@ -1955,9 +1949,9 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C2_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C2_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* flash_incr_mode = */ H5C2_flash_incr__off, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C2_cache_decr_mode decr_mode = */ H5C2_decr__age_out_with_threshold, /* double upper_hr_threshold = */ 0.999, /* double decrement = */ 0.9, @@ -1988,9 +1982,9 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C2_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C2_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* flash_incr_mode = */ H5C2_flash_incr__off, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C2_cache_decr_mode decr_mode = */ H5C2_decr__age_out_with_threshold, /* double upper_hr_threshold = */ 0.999, /* double decrement = */ 0.9, @@ -2021,9 +2015,9 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C2_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C2_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* flash_incr_mode = */ H5C2_flash_incr__off, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C2_cache_decr_mode decr_mode = */ H5C2_decr__age_out_with_threshold, /* double upper_hr_threshold = */ 0.999, /* double decrement = */ 0.9, @@ -2054,9 +2048,9 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C2_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C2_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* flash_incr_mode = */ H5C2_flash_incr__off, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C2_cache_decr_mode decr_mode = */ H5C2_decr__age_out_with_threshold, /* double upper_hr_threshold = */ 0.999, /* double decrement = */ 0.9, @@ -2087,9 +2081,9 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C2_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C2_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* flash_incr_mode = */ H5C2_flash_incr__off, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C2_cache_decr_mode decr_mode = */ H5C2_decr__age_out_with_threshold, /* double upper_hr_threshold = */ 0.999, /* double decrement = */ 0.9, @@ -2120,9 +2114,9 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C2_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C2_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* flash_incr_mode = */ H5C2_flash_incr__off, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C2_cache_decr_mode decr_mode = */ H5C2_decr__age_out_with_threshold, /* double upper_hr_threshold = */ 0.999, /* double decrement = */ 0.9, @@ -2153,9 +2147,9 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C2_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C2_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* flash_incr_mode = */ H5C2_flash_incr__off, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C2_cache_decr_mode decr_mode = */ H5C2_decr__age_out_with_threshold, /* double upper_hr_threshold = */ 0.999, /* double decrement = */ 0.9, @@ -2186,9 +2180,9 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C2_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C2_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* flash_incr_mode = */ H5C2_flash_incr__off, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C2_cache_decr_mode decr_mode = */ H5C2_decr__age_out_with_threshold, /* double upper_hr_threshold = */ 0.999, /* double decrement = */ 0.9, @@ -2219,9 +2213,9 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C2_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C2_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* flash_incr_mode = */ H5C2_flash_incr__off, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C2_cache_decr_mode decr_mode = */ H5C2_decr__age_out_with_threshold, /* double upper_hr_threshold = */ 0.999, /* double decrement = */ 0.9, @@ -2252,9 +2246,9 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C2_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C2_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* flash_incr_mode = */ H5C2_flash_incr__off, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C2_cache_decr_mode decr_mode = */ H5C2_decr__age_out_with_threshold, /* double upper_hr_threshold = */ 0.999, /* double decrement = */ 0.9, @@ -2285,9 +2279,9 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C2_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C2_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* flash_incr_mode = */ H5C2_flash_incr__off, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C2_cache_decr_mode decr_mode = */ H5C2_decr__age_out_with_threshold, /* double upper_hr_threshold = */ 0.999, /* double decrement = */ 0.9, @@ -2318,9 +2312,9 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C2_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C2_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* flash_incr_mode = */ H5C2_flash_incr__off, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C2_cache_decr_mode decr_mode = */ H5C2_decr__age_out_with_threshold, /* double upper_hr_threshold = */ 0.999, /* double decrement = */ 0.9, @@ -2351,9 +2345,9 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t apply_max_increment = */ (hbool_t)-1, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C2_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C2_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* flash_incr_mode = */ H5C2_flash_incr__off, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C2_cache_decr_mode decr_mode = */ H5C2_decr__age_out_with_threshold, /* double upper_hr_threshold = */ 0.999, /* double decrement = */ 0.9, @@ -2366,7 +2360,7 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = }, { /* 20 -- invalid flash_incr_mode */ - /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER, + /* int version = */ H5C2__CURR_AUTO_SIZE_CTL_VER, /* hbool_t rpt_fcn_enabled = */ FALSE, /* hbool_t open_trace_file = */ FALSE, /* hbool_t close_trace_file = */ FALSE, @@ -2378,7 +2372,7 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* size_t max_size = */ (16 * 1024 * 1024), /* size_t min_size = */ ( 1 * 1024 * 1024), /* long int epoch_length = */ 50000, - /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, + /* enum H5C_cache_incr_mode incr_mode = */ H5C2_incr__threshold, /* double lower_hr_threshold = */ 0.9, /* double increment = */ 2.0, /* hbool_t apply_max_increment = */ TRUE, @@ -2387,7 +2381,7 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* flash_incr_mode = */ -1, /* double flash_multiple = */ 2.0, /* double flash_threshold = */ 0.5, - /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, + /* enum H5C_cache_decr_mode decr_mode = */ H5C2_decr__age_out_with_threshold, /* double upper_hr_threshold = */ 0.999, /* double decrement = */ 0.9, /* hbool_t apply_max_decrement = */ TRUE, @@ -2399,7 +2393,7 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = }, { /* 21 -- flash_multiple too small */ - /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER, + /* int version = */ H5C2__CURR_AUTO_SIZE_CTL_VER, /* hbool_t rpt_fcn_enabled = */ FALSE, /* hbool_t open_trace_file = */ FALSE, /* hbool_t close_trace_file = */ FALSE, @@ -2411,16 +2405,16 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* size_t max_size = */ (16 * 1024 * 1024), /* size_t min_size = */ ( 1 * 1024 * 1024), /* long int epoch_length = */ 50000, - /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, + /* enum H5C_cache_incr_mode incr_mode = */ H5C2_incr__threshold, /* double lower_hr_threshold = */ 0.9, /* double increment = */ 2.0, /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C_flash_incr__add_space, + /* flash_incr_mode = */ H5C2_flash_incr__add_space, /* double flash_multiple = */ 0.09, /* double flash_threshold = */ 0.5, - /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, + /* enum H5C_cache_decr_mode decr_mode = */ H5C2_decr__age_out_with_threshold, /* double upper_hr_threshold = */ 0.999, /* double decrement = */ 0.9, /* hbool_t apply_max_decrement = */ TRUE, @@ -2432,7 +2426,7 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = }, { /* 22 -- flash_multiple too big */ - /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER, + /* int version = */ H5C2__CURR_AUTO_SIZE_CTL_VER, /* hbool_t rpt_fcn_enabled = */ FALSE, /* hbool_t open_trace_file = */ FALSE, /* hbool_t close_trace_file = */ FALSE, @@ -2444,16 +2438,16 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* size_t max_size = */ (16 * 1024 * 1024), /* size_t min_size = */ ( 1 * 1024 * 1024), /* long int epoch_length = */ 50000, - /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, + /* enum H5C_cache_incr_mode incr_mode = */ H5C2_incr__threshold, /* double lower_hr_threshold = */ 0.9, /* double increment = */ 2.0, /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C_flash_incr__add_space, + /* flash_incr_mode = */ H5C2_flash_incr__add_space, /* double flash_multiple = */ 10.001, /* double flash_threshold = */ 0.5, - /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, + /* enum H5C_cache_decr_mode decr_mode = */ H5C2_decr__age_out_with_threshold, /* double upper_hr_threshold = */ 0.999, /* double decrement = */ 0.9, /* hbool_t apply_max_decrement = */ TRUE, @@ -2465,7 +2459,7 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = }, { /* 23 -- flash_threshold too small */ - /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER, + /* int version = */ H5C2__CURR_AUTO_SIZE_CTL_VER, /* hbool_t rpt_fcn_enabled = */ FALSE, /* hbool_t open_trace_file = */ FALSE, /* hbool_t close_trace_file = */ FALSE, @@ -2477,16 +2471,16 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* size_t max_size = */ (16 * 1024 * 1024), /* size_t min_size = */ ( 1 * 1024 * 1024), /* long int epoch_length = */ 50000, - /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, + /* enum H5C_cache_incr_mode incr_mode = */ H5C2_incr__threshold, /* double lower_hr_threshold = */ 0.9, /* double increment = */ 2.0, /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C_flash_incr__add_space, + /* flash_incr_mode = */ H5C2_flash_incr__add_space, /* double flash_multiple = */ 1.0, /* double flash_threshold = */ 0.099, - /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, + /* enum H5C_cache_decr_mode decr_mode = */ H5C2_decr__age_out_with_threshold, /* double upper_hr_threshold = */ 0.999, /* double decrement = */ 0.9, /* hbool_t apply_max_decrement = */ TRUE, @@ -2498,7 +2492,7 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = }, { /* 24 -- flash_threshold too big */ - /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER, + /* int version = */ H5C2__CURR_AUTO_SIZE_CTL_VER, /* hbool_t rpt_fcn_enabled = */ FALSE, /* hbool_t open_trace_file = */ FALSE, /* hbool_t close_trace_file = */ FALSE, @@ -2510,16 +2504,16 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* size_t max_size = */ (16 * 1024 * 1024), /* size_t min_size = */ ( 1 * 1024 * 1024), /* long int epoch_length = */ 50000, - /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, + /* enum H5C_cache_incr_mode incr_mode = */ H5C2_incr__threshold, /* double lower_hr_threshold = */ 0.9, /* double increment = */ 2.0, /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C_flash_incr__add_space, + /* flash_incr_mode = */ H5C2_flash_incr__add_space, /* double flash_multiple = */ 1.0, /* double flash_threshold = */ 1.001, - /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, + /* enum H5C_cache_decr_mode decr_mode = */ H5C2_decr__age_out_with_threshold, /* double upper_hr_threshold = */ 0.999, /* double decrement = */ 0.9, /* hbool_t apply_max_decrement = */ TRUE, @@ -2549,9 +2543,9 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C2_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C2_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* flash_incr_mode = */ H5C2_flash_incr__off, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C2_cache_decr_mode decr_mode = */ -1, /* double upper_hr_threshold = */ 0.999, /* double decrement = */ 0.9, @@ -2582,9 +2576,9 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C2_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C2_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* flash_incr_mode = */ H5C2_flash_incr__off, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C2_cache_decr_mode decr_mode = */ H5C2_decr__threshold, /* double upper_hr_threshold = */ 1.00001, /* double decrement = */ 0.9, @@ -2615,9 +2609,9 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C2_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C2_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* flash_incr_mode = */ H5C2_flash_incr__off, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C2_cache_decr_mode decr_mode = */ H5C2_decr__threshold, /* double upper_hr_threshold = */ 0.999, /* double decrement = */ -0.0000000001, @@ -2648,9 +2642,9 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C2_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C2_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* flash_incr_mode = */ H5C2_flash_incr__off, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C2_cache_decr_mode decr_mode = */ H5C2_decr__threshold, /* double upper_hr_threshold = */ 0.999, /* double decrement = */ 1.0000000001, @@ -2681,9 +2675,9 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C2_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C2_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* flash_incr_mode = */ H5C2_flash_incr__off, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C2_cache_decr_mode decr_mode = */ H5C2_decr__age_out, /* double upper_hr_threshold = */ 0.999, /* double decrement = */ 0.9, @@ -2714,9 +2708,9 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C2_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C2_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* flash_incr_mode = */ H5C2_flash_incr__off, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C2_cache_decr_mode decr_mode = */ H5C2_decr__age_out, /* double upper_hr_threshold = */ 0.999, /* double decrement = */ 0.9, @@ -2747,9 +2741,9 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C2_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C2_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* flash_incr_mode = */ H5C2_flash_incr__off, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C2_cache_decr_mode decr_mode = */ H5C2_decr__age_out_with_threshold, /* double upper_hr_threshold = */ 0.999, /* double decrement = */ 0.9, @@ -2780,9 +2774,9 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C2_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C2_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* flash_incr_mode = */ H5C2_flash_incr__off, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C2_cache_decr_mode decr_mode = */ H5C2_decr__age_out_with_threshold, /* double upper_hr_threshold = */ 0.999, /* double decrement = */ 0.9, @@ -2813,9 +2807,9 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C2_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C2_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* flash_incr_mode = */ H5C2_flash_incr__off, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C2_cache_decr_mode decr_mode = */ H5C2_decr__age_out_with_threshold, /* double upper_hr_threshold = */ 0.999, /* double decrement = */ 0.9, @@ -2846,9 +2840,9 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C2_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C2_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* flash_incr_mode = */ H5C2_flash_incr__off, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C2_cache_decr_mode decr_mode = */ H5C2_decr__age_out_with_threshold, /* double upper_hr_threshold = */ -0.000000001, /* double decrement = */ 0.9, @@ -2879,9 +2873,9 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C2_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C2_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* flash_incr_mode = */ H5C2_flash_incr__off, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C2_cache_decr_mode decr_mode = */ H5C2_decr__age_out_with_threshold, /* double upper_hr_threshold = */ 1.00000001, /* double decrement = */ 0.9, @@ -2912,9 +2906,9 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C2_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C2_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* flash_incr_mode = */ H5C2_flash_incr__off, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C2_cache_decr_mode decr_mode = */ H5C2_decr__age_out_with_threshold, /* double upper_hr_threshold = */ 0.9, /* double decrement = */ 0.9, @@ -2945,9 +2939,9 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C2_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C2_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* flash_incr_mode = */ H5C2_flash_incr__off, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C2_cache_decr_mode decr_mode = */ H5C2_decr__age_out_with_threshold, /* double upper_hr_threshold = */ 0.999, /* double decrement = */ 0.9, @@ -2978,9 +2972,9 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C2_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C2_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* flash_incr_mode = */ H5C2_flash_incr__off, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C2_cache_decr_mode decr_mode = */ H5C2_decr__age_out_with_threshold, /* double upper_hr_threshold = */ 0.9, /* double decrement = */ 0.9, @@ -3011,9 +3005,9 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C2_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C2_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* flash_incr_mode = */ H5C2_flash_incr__off, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C2_cache_decr_mode decr_mode = */ H5C2_decr__off, /* double upper_hr_threshold = */ 0.9, /* double decrement = */ 0.9, @@ -3044,9 +3038,9 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C2_cache_flash_incr_mode */ - /* flash_incr_mode = */ H5C2_flash_incr__off, - /* double flash_multiple = */ 2.0, - /* double flash_threshold = */ 0.5, + /* flash_incr_mode = */ H5C2_flash_incr__off, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C2_cache_decr_mode decr_mode = */ H5C2_decr__age_out, /* double upper_hr_threshold = */ 0.9, /* double decrement = */ 0.9, @@ -3152,8 +3146,7 @@ check_fapl_mdc_api_errs(void) if ( pass2 ) { H5E_BEGIN_TRY { - result = - H5Pget_mdc_config(fapl_id, (H5AC_cache_config_t *)&scratch); + result = H5Pget_mdc_config(fapl_id, (H5AC_cache_config_t *)&scratch); } H5E_END_TRY; if ( result >= 0 ) { @@ -3171,8 +3164,7 @@ check_fapl_mdc_api_errs(void) if ( pass2 ) { H5E_BEGIN_TRY { - result = - H5Pset_mdc_config(-1, (H5AC_cache_config_t *)&default_config); + result = H5Pset_mdc_config(-1, (H5AC_cache_config_t *)&default_config); } H5E_END_TRY; if ( result >= 0 ) { @@ -3199,9 +3191,7 @@ check_fapl_mdc_api_errs(void) while ( ( pass2 ) && ( i < NUM_INVALID_CONFIGS ) ) { H5E_BEGIN_TRY { - result = - H5Pset_mdc_config(fapl_id, - (H5AC_cache_config_t *)&(invalid_configs[i])); + result = H5Pset_mdc_config(fapl_id, (H5AC_cache_config_t *)&(invalid_configs[i])); } H5E_END_TRY; if ( result >= 0 ) { @@ -3219,8 +3209,7 @@ check_fapl_mdc_api_errs(void) */ scratch.version = H5C2__CURR_AUTO_SIZE_CTL_VER; if ( ( pass2 ) && - ( ( H5Pget_mdc_config(fapl_id, (H5AC_cache_config_t *)&scratch) < 0 ) - || + ( ( H5Pget_mdc_config(fapl_id, (H5AC_cache_config_t *)&scratch) < 0 ) || ( !CACHE_CONFIGS_EQUAL(default_config, scratch, TRUE, TRUE) ) ) ) { pass2 = FALSE; @@ -3364,8 +3353,7 @@ check_file_mdc_api_errs(void) } H5E_BEGIN_TRY { - result = H5Fget_mdc_config(file_id, - (H5AC_cache_config_t *)&scratch); + result = H5Fget_mdc_config(file_id, (H5AC_cache_config_t *)&scratch); } H5E_END_TRY; if ( result >= 0 ) { @@ -3387,8 +3375,7 @@ check_file_mdc_api_errs(void) } H5E_BEGIN_TRY { - result = H5Fset_mdc_config(-1, - (H5AC_cache_config_t *)&default_config); + result = H5Fset_mdc_config(-1, (H5AC_cache_config_t *)&default_config); } H5E_END_TRY; if ( result >= 0 ) { @@ -3428,8 +3415,7 @@ check_file_mdc_api_errs(void) H5E_BEGIN_TRY { result = - H5Fset_mdc_config(file_id, - (H5AC_cache_config_t *)&(invalid_configs[i])); + H5Fset_mdc_config(file_id, (H5AC_cache_config_t *)&(invalid_configs[i])); } H5E_END_TRY; if ( result >= 0 ) { diff --git a/test/cache2_common.c b/test/cache2_common.c index 0dcebfc..fa1e9d7 100644 --- a/test/cache2_common.c +++ b/test/cache2_common.c @@ -271,14 +271,9 @@ const H5C2_class_t types2[NUMBER_OF_ENTRY_TYPES] = } }; -static herr_t clear_dirty_bits(haddr_t addr, - size_t len, - void * thing); - static void * deserialize(haddr_t addr, size_t len, const void * image_ptr, - const void * udata_ptr, hbool_t * dirty_ptr); static herr_t image_len(void *thing, @@ -293,13 +288,13 @@ static herr_t serialize(haddr_t addr, size_t * new_len_ptr, void ** new_image_ptr_ptr); -static herr_t free_icr(haddr_t addr, - size_t len, - void * thing); +static herr_t free_icr(test_entry_t *entry_ptr); + +static herr_t clear_dirty_bits(test_entry_t *entry_ptr); - /* address translation funtions: */ + /*------------------------------------------------------------------------- * Function: addr_to_type_and_index2 * @@ -311,16 +306,12 @@ static herr_t free_icr(haddr_t addr, * Programmer: John Mainzer * 6/10/04 * - * Modifications: - * - * None. - * *------------------------------------------------------------------------- */ void addr_to_type_and_index2(haddr_t addr, - int32_t * type_ptr, - int32_t * index_ptr) + int32_t * type_ptr, + int32_t * index_ptr) { int i; int32_t type; @@ -379,56 +370,9 @@ addr_to_type_and_index2(haddr_t addr, } /* addr_to_type_and_index2() */ - -#if 0 /* This function has never been used, but we may want it - * some time. Lets keep it for now. - */ -/*------------------------------------------------------------------------- - * Function: type_and_index_to_addr2 - * - * Purpose: Given a type and index of an entry, compute the associated - * addr and return that value. - * - * Return: computed addr - * - * Programmer: John Mainzer - * 6/10/04 - * - * Modifications: - * - *------------------------------------------------------------------------- - */ -haddr_t -type_and_index_to_addr2(int32_t type, - int32_t idx) -{ - haddr_t addr; - - HDassert( ( type >= 0 ) && ( type < NUMBER_OF_ENTRY_TYPES ) ); - HDassert( ( idx >= 0 ) && ( idx <= max_indices2[type] ) ); - - addr = base_addrs2[type] + (((haddr_t)idx) * entry_sizes2[type]); - - HDassert( addr == (entries2[type])[idx].addr ); - - if ( (entries2[type])[idx].at_main_addr ) { - - HDassert( addr == (entries2[type])[idx].main_addr ); - - } else { - - HDassert( addr == (entries2[type])[idx].alt_addr ); - } - - return(addr); - -} /* type_and_index_to_addr2() */ - -#endif - - /* Call back functions: */ + /*------------------------------------------------------------------------- * * Function: check_if_write_permitted2 @@ -446,17 +390,13 @@ type_and_index_to_addr2(int32_t type, * * Programmer: John Mainzer, 5/15/04 * - * Modifications: - * - * None. - * *------------------------------------------------------------------------- */ herr_t check_write_permitted2(const H5F_t UNUSED * f, - hid_t UNUSED dxpl_id, - hbool_t * write_permitted_ptr) + hid_t UNUSED dxpl_id, + hbool_t * write_permitted_ptr) { HDassert( write_permitted_ptr ); @@ -468,149 +408,6 @@ check_write_permitted2(const H5F_t UNUSED * f, /*------------------------------------------------------------------------- - * Function: clear_dirty_bits & friends - * - * Purpose: Clear the dirty bits. The helper functions verify that the - * correct version of clear_dirty_gits is being called, and - * then call clear_dirty_bits() proper. - * - * Return: SUCCEED - * - * Programmer: John Mainzer - * 9/20/07 - * - * Modifications: - * - * None - * - *------------------------------------------------------------------------- - */ - -herr_t -clear_dirty_bits(haddr_t addr, - size_t len, - void * thing) -{ - test_entry_t * entry_ptr; - test_entry_t * base_addr; - - HDassert( thing ); - - entry_ptr = (test_entry_t *)thing; - base_addr = entries2[entry_ptr->type]; - - HDassert( entry_ptr->addr == addr ); - HDassert( entry_ptr->size == len ); - - HDassert( entry_ptr->index >= 0 ); - HDassert( entry_ptr->index <= max_indices2[entry_ptr->type] ); - HDassert( entry_ptr == &(base_addr[entry_ptr->index]) ); - HDassert( entry_ptr == entry_ptr->self ); - HDassert( entry_ptr->header.addr == entry_ptr->addr ); - HDassert( entry_ptr->header.size == entry_ptr->size ); - HDassert( ( entry_ptr->type == VARIABLE_ENTRY_TYPE ) || - ( entry_ptr->size == entry_sizes2[entry_ptr->type] ) ); - - entry_ptr->is_dirty = FALSE; - - entry_ptr->cleared = TRUE; - - return(SUCCEED); - -} /* clear_dirty_bits() */ - -herr_t -pico_clear_dirty_bits(haddr_t addr, - size_t len, - void * thing) -{ - HDassert( ((test_entry_t *)thing)->type == PICO_ENTRY_TYPE ); - return(clear_dirty_bits(addr, len, thing)); -} - -herr_t -nano_clear_dirty_bits(haddr_t addr, - size_t len, - void * thing) -{ - HDassert( ((test_entry_t *)thing)->type == NANO_ENTRY_TYPE ); - return(clear_dirty_bits(addr, len, thing)); -} - -herr_t -micro_clear_dirty_bits(haddr_t addr, - size_t len, - void * thing) -{ - HDassert( ((test_entry_t *)thing)->type == MICRO_ENTRY_TYPE ); - return(clear_dirty_bits(addr, len, thing)); -} - -herr_t -tiny_clear_dirty_bits(haddr_t addr, - size_t len, - void * thing) -{ - HDassert( ((test_entry_t *)thing)->type == TINY_ENTRY_TYPE ); - return(clear_dirty_bits(addr, len, thing)); -} - -herr_t -small_clear_dirty_bits(haddr_t addr, - size_t len, - void * thing) -{ - HDassert( ((test_entry_t *)thing)->type == SMALL_ENTRY_TYPE ); - return(clear_dirty_bits(addr, len, thing)); -} - -herr_t -medium_clear_dirty_bits(haddr_t addr, - size_t len, - void * thing) -{ - HDassert( ((test_entry_t *)thing)->type == MEDIUM_ENTRY_TYPE ); - return(clear_dirty_bits(addr, len, thing)); -} - -herr_t -large_clear_dirty_bits(haddr_t addr, - size_t len, - void * thing) -{ - HDassert( ((test_entry_t *)thing)->type == LARGE_ENTRY_TYPE ); - return(clear_dirty_bits(addr, len, thing)); -} - -herr_t -huge_clear_dirty_bits(haddr_t addr, - size_t len, - void * thing) -{ - HDassert( ((test_entry_t *)thing)->type == HUGE_ENTRY_TYPE ); - return(clear_dirty_bits(addr, len, thing)); -} - -herr_t -monster_clear_dirty_bits(haddr_t addr, - size_t len, - void * thing) -{ - HDassert( ((test_entry_t *)thing)->type == MONSTER_ENTRY_TYPE ); - return(clear_dirty_bits(addr, len, thing)); -} - -herr_t -variable_clear_dirty_bits(haddr_t addr, - size_t len, - void * thing) -{ - HDassert( ((test_entry_t *)thing)->type == VARIABLE_ENTRY_TYPE ); - return(clear_dirty_bits(addr, len, thing)); -} - - -/*------------------------------------------------------------------------- * Function: deserialize & friends * * Purpose: deserialize the entry. The helper functions verify that the @@ -622,19 +419,11 @@ variable_clear_dirty_bits(haddr_t addr, * Programmer: John Mainzer * 9/20/07 * - * Modifications: - * - * None - * *------------------------------------------------------------------------- */ -void * -deserialize(haddr_t addr, - size_t len, - const void * image_ptr, - const UNUSED void * udata_ptr, - hbool_t * dirty_ptr) +static void * +deserialize(haddr_t addr, size_t len, const void * image_ptr, hbool_t * dirty_ptr) { int32_t type; int32_t idx; @@ -723,103 +512,73 @@ deserialize(haddr_t addr, } /* deserialize() */ void * -pico_deserialize(haddr_t addr, - size_t len, - const void * image_ptr, - const UNUSED void * udata_ptr, - hbool_t * dirty_ptr) +pico_deserialize(haddr_t addr, size_t len, const void * image_ptr, + const UNUSED void * udata_ptr, hbool_t * dirty_ptr) { - return deserialize(addr, len, image_ptr, udata_ptr, dirty_ptr); + return deserialize(addr, len, image_ptr, dirty_ptr); } void * -nano_deserialize(haddr_t addr, - size_t len, - const void * image_ptr, - const UNUSED void * udata_ptr, - hbool_t * dirty_ptr) +nano_deserialize(haddr_t addr, size_t len, const void * image_ptr, + const UNUSED void * udata_ptr, hbool_t * dirty_ptr) { - return deserialize(addr, len, image_ptr, udata_ptr, dirty_ptr); + return deserialize(addr, len, image_ptr, dirty_ptr); } void * -micro_deserialize(haddr_t addr, - size_t len, - const void * image_ptr, - const UNUSED void * udata_ptr, - hbool_t * dirty_ptr) +micro_deserialize(haddr_t addr, size_t len, const void * image_ptr, + const UNUSED void * udata_ptr, hbool_t * dirty_ptr) { - return deserialize(addr, len, image_ptr, udata_ptr, dirty_ptr); + return deserialize(addr, len, image_ptr, dirty_ptr); } void * -tiny_deserialize(haddr_t addr, - size_t len, - const void * image_ptr, - const UNUSED void * udata_ptr, - hbool_t * dirty_ptr) +tiny_deserialize(haddr_t addr, size_t len, const void * image_ptr, + const UNUSED void * udata_ptr, hbool_t * dirty_ptr) { - return deserialize(addr, len, image_ptr, udata_ptr, dirty_ptr); + return deserialize(addr, len, image_ptr, dirty_ptr); } void * -small_deserialize(haddr_t addr, - size_t len, - const void * image_ptr, - const UNUSED void * udata_ptr, - hbool_t * dirty_ptr) +small_deserialize(haddr_t addr, size_t len, const void * image_ptr, + const UNUSED void * udata_ptr, hbool_t * dirty_ptr) { - return deserialize(addr, len, image_ptr, udata_ptr, dirty_ptr); + return deserialize(addr, len, image_ptr, dirty_ptr); } void * -medium_deserialize(haddr_t addr, - size_t len, - const void * image_ptr, - const UNUSED void * udata_ptr, - hbool_t * dirty_ptr) +medium_deserialize(haddr_t addr, size_t len, const void * image_ptr, + const UNUSED void * udata_ptr, hbool_t * dirty_ptr) { - return deserialize(addr, len, image_ptr, udata_ptr, dirty_ptr); + return deserialize(addr, len, image_ptr, dirty_ptr); } void * -large_deserialize(haddr_t addr, - size_t len, - const void * image_ptr, - const UNUSED void * udata_ptr, - hbool_t * dirty_ptr) +large_deserialize(haddr_t addr, size_t len, const void * image_ptr, + const UNUSED void * udata_ptr, hbool_t * dirty_ptr) { - return deserialize(addr, len, image_ptr, udata_ptr, dirty_ptr); + return deserialize(addr, len, image_ptr, dirty_ptr); } void * -huge_deserialize(haddr_t addr, - size_t len, - const void * image_ptr, - const UNUSED void * udata_ptr, - hbool_t * dirty_ptr) +huge_deserialize(haddr_t addr, size_t len, const void * image_ptr, + const UNUSED void * udata_ptr, hbool_t * dirty_ptr) { - return deserialize(addr, len, image_ptr, udata_ptr, dirty_ptr); + return deserialize(addr, len, image_ptr, dirty_ptr); } void * -monster_deserialize(haddr_t addr, - size_t len, - const void * image_ptr, - const UNUSED void * udata_ptr, - hbool_t * dirty_ptr) +monster_deserialize(haddr_t addr, size_t len, const void * image_ptr, + const UNUSED void * udata_ptr, hbool_t * dirty_ptr) { - return deserialize(addr, len, image_ptr, udata_ptr, dirty_ptr); + return deserialize(addr, len, image_ptr, dirty_ptr); } void * -variable_deserialize(haddr_t addr, - size_t len, - const void * image_ptr, - const UNUSED void * udata_ptr, - hbool_t * dirty_ptr) +variable_deserialize(haddr_t addr, size_t len, const void * image_ptr, + const UNUSED void * udata_ptr, hbool_t * dirty_ptr) { - return deserialize(addr, len, image_ptr, udata_ptr, dirty_ptr); + return deserialize(addr, len, image_ptr, dirty_ptr); } @@ -836,16 +595,11 @@ variable_deserialize(haddr_t addr, * Programmer: John Mainzer * 9/19/07 * - * Modifications: - * - * None. - * *------------------------------------------------------------------------- */ herr_t -image_len(void *thing, - size_t *image_len_ptr) +image_len(void *thing, size_t *image_len_ptr) { int32_t type; int32_t idx; @@ -886,32 +640,28 @@ image_len(void *thing, herr_t -pico_image_len(void *thing, - size_t *image_len_ptr) +pico_image_len(void *thing, size_t *image_len_ptr) { HDassert( ((test_entry_t *)thing)->type == PICO_ENTRY_TYPE ); return(image_len(thing, image_len_ptr)); } herr_t -nano_image_len(void *thing, - size_t *image_len_ptr) +nano_image_len(void *thing, size_t *image_len_ptr) { HDassert( ((test_entry_t *)thing)->type == NANO_ENTRY_TYPE ); return(image_len(thing, image_len_ptr)); } herr_t -micro_image_len(void *thing, - size_t *image_len_ptr) +micro_image_len(void *thing, size_t *image_len_ptr) { HDassert( ((test_entry_t *)thing)->type == MICRO_ENTRY_TYPE ); return(image_len(thing, image_len_ptr)); } herr_t -tiny_image_len(void *thing, - size_t *image_len_ptr) +tiny_image_len(void *thing, size_t *image_len_ptr) { HDassert( ((test_entry_t *)thing)->type == TINY_ENTRY_TYPE ); return(image_len(thing, image_len_ptr)); @@ -919,48 +669,42 @@ tiny_image_len(void *thing, herr_t -small_image_len(void *thing, - size_t *image_len_ptr) +small_image_len(void *thing, size_t *image_len_ptr) { HDassert( ((test_entry_t *)thing)->type == SMALL_ENTRY_TYPE ); return(image_len(thing, image_len_ptr)); } herr_t -medium_image_len(void *thing, - size_t *image_len_ptr) +medium_image_len(void *thing, size_t *image_len_ptr) { HDassert( ((test_entry_t *)thing)->type == MEDIUM_ENTRY_TYPE ); return(image_len(thing, image_len_ptr)); } herr_t -large_image_len(void *thing, - size_t *image_len_ptr) +large_image_len(void *thing, size_t *image_len_ptr) { HDassert( ((test_entry_t *)thing)->type == LARGE_ENTRY_TYPE ); return(image_len(thing, image_len_ptr)); } herr_t -huge_image_len(void *thing, - size_t *image_len_ptr) +huge_image_len(void *thing, size_t *image_len_ptr) { HDassert( ((test_entry_t *)thing)->type == HUGE_ENTRY_TYPE ); return(image_len(thing, image_len_ptr)); } herr_t -monster_image_len(void *thing, - size_t *image_len_ptr) +monster_image_len(void *thing, size_t *image_len_ptr) { HDassert( ((test_entry_t *)thing)->type == MONSTER_ENTRY_TYPE ); return(image_len(thing, image_len_ptr)); } herr_t -variable_image_len(void *thing, - size_t *image_len_ptr) +variable_image_len(void *thing, size_t *image_len_ptr) { HDassert( ((test_entry_t *)thing)->type == VARIABLE_ENTRY_TYPE ); return(image_len(thing, image_len_ptr)); @@ -985,22 +729,13 @@ variable_image_len(void *thing, * Programmer: John Mainzer * 9/19/07 * - * Modifications: - * - * None. - * *------------------------------------------------------------------------- */ herr_t -serialize(haddr_t addr, - size_t len, - void * image_ptr, - void * thing, - unsigned * flags_ptr, - haddr_t * new_addr_ptr, - size_t * new_len_ptr, - void ** new_image_ptr_ptr) +serialize(haddr_t addr, size_t len, void * image_ptr, void * thing, + unsigned * flags_ptr, haddr_t * new_addr_ptr, size_t * new_len_ptr, + void ** new_image_ptr_ptr) { const char * fcn_name = "serialize()"; char * char_ptr; @@ -1120,12 +855,7 @@ serialize(haddr_t addr, } /* null out the image to avoid spurious failures */ - char_ptr = (char *)image_ptr; - for ( i = 0; (size_t)i < len; i++ ) - { - *char_ptr = '\0'; - char_ptr++; - } + HDmemset(image_ptr, 0, len); if ( ( type == PICO_ENTRY_TYPE ) || ( type == VARIABLE_ENTRY_TYPE ) ) { @@ -1167,16 +897,9 @@ serialize(haddr_t addr, } /* serialize() */ herr_t -pico_serialize(const H5F_t UNUSED *f, - hid_t UNUSED dxpl_id, - haddr_t addr, - size_t len, - void * image_ptr, - void * thing, - unsigned * flags_ptr, - haddr_t * new_addr_ptr, - size_t * new_len_ptr, - void ** new_image_ptr_ptr) +pico_serialize(const H5F_t UNUSED *f, hid_t UNUSED dxpl_id, haddr_t addr, + size_t len, void * image_ptr, void * thing, unsigned * flags_ptr, + haddr_t * new_addr_ptr, size_t * new_len_ptr, void ** new_image_ptr_ptr) { HDassert( ((test_entry_t *)thing)->type == PICO_ENTRY_TYPE ); return(serialize(addr, len, image_ptr, thing, flags_ptr, @@ -1184,16 +907,9 @@ pico_serialize(const H5F_t UNUSED *f, } herr_t -nano_serialize(const H5F_t UNUSED *f, - hid_t UNUSED dxpl_id, - haddr_t addr, - size_t len, - void * image_ptr, - void * thing, - unsigned * flags_ptr, - haddr_t * new_addr_ptr, - size_t * new_len_ptr, - void ** new_image_ptr_ptr) +nano_serialize(const H5F_t UNUSED *f, hid_t UNUSED dxpl_id, haddr_t addr, + size_t len, void * image_ptr, void * thing, unsigned * flags_ptr, + haddr_t * new_addr_ptr, size_t * new_len_ptr, void ** new_image_ptr_ptr) { HDassert( ((test_entry_t *)thing)->type == NANO_ENTRY_TYPE ); return(serialize(addr, len, image_ptr, thing, flags_ptr, @@ -1201,16 +917,9 @@ nano_serialize(const H5F_t UNUSED *f, } herr_t -micro_serialize(const H5F_t UNUSED *f, - hid_t UNUSED dxpl_id, - haddr_t addr, - size_t len, - void * image_ptr, - void * thing, - unsigned * flags_ptr, - haddr_t * new_addr_ptr, - size_t * new_len_ptr, - void ** new_image_ptr_ptr) +micro_serialize(const H5F_t UNUSED *f, hid_t UNUSED dxpl_id, haddr_t addr, + size_t len, void * image_ptr, void * thing, unsigned * flags_ptr, + haddr_t * new_addr_ptr, size_t * new_len_ptr, void ** new_image_ptr_ptr) { HDassert( ((test_entry_t *)thing)->type == MICRO_ENTRY_TYPE ); return(serialize(addr, len, image_ptr, thing, flags_ptr, @@ -1218,16 +927,9 @@ micro_serialize(const H5F_t UNUSED *f, } herr_t -tiny_serialize(const H5F_t UNUSED *f, - hid_t UNUSED dxpl_id, - haddr_t addr, - size_t len, - void * image_ptr, - void * thing, - unsigned * flags_ptr, - haddr_t * new_addr_ptr, - size_t * new_len_ptr, - void ** new_image_ptr_ptr) +tiny_serialize(const H5F_t UNUSED *f, hid_t UNUSED dxpl_id, haddr_t addr, + size_t len, void * image_ptr, void * thing, unsigned * flags_ptr, + haddr_t * new_addr_ptr, size_t * new_len_ptr, void ** new_image_ptr_ptr) { HDassert( ((test_entry_t *)thing)->type == TINY_ENTRY_TYPE ); return(serialize(addr, len, image_ptr, thing, flags_ptr, @@ -1235,16 +937,9 @@ tiny_serialize(const H5F_t UNUSED *f, } herr_t -small_serialize(const H5F_t UNUSED *f, - hid_t UNUSED dxpl_id, - haddr_t addr, - size_t len, - void * image_ptr, - void * thing, - unsigned * flags_ptr, - haddr_t * new_addr_ptr, - size_t * new_len_ptr, - void ** new_image_ptr_ptr) +small_serialize(const H5F_t UNUSED *f, hid_t UNUSED dxpl_id, haddr_t addr, + size_t len, void * image_ptr, void * thing, unsigned * flags_ptr, + haddr_t * new_addr_ptr, size_t * new_len_ptr, void ** new_image_ptr_ptr) { HDassert( ((test_entry_t *)thing)->type == SMALL_ENTRY_TYPE ); return(serialize(addr, len, image_ptr, thing, flags_ptr, @@ -1252,16 +947,9 @@ small_serialize(const H5F_t UNUSED *f, } herr_t -medium_serialize(const H5F_t UNUSED *f, - hid_t UNUSED dxpl_id, - haddr_t addr, - size_t len, - void * image_ptr, - void * thing, - unsigned * flags_ptr, - haddr_t * new_addr_ptr, - size_t * new_len_ptr, - void ** new_image_ptr_ptr) +medium_serialize(const H5F_t UNUSED *f, hid_t UNUSED dxpl_id, haddr_t addr, + size_t len, void * image_ptr, void * thing, unsigned * flags_ptr, + haddr_t * new_addr_ptr, size_t * new_len_ptr, void ** new_image_ptr_ptr) { HDassert( ((test_entry_t *)thing)->type == MEDIUM_ENTRY_TYPE ); return(serialize(addr, len, image_ptr, thing, flags_ptr, @@ -1269,16 +957,9 @@ medium_serialize(const H5F_t UNUSED *f, } herr_t -large_serialize(const H5F_t UNUSED *f, - hid_t UNUSED dxpl_id, - haddr_t addr, - size_t len, - void * image_ptr, - void * thing, - unsigned * flags_ptr, - haddr_t * new_addr_ptr, - size_t * new_len_ptr, - void ** new_image_ptr_ptr) +large_serialize(const H5F_t UNUSED *f, hid_t UNUSED dxpl_id, haddr_t addr, + size_t len, void * image_ptr, void * thing, unsigned * flags_ptr, + haddr_t * new_addr_ptr, size_t * new_len_ptr, void ** new_image_ptr_ptr) { HDassert( ((test_entry_t *)thing)->type == LARGE_ENTRY_TYPE ); return(serialize(addr, len, image_ptr, thing, flags_ptr, @@ -1286,16 +967,9 @@ large_serialize(const H5F_t UNUSED *f, } herr_t -huge_serialize(const H5F_t UNUSED *f, - hid_t UNUSED dxpl_id, - haddr_t addr, - size_t len, - void * image_ptr, - void * thing, - unsigned * flags_ptr, - haddr_t * new_addr_ptr, - size_t * new_len_ptr, - void ** new_image_ptr_ptr) +huge_serialize(const H5F_t UNUSED *f, hid_t UNUSED dxpl_id, haddr_t addr, + size_t len, void * image_ptr, void * thing, unsigned * flags_ptr, + haddr_t * new_addr_ptr, size_t * new_len_ptr, void ** new_image_ptr_ptr) { HDassert( ((test_entry_t *)thing)->type == HUGE_ENTRY_TYPE ); return(serialize(addr, len, image_ptr, thing, flags_ptr, @@ -1303,16 +977,9 @@ huge_serialize(const H5F_t UNUSED *f, } herr_t -monster_serialize(const H5F_t UNUSED *f, - hid_t UNUSED dxpl_id, - haddr_t addr, - size_t len, - void * image_ptr, - void * thing, - unsigned * flags_ptr, - haddr_t * new_addr_ptr, - size_t * new_len_ptr, - void ** new_image_ptr_ptr) +monster_serialize(const H5F_t UNUSED *f, hid_t UNUSED dxpl_id, haddr_t addr, + size_t len, void * image_ptr, void * thing, unsigned * flags_ptr, + haddr_t * new_addr_ptr, size_t * new_len_ptr, void ** new_image_ptr_ptr) { HDassert( ((test_entry_t *)thing)->type == MONSTER_ENTRY_TYPE ); return(serialize(addr, len, image_ptr, thing, flags_ptr, @@ -1320,16 +987,9 @@ monster_serialize(const H5F_t UNUSED *f, } herr_t -variable_serialize(const H5F_t UNUSED *f, - hid_t UNUSED dxpl_id, - haddr_t addr, - size_t len, - void * image_ptr, - void * thing, - unsigned * flags_ptr, - haddr_t * new_addr_ptr, - size_t * new_len_ptr, - void ** new_image_ptr_ptr) +variable_serialize(const H5F_t UNUSED *f, hid_t UNUSED dxpl_id, haddr_t addr, + size_t len, void * image_ptr, void * thing, unsigned * flags_ptr, + haddr_t * new_addr_ptr, size_t * new_len_ptr, void ** new_image_ptr_ptr) { HDassert( ((test_entry_t *)thing)->type == VARIABLE_ENTRY_TYPE ); return(serialize(addr, len, image_ptr, thing, flags_ptr, @@ -1357,32 +1017,18 @@ variable_serialize(const H5F_t UNUSED *f, * Programmer: John Mainzer * 9/19/07 * - * Modifications: - * - * None. - * *------------------------------------------------------------------------- */ herr_t -free_icr(haddr_t addr, - size_t len, - void * thing) +free_icr(test_entry_t *entry_ptr) { - int i; - test_entry_t * entry_ptr; test_entry_t * base_addr; - test_entry_t * pinned_entry_ptr; - test_entry_t * pinned_base_addr; - HDassert( thing ); + HDassert( entry_ptr ); - entry_ptr = (test_entry_t *)thing; base_addr = entries2[entry_ptr->type]; - HDassert( entry_ptr->addr == addr ); - HDassert( entry_ptr->size == len ); - HDassert( entry_ptr->index >= 0 ); HDassert( entry_ptr->index <= max_indices2[entry_ptr->type] ); HDassert( entry_ptr == &(base_addr[entry_ptr->index]) ); @@ -1398,9 +1044,12 @@ free_icr(haddr_t addr, HDassert( !(entry_ptr->header.is_dirty) ); if ( entry_ptr->num_pins > 0 ) { + int i; + + for ( i = 0; i < entry_ptr->num_pins; i++ ) { + test_entry_t * pinned_entry_ptr; + test_entry_t * pinned_base_addr; - for ( i = 0; i < entry_ptr->num_pins; i++ ) - { pinned_base_addr = entries2[entry_ptr->pin_type[i]]; pinned_entry_ptr = &(pinned_base_addr[entry_ptr->pin_idx[i]]); @@ -1427,107 +1076,299 @@ free_icr(haddr_t addr, pinned_entry_ptr->index); } - entry_ptr->pin_type[i] = -1; - entry_ptr->pin_idx[i] = -1; - } - entry_ptr->num_pins = 0; - } + entry_ptr->pin_type[i] = -1; + entry_ptr->pin_idx[i] = -1; + } + entry_ptr->num_pins = 0; + } + + entry_ptr->destroyed = TRUE; + entry_ptr->cache_ptr = NULL; + + return(SUCCEED); + +} /* free_icr() */ + +herr_t +pico_free_icr(haddr_t addr, size_t len, void * thing) +{ + test_entry_t * entry_ptr = (test_entry_t *)thing; + + HDassert( entry_ptr->addr == addr ); + HDassert( entry_ptr->size == len ); + HDassert( entry_ptr->type == PICO_ENTRY_TYPE ); + + return(free_icr(entry_ptr)); +} + +herr_t +nano_free_icr(haddr_t addr, size_t len, void * thing) +{ + test_entry_t * entry_ptr = (test_entry_t *)thing; + + HDassert( entry_ptr->addr == addr ); + HDassert( entry_ptr->size == len ); + HDassert( entry_ptr->type == NANO_ENTRY_TYPE ); + + return(free_icr(entry_ptr)); +} + +herr_t +micro_free_icr(haddr_t addr, size_t len, void * thing) +{ + test_entry_t * entry_ptr = (test_entry_t *)thing; + + HDassert( entry_ptr->addr == addr ); + HDassert( entry_ptr->size == len ); + HDassert( entry_ptr->type == MICRO_ENTRY_TYPE ); + + return(free_icr(entry_ptr)); +} + +herr_t +tiny_free_icr(haddr_t addr, size_t len, void * thing) +{ + test_entry_t * entry_ptr = (test_entry_t *)thing; + + HDassert( entry_ptr->addr == addr ); + HDassert( entry_ptr->size == len ); + HDassert( entry_ptr->type == TINY_ENTRY_TYPE ); + + return(free_icr(entry_ptr)); +} + +herr_t +small_free_icr(haddr_t addr, size_t len, void * thing) +{ + test_entry_t * entry_ptr = (test_entry_t *)thing; + + HDassert( entry_ptr->addr == addr ); + HDassert( entry_ptr->size == len ); + HDassert( entry_ptr->type == SMALL_ENTRY_TYPE ); + + return(free_icr(entry_ptr)); +} + +herr_t +medium_free_icr(haddr_t addr, size_t len, void * thing) +{ + test_entry_t * entry_ptr = (test_entry_t *)thing; + + HDassert( entry_ptr->addr == addr ); + HDassert( entry_ptr->size == len ); + HDassert( entry_ptr->type == MEDIUM_ENTRY_TYPE ); + + return(free_icr(entry_ptr)); +} + +herr_t +large_free_icr(haddr_t addr, size_t len, void * thing) +{ + test_entry_t * entry_ptr = (test_entry_t *)thing; + + HDassert( entry_ptr->addr == addr ); + HDassert( entry_ptr->size == len ); + HDassert( entry_ptr->type == LARGE_ENTRY_TYPE ); + + return(free_icr(entry_ptr)); +} + +herr_t +huge_free_icr(haddr_t addr, size_t len, void * thing) +{ + test_entry_t * entry_ptr = (test_entry_t *)thing; + + HDassert( entry_ptr->addr == addr ); + HDassert( entry_ptr->size == len ); + HDassert( entry_ptr->type == HUGE_ENTRY_TYPE ); + + return(free_icr(entry_ptr)); +} + +herr_t +monster_free_icr(haddr_t addr, size_t len, void * thing) +{ + test_entry_t * entry_ptr = (test_entry_t *)thing; + + HDassert( entry_ptr->addr == addr ); + HDassert( entry_ptr->size == len ); + HDassert( entry_ptr->type == MONSTER_ENTRY_TYPE ); + + return(free_icr(entry_ptr)); +} + +herr_t +variable_free_icr(haddr_t addr, size_t len, void * thing) +{ + test_entry_t * entry_ptr = (test_entry_t *)thing; + + HDassert( entry_ptr->addr == addr ); + HDassert( entry_ptr->size == len ); + HDassert( entry_ptr->type == VARIABLE_ENTRY_TYPE ); + + return(free_icr(entry_ptr)); +} + + +/*------------------------------------------------------------------------- + * Function: clear_dirty_bits & friends + * + * Purpose: Clear the dirty bits. The helper functions verify that the + * correct version of clear_dirty_gits is being called, and + * then call clear_dirty_bits() proper. + * + * Return: SUCCEED + * + * Programmer: John Mainzer + * 9/20/07 + * + *------------------------------------------------------------------------- + */ + +herr_t +clear_dirty_bits(test_entry_t * entry_ptr) +{ + test_entry_t * base_addr; + + HDassert( entry_ptr ); + + base_addr = entries2[entry_ptr->type]; + + HDassert( entry_ptr->index >= 0 ); + HDassert( entry_ptr->index <= max_indices2[entry_ptr->type] ); + HDassert( entry_ptr == &(base_addr[entry_ptr->index]) ); + HDassert( entry_ptr == entry_ptr->self ); + HDassert( entry_ptr->header.addr == entry_ptr->addr ); + HDassert( entry_ptr->header.size == entry_ptr->size ); + HDassert( ( entry_ptr->type == VARIABLE_ENTRY_TYPE ) || + ( entry_ptr->size == entry_sizes2[entry_ptr->type] ) ); + + entry_ptr->is_dirty = FALSE; - entry_ptr->destroyed = TRUE; - entry_ptr->cache_ptr = NULL; + entry_ptr->cleared = TRUE; return(SUCCEED); -} /* free_icr() */ +} /* clear_dirty_bits() */ herr_t -pico_free_icr(haddr_t addr, - size_t len, - void * thing) +pico_clear_dirty_bits(haddr_t addr, size_t len, void * thing) { - HDassert( ((test_entry_t *)thing)->type == PICO_ENTRY_TYPE ); - return(free_icr(addr, len, thing)); + test_entry_t * entry_ptr = (test_entry_t *)thing; + + HDassert( entry_ptr->addr == addr ); + HDassert( entry_ptr->size == len ); + HDassert( entry_ptr->type == PICO_ENTRY_TYPE ); + + return(clear_dirty_bits(entry_ptr)); } herr_t -nano_free_icr(haddr_t addr, - size_t len, - void * thing) +nano_clear_dirty_bits(haddr_t addr, size_t len, void * thing) { - HDassert( ((test_entry_t *)thing)->type == NANO_ENTRY_TYPE ); - return(free_icr(addr, len, thing)); + test_entry_t * entry_ptr = (test_entry_t *)thing; + + HDassert( entry_ptr->addr == addr ); + HDassert( entry_ptr->size == len ); + HDassert( entry_ptr->type == NANO_ENTRY_TYPE ); + + return(clear_dirty_bits(entry_ptr)); } herr_t -micro_free_icr(haddr_t addr, - size_t len, - void * thing) +micro_clear_dirty_bits(haddr_t addr, size_t len, void * thing) { - HDassert( ((test_entry_t *)thing)->type == MICRO_ENTRY_TYPE ); - return(free_icr(addr, len, thing)); + test_entry_t * entry_ptr = (test_entry_t *)thing; + + HDassert( entry_ptr->addr == addr ); + HDassert( entry_ptr->size == len ); + HDassert( entry_ptr->type == MICRO_ENTRY_TYPE ); + + return(clear_dirty_bits(entry_ptr)); } herr_t -tiny_free_icr(haddr_t addr, - size_t len, - void * thing) +tiny_clear_dirty_bits(haddr_t addr, size_t len, void * thing) { - HDassert( ((test_entry_t *)thing)->type == TINY_ENTRY_TYPE ); - return(free_icr(addr, len, thing)); + test_entry_t * entry_ptr = (test_entry_t *)thing; + + HDassert( entry_ptr->addr == addr ); + HDassert( entry_ptr->size == len ); + HDassert( entry_ptr->type == TINY_ENTRY_TYPE ); + + return(clear_dirty_bits(entry_ptr)); } herr_t -small_free_icr(haddr_t addr, - size_t len, - void * thing) +small_clear_dirty_bits(haddr_t addr, size_t len, void * thing) { - HDassert( ((test_entry_t *)thing)->type == SMALL_ENTRY_TYPE ); - return(free_icr(addr, len, thing)); + test_entry_t * entry_ptr = (test_entry_t *)thing; + + HDassert( entry_ptr->addr == addr ); + HDassert( entry_ptr->size == len ); + HDassert( entry_ptr->type == SMALL_ENTRY_TYPE ); + + return(clear_dirty_bits(entry_ptr)); } herr_t -medium_free_icr(haddr_t addr, - size_t len, - void * thing) +medium_clear_dirty_bits(haddr_t addr, size_t len, void * thing) { - HDassert( ((test_entry_t *)thing)->type == MEDIUM_ENTRY_TYPE ); - return(free_icr(addr, len, thing)); + test_entry_t * entry_ptr = (test_entry_t *)thing; + + HDassert( entry_ptr->addr == addr ); + HDassert( entry_ptr->size == len ); + HDassert( entry_ptr->type == MEDIUM_ENTRY_TYPE ); + + return(clear_dirty_bits(entry_ptr)); } herr_t -large_free_icr(haddr_t addr, - size_t len, - void * thing) +large_clear_dirty_bits(haddr_t addr, size_t len, void * thing) { - HDassert( ((test_entry_t *)thing)->type == LARGE_ENTRY_TYPE ); - return(free_icr(addr, len, thing)); + test_entry_t * entry_ptr = (test_entry_t *)thing; + + HDassert( entry_ptr->addr == addr ); + HDassert( entry_ptr->size == len ); + HDassert( entry_ptr->type == LARGE_ENTRY_TYPE ); + + return(clear_dirty_bits(entry_ptr)); } herr_t -huge_free_icr(haddr_t addr, - size_t len, - void * thing) +huge_clear_dirty_bits(haddr_t addr, size_t len, void * thing) { - HDassert( ((test_entry_t *)thing)->type == HUGE_ENTRY_TYPE ); - return(free_icr(addr, len, thing)); + test_entry_t * entry_ptr = (test_entry_t *)thing; + + HDassert( entry_ptr->addr == addr ); + HDassert( entry_ptr->size == len ); + HDassert( entry_ptr->type == HUGE_ENTRY_TYPE ); + + return(clear_dirty_bits(entry_ptr)); } herr_t -monster_free_icr(haddr_t addr, - size_t len, - void * thing) +monster_clear_dirty_bits(haddr_t addr, size_t len, void * thing) { - HDassert( ((test_entry_t *)thing)->type == MONSTER_ENTRY_TYPE ); - return(free_icr(addr, len, thing)); + test_entry_t * entry_ptr = (test_entry_t *)thing; + + HDassert( entry_ptr->addr == addr ); + HDassert( entry_ptr->size == len ); + HDassert( entry_ptr->type == MONSTER_ENTRY_TYPE ); + + return(clear_dirty_bits(entry_ptr)); } herr_t -variable_free_icr(haddr_t addr, - size_t len, - void * thing) +variable_clear_dirty_bits(haddr_t addr, size_t len, void * thing) { - HDassert( ((test_entry_t *)thing)->type == VARIABLE_ENTRY_TYPE ); - return(free_icr(addr, len, thing)); + test_entry_t * entry_ptr = (test_entry_t *)thing; + + HDassert( entry_ptr->addr == addr ); + HDassert( entry_ptr->size == len ); + HDassert( entry_ptr->type == VARIABLE_ENTRY_TYPE ); + + return(clear_dirty_bits(entry_ptr)); } @@ -1540,7 +1381,7 @@ variable_free_icr(haddr_t addr, /*------------------------------------------------------------------------- * Function: add_flush_op2 * - * Purpose: Do noting if pass2 is FALSE on entry. + * Purpose: Do nothing if pass2 is FALSE on entry. * * Otherwise, add the specified flush operation to the * target instance of test_entry_t. @@ -1550,19 +1391,17 @@ variable_free_icr(haddr_t addr, * Programmer: John Mainzer * 9/1/06 * - * Modifications: - * *------------------------------------------------------------------------- */ void add_flush_op2(int target_type, - int target_idx, - int op_code, - int type, - int idx, - hbool_t flag, - size_t new_size) + int target_idx, + int op_code, + int type, + int idx, + hbool_t flag, + size_t new_size) { int i; test_entry_t * target_base_addr; @@ -1622,17 +1461,15 @@ add_flush_op2(int target_type, * Programmer: John Mainzer * 6/10/04 * - * Modifications: - * *------------------------------------------------------------------------- */ void create_pinned_entry_dependency2(H5F_t * file_ptr, - int pinning_type, - int pinning_idx, - int pinned_type, - int pinned_idx) + int pinning_type, + int pinning_idx, + int pinned_type, + int pinned_idx) { test_entry_t * pinning_base_addr; test_entry_t * pinning_entry_ptr; @@ -1703,18 +1540,14 @@ create_pinned_entry_dependency2(H5F_t * file_ptr, * Programmer: John Mainzer * 6/10/04 * - * Modifications: - * - * None. - * *------------------------------------------------------------------------- */ void dirty_entry2(H5F_t * file_ptr, - int32_t type, - int32_t idx, - hbool_t dirty_pin) + int32_t type, + int32_t idx, + hbool_t dirty_pin) { H5C2_t * cache_ptr; test_entry_t * base_addr; @@ -1781,18 +1614,14 @@ dirty_entry2(H5F_t * file_ptr, * Programmer: John Mainzer * 9/1/06 * - * Modifications: - * - * None. - * *------------------------------------------------------------------------- */ void execute_flush_op2(H5F_t * file_ptr, - struct test_entry_t * entry_ptr, - struct flush_op * op_ptr, - unsigned * flags_ptr) + struct test_entry_t * entry_ptr, + struct flush_op * op_ptr, + unsigned * flags_ptr) { /* const char * fcn_name = "execute_flush_op2()"; */ H5C2_t * cache_ptr; @@ -1854,7 +1683,7 @@ execute_flush_op2(H5F_t * file_ptr, /* change the size of some other entry */ resize_entry2(file_ptr, op_ptr->type, op_ptr->idx, - op_ptr->size, op_ptr->flag); + op_ptr->size, op_ptr->flag); } break; @@ -1915,19 +1744,13 @@ execute_flush_op2(H5F_t * file_ptr, * Programmer: John Mainzer * 6/10/04 * - * Modifications: - * - * JRM - 10/12/04 - * Removed references to local_H5C2_t, as we now get direct - * access to the definition of H5C2_t via H5Cpkg.h. - * *------------------------------------------------------------------------- */ hbool_t entry_in_cache2(H5C2_t * cache_ptr, - int32_t type, - int32_t idx) + int32_t type, + int32_t idx) { hbool_t in_cache = FALSE; /* will set to TRUE if necessary */ test_entry_t * base_addr; @@ -1989,8 +1812,6 @@ entry_in_cache2(H5C2_t * cache_ptr, * Programmer: John Mainzer * 1/13/09 * - * Modifications: - * *------------------------------------------------------------------------- */ @@ -2045,20 +1866,6 @@ recommend_core_file_driver(void) * Programmer: John Mainzer * 6/10/04 * - * Modifications: - * - * JRM -- 3/31/06 - * Added initialization for new pinned entry test related - * fields. - * - * JRM -- 4/1/07 - * Added initialization for the new is_read_only, and - * ro_ref_count fields. - * - * JRM -- 9/20/07 - * Re-worked function for the cache api mods needed to - * support journaling. - * *------------------------------------------------------------------------- */ @@ -2176,10 +1983,6 @@ reset_entries2(void) * Programmer: John Mainzer * 6/10/04 * - * Modifications: - * - * None. - * *------------------------------------------------------------------------- */ @@ -2235,8 +2038,7 @@ resize_entry2(H5F_t * file_ptr, protect_entry2(file_ptr, type, idx); unprotect_entry_with_size_change2(file_ptr, type, idx, - H5C2__SIZE_CHANGED_FLAG, - new_size); + H5C2__SIZE_CHANGED_FLAG, new_size); } } @@ -2245,32 +2047,28 @@ resize_entry2(H5F_t * file_ptr, } /* resize_entry2() */ - /*------------------------------------------------------------------------- - * Function: resize_pinned_entry2 - * - * Purpose: Given a pointer to a cache, an entry type, an index, and - * a new size, change the size of the target pinned entry - * to match the supplied new size. - * - * Do nothing if pass is false on entry. - * - * Return: void - * - * Programmer: John Mainzer - * 1/11/08 - * - * Modifications: - * - * None. - * - *------------------------------------------------------------------------- - */ +/*------------------------------------------------------------------------- + * Function: resize_pinned_entry2 + * + * Purpose: Given a pointer to a cache, an entry type, an index, and + * a new size, change the size of the target pinned entry + * to match the supplied new size. + * + * Do nothing if pass is false on entry. + * + * Return: void + * + * Programmer: John Mainzer + * 1/11/08 + * + *------------------------------------------------------------------------- + */ void resize_pinned_entry2(H5F_t * file_ptr, - int32_t type, - int32_t idx, - size_t new_size) + int32_t type, + int32_t idx, + size_t new_size) { H5C2_t * cache_ptr; herr_t result; @@ -2346,8 +2144,6 @@ resize_pinned_entry2(H5F_t * file_ptr, * Programmer: John Mainzer * 6/10/04 * - * Modifications: - * *------------------------------------------------------------------------- */ @@ -2406,18 +2202,15 @@ verify_clean2(void) * Programmer: John Mainzer * 10/8/04 * - * Modifications: - * *------------------------------------------------------------------------- */ void verify_entry_status2(H5C2_t * cache_ptr, - int tag, - int num_entries, - struct expected_entry_status expected[]) + int tag, + int num_entries, + struct expected_entry_status expected[]) { - /* const char * fcn_name = "verify_entry_status2()"; */ static char msg[128]; hbool_t in_cache = FALSE; /* will set to TRUE if necessary */ int i; @@ -2648,8 +2441,6 @@ verify_entry_status2(H5C2_t * cache_ptr, * Programmer: John Mainzer * 6/10/04 * - * Modifications: - * *------------------------------------------------------------------------- */ @@ -2731,7 +2522,7 @@ verify_unprotected2(void) H5F_t * setup_cache2(size_t max_cache_size, - size_t min_clean_size) + size_t min_clean_size) { const char * fcn_name = "setup_cache2()"; char filename[512]; @@ -3031,15 +2822,13 @@ setup_cache2(size_t max_cache_size, * Programmer: John Mainzer * 9/14/07 * - * Modifications: - * *------------------------------------------------------------------------- */ void takedown_cache2(H5F_t * file_ptr, - hbool_t dump_stats, - hbool_t dump_detailed_stats) + hbool_t dump_stats, + hbool_t dump_detailed_stats) { char filename[512]; @@ -3122,10 +2911,6 @@ takedown_cache2(H5F_t * file_ptr, * Programmer: John Mainzer * 7/6/06 * - * Modifications: - * - * None. - * *------------------------------------------------------------------------- */ @@ -3189,8 +2974,6 @@ expunge_entry2(H5F_t * file_ptr, * Programmer: John Mainzer * 6/23/04 * - * Modifications: - * *------------------------------------------------------------------------- */ @@ -3227,12 +3010,12 @@ flush_cache2(H5F_t * file_ptr, if ( destroy_entries ) { result = H5C2_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, - H5C2__FLUSH_INVALIDATE_FLAG); + H5C2__FLUSH_INVALIDATE_FLAG); } else { result = H5C2_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, - H5C2__NO_FLAGS_SET); + H5C2__NO_FLAGS_SET); } } @@ -3284,24 +3067,6 @@ flush_cache2(H5F_t * file_ptr, * Programmer: John Mainzer * 6/16/04 * - * Modifications: - * - * JRM -- 1/13/05 - * Updated function for the flags parameter in - * H5C2_insert_entry(), and to allow access to this parameter. - * - * JRM -- 6/17/05 - * The interface no longer permits clean inserts. - * Accordingly, the dirty parameter is no longer meaningfull. - * - * JRM -- 4/5/06 - * Added code to initialize the new cache_ptr field of the - * test_entry_t structure. - * - * JRM -- 8/10/06 - * Updated to reflect the fact that entries can now be - * inserted pinned. - * *------------------------------------------------------------------------- */ @@ -3404,21 +3169,16 @@ insert_entry2(H5F_t * file_ptr, * Programmer: John Mainzer * 3/28/06 * - * Modifications: - * - * None. - * *------------------------------------------------------------------------- */ void mark_pinned_entry_dirty2(H5F_t * file_ptr, - int32_t type, - int32_t idx, - hbool_t size_changed, - size_t new_size) + int32_t type, + int32_t idx, + hbool_t size_changed, + size_t new_size) { - /* const char * fcn_name = "mark_pinned_entry_dirty2()"; */ #ifndef NDEBUG H5C2_t * cache_ptr; #endif /* NDEBUG */ @@ -3456,8 +3216,8 @@ mark_pinned_entry_dirty2(H5F_t * file_ptr, } result = H5C2_mark_pinned_entry_dirty((void *)entry_ptr, - size_changed, - new_size); + size_changed, + new_size); if ( ( result < 0 ) || ( ! (entry_ptr->header.is_dirty) ) || @@ -3508,10 +3268,6 @@ mark_pinned_entry_dirty2(H5F_t * file_ptr, * Programmer: John Mainzer * 5/17/06 * - * Modifications: - * - * None. - * *------------------------------------------------------------------------- */ @@ -3520,7 +3276,6 @@ mark_pinned_or_protected_entry_dirty2(H5F_t * file_ptr, int32_t type, int32_t idx) { - /* const char * fcn_name = "mark_pinned_or_protected_entry_dirty2()"; */ #ifndef NDEBUG H5C2_t * cache_ptr; #endif /* NDEBUG */ @@ -3602,25 +3357,15 @@ mark_pinned_or_protected_entry_dirty2(H5F_t * file_ptr, * Programmer: John Mainzer * 6/21/04 * - * Modifications: - * - * JRM -- 6/17/05 - * Updated code to reflect the fact that renames automatically - * dirty entries. - * - * JRM -- 5/16/08 - * Updated code to do nothing if pass2 is FALSE on entry. - * *------------------------------------------------------------------------- */ void rename_entry2(H5C2_t * cache_ptr, - int32_t type, - int32_t idx, - hbool_t main_addr) + int32_t type, + int32_t idx, + hbool_t main_addr) { - /* const char * fcn_name = "rename_entry2()"; */ herr_t result; hbool_t done = TRUE; /* will set to FALSE if we have work to do */ haddr_t old_addr = HADDR_UNDEF; @@ -3713,10 +3458,6 @@ rename_entry2(H5C2_t * cache_ptr, * Programmer: John Mainzer * 5/17/06 * - * Modifications: - * - * None. - * *------------------------------------------------------------------------- */ @@ -3792,19 +3533,13 @@ pin_protected_entry2(H5F_t * file_ptr, * Programmer: John Mainzer * 6/11/04 * - * Modifications: - * - * - Modified call to H5C2_protect to pass H5C2__NO_FLAGS_SET in the - * new flags parameter. - * JRM -- 3/28/07 - * *------------------------------------------------------------------------- */ void protect_entry2(H5F_t * file_ptr, - int32_t type, - int32_t idx) + int32_t type, + int32_t idx) { const char * fcn_name = "protect_entry2()"; H5C2_t * cache_ptr; @@ -3920,19 +3655,14 @@ protect_entry2(H5F_t * file_ptr, * Programmer: John Mainzer * 4/1/07 * - * Modifications: - * - * - None. - * *------------------------------------------------------------------------- */ void protect_entry_ro2(H5F_t * file_ptr, - int32_t type, - int32_t idx) + int32_t type, + int32_t idx) { - /* const char * fcn_name = "protect_entry_ro2()"; */ H5C2_t * cache_ptr; test_entry_t * base_addr; test_entry_t * entry_ptr; @@ -4004,33 +3734,26 @@ protect_entry_ro2(H5F_t * file_ptr, * Programmer: John Mainzer * 3/28/06 * - * Modifications: - * - * None. - * *------------------------------------------------------------------------- */ void unpin_entry2(H5F_t * file_ptr, - int32_t type, - int32_t idx) + int32_t type, + int32_t idx) { - /* const char * fcn_name = "unpin_entry2()"; */ -#ifndef NDEBUG - H5C2_t * cache_ptr; -#endif /* NDEBUG */ herr_t result; test_entry_t * base_addr; test_entry_t * entry_ptr; if ( pass2 ) { - #ifndef NDEBUG + H5C2_t * cache_ptr; + cache_ptr = file_ptr->shared->cache2; -#endif /* NDEBUG */ HDassert( cache_ptr ); +#endif /* NDEBUG */ HDassert( ( 0 <= type ) && ( type < NUMBER_OF_ENTRY_TYPES ) ); HDassert( ( 0 <= idx ) && ( idx <= max_indices2[type] ) ); @@ -4081,26 +3804,6 @@ unpin_entry2(H5F_t * file_ptr, * Programmer: John Mainzer * 6/12/04 * - * Modifications: - * - * JRM -- 1/7/05 - * Updated for the replacement of the deleted parameter in - * H5C2_unprotect() with the new flags parameter. - * - * JRM - 6/17/05 - * Modified function to use the new dirtied parameter of - * H5C2_unprotect(). - * - * JRM -- 9/8/05 - * Update for new entry size parameter in H5C2_unprotect(). - * We don't use them here for now. - * - * JRM -- 3/31/06 - * Update for pinned entries. - * - * JRM -- 4/1/07 - * Updated for new multiple read protects. - * *------------------------------------------------------------------------- */ @@ -4112,9 +3815,6 @@ unprotect_entry2(H5F_t * file_ptr, unsigned int flags) { const char * fcn_name = "unprotect_entry2()"; -#ifndef NDEBUG - H5C2_t * cache_ptr; -#endif /* NDEBUG */ herr_t result; hbool_t verbose = FALSE; hbool_t pin_flag_set; @@ -4129,12 +3829,13 @@ unprotect_entry2(H5F_t * file_ptr, } if ( pass2 ) { - #ifndef NDEBUG + H5C2_t * cache_ptr; + cache_ptr = file_ptr->shared->cache2; -#endif /* NDEBUG */ HDassert( cache_ptr ); +#endif /* NDEBUG */ HDassert( ( 0 <= type ) && ( type < NUMBER_OF_ENTRY_TYPES ) ); HDassert( ( 0 <= idx ) && ( idx <= max_indices2[type] ) ); @@ -4290,24 +3991,17 @@ unprotect_entry2(H5F_t * file_ptr, * Programmer: John Mainzer * 8/31/06 * - * Modifications: - * - * None. - * *------------------------------------------------------------------------- */ void unprotect_entry_with_size_change2(H5F_t * file_ptr, - int32_t type, - int32_t idx, - unsigned int flags, - size_t new_size) + int32_t type, + int32_t idx, + unsigned int flags, + size_t new_size) { /* const char * fcn_name = "unprotect_entry_with_size_change2()"; */ -#ifndef NDEBUG - H5C2_t * cache_ptr; -#endif /* NDEBUG */ herr_t result; hbool_t dirty_flag_set; hbool_t pin_flag_set; @@ -4317,12 +4011,13 @@ unprotect_entry_with_size_change2(H5F_t * file_ptr, test_entry_t * entry_ptr; if ( pass2 ) { - #ifndef NDEBUG + H5C2_t * cache_ptr; + cache_ptr = file_ptr->shared->cache2; -#endif /* NDEBUG */ HDassert( cache_ptr ); +#endif /* NDEBUG */ HDassert( ( 0 <= type ) && ( type < NUMBER_OF_ENTRY_TYPES ) ); HDassert( ( 0 <= idx ) && ( idx <= max_indices2[type] ) ); HDassert( new_size <= entry_sizes2[type] ); @@ -4415,35 +4110,25 @@ unprotect_entry_with_size_change2(H5F_t * file_ptr, * Programmer: John Mainzer * 6/12/04 * - * Modifications: - * - * JRM -- 4/4/07 - * Added code supporting multiple read only protects. - * Note that this increased the minimum lag to 10. - * - * JRM -- 3/19/08 - * Added max_index parameter and supporting code to allow - * us to run shorter smoke checks if needed. - * *------------------------------------------------------------------------- */ void row_major_scan_forward2(H5F_t * file_ptr, int32_t max_index, - int32_t lag, - hbool_t verbose, - hbool_t reset_stats, - hbool_t display_stats, - hbool_t display_detailed_stats, - hbool_t do_inserts, - hbool_t dirty_inserts, - hbool_t do_renames, - hbool_t rename_to_main_addr, - hbool_t do_destroys, - hbool_t do_mult_ro_protects, - int dirty_destroys, - int dirty_unprotects) + int32_t lag, + hbool_t verbose, + hbool_t reset_stats, + hbool_t display_stats, + hbool_t display_detailed_stats, + hbool_t do_inserts, + hbool_t dirty_inserts, + hbool_t do_renames, + hbool_t rename_to_main_addr, + hbool_t do_destroys, + hbool_t do_mult_ro_protects, + int dirty_destroys, + int dirty_unprotects) { const char * fcn_name = "row_major_scan_forward2"; H5C2_t * cache_ptr; @@ -4772,25 +4457,18 @@ row_major_scan_forward2(H5F_t * file_ptr, * Programmer: John Mainzer * 10/21/04 * - * Modifications: - * - * JRM -- 1/21/05 - * Added the max_index parameter to allow the caller to - * throttle the size of the inner loop, and thereby the - * execution time of the function. - * *------------------------------------------------------------------------- */ void hl_row_major_scan_forward2(H5F_t * file_ptr, - int32_t max_index, - hbool_t verbose, - hbool_t reset_stats, - hbool_t display_stats, - hbool_t display_detailed_stats, - hbool_t do_inserts, - hbool_t dirty_inserts) + int32_t max_index, + hbool_t verbose, + hbool_t reset_stats, + hbool_t display_stats, + hbool_t display_detailed_stats, + hbool_t do_inserts, + hbool_t dirty_inserts) { const char * fcn_name = "hl_row_major_scan_forward2"; H5C2_t * cache_ptr; @@ -4888,35 +4566,25 @@ hl_row_major_scan_forward2(H5F_t * file_ptr, * Programmer: John Mainzer * 6/12/04 * - * Modifications: - * - * JRM -- 4/4/07 - * Added code supporting multiple read only protects. - * Note that this increased the minimum lag to 10. - * - * JRM -- 3/19/08 - * Added max_index parameter and supporting code to allow - * us to run shorter smoke checks if needed. - * *------------------------------------------------------------------------- */ void row_major_scan_backward2(H5F_t * file_ptr, - int32_t max_index, - int32_t lag, - hbool_t verbose, - hbool_t reset_stats, - hbool_t display_stats, - hbool_t display_detailed_stats, - hbool_t do_inserts, - hbool_t dirty_inserts, - hbool_t do_renames, - hbool_t rename_to_main_addr, - hbool_t do_destroys, - hbool_t do_mult_ro_protects, - int dirty_destroys, - int dirty_unprotects) + int32_t max_index, + int32_t lag, + hbool_t verbose, + hbool_t reset_stats, + hbool_t display_stats, + hbool_t display_detailed_stats, + hbool_t do_inserts, + hbool_t dirty_inserts, + hbool_t do_renames, + hbool_t rename_to_main_addr, + hbool_t do_destroys, + hbool_t do_mult_ro_protects, + int dirty_destroys, + int dirty_unprotects) { const char * fcn_name = "row_major_scan_backward2"; H5C2_t * cache_ptr; @@ -5229,25 +4897,18 @@ row_major_scan_backward2(H5F_t * file_ptr, * Programmer: John Mainzer * 10/21/04 * - * Modifications: - * - * JRM -- 1/21/05 - * Added the max_index parameter to allow the caller to - * throttle the size of the inner loop, and thereby the - * execution time of the function. - * *------------------------------------------------------------------------- */ void hl_row_major_scan_backward2(H5F_t * file_ptr, - int32_t max_index, - hbool_t verbose, - hbool_t reset_stats, - hbool_t display_stats, - hbool_t display_detailed_stats, - hbool_t do_inserts, - hbool_t dirty_inserts) + int32_t max_index, + hbool_t verbose, + hbool_t reset_stats, + hbool_t display_stats, + hbool_t display_detailed_stats, + hbool_t do_inserts, + hbool_t dirty_inserts) { const char * fcn_name = "hl_row_major_scan_backward2"; H5C2_t * cache_ptr; @@ -5345,26 +5006,20 @@ hl_row_major_scan_backward2(H5F_t * file_ptr, * Programmer: John Mainzer * 6/23/04 * - * Modifications: - * - * JRM -- 3/19/08 - * Added max_index parameter and supporting code to allow - * us to run shorter smoke checks if needed. - * *------------------------------------------------------------------------- */ void col_major_scan_forward2(H5F_t * file_ptr, - int32_t max_index, - int32_t lag, - hbool_t verbose, - hbool_t reset_stats, - hbool_t display_stats, - hbool_t display_detailed_stats, - hbool_t do_inserts, - hbool_t dirty_inserts, - int dirty_unprotects) + int32_t max_index, + int32_t lag, + hbool_t verbose, + hbool_t reset_stats, + 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_forward2()"; H5C2_t * cache_ptr; @@ -5467,13 +5122,6 @@ col_major_scan_forward2(H5F_t * file_ptr, * Programmer: John Mainzer * 19/25/04 * - * Modifications: - * - * JRM -- 1/21/05 - * Added the max_index parameter to allow the caller to - * throttle the size of the inner loop, and thereby the - * execution time of the function. - * *------------------------------------------------------------------------- */ @@ -5594,26 +5242,20 @@ hl_col_major_scan_forward2(H5F_t * file_ptr, * Programmer: John Mainzer * 6/23/04 * - * Modifications: - * - * JRM -- 3/19/08 - * Added max_index parameter and supporting code to allow - * us to run shorter smoke checks if needed. - * *------------------------------------------------------------------------- */ void col_major_scan_backward2(H5F_t * file_ptr, - int32_t max_index, - int32_t lag, - hbool_t verbose, - hbool_t reset_stats, - hbool_t display_stats, - hbool_t display_detailed_stats, - hbool_t do_inserts, - hbool_t dirty_inserts, - int dirty_unprotects) + int32_t max_index, + int32_t lag, + hbool_t verbose, + hbool_t reset_stats, + 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_backward2()"; H5C2_t * cache_ptr; @@ -5730,26 +5372,19 @@ col_major_scan_backward2(H5F_t * file_ptr, * Programmer: John Mainzer * 10/25/04 * - * Modifications: - * - * JRM -- 1/21/05 - * Added the max_index parameter to allow the caller to - * throttle the size of the inner loop, and thereby the - * execution time of the function. - * *------------------------------------------------------------------------- */ void hl_col_major_scan_backward2(H5F_t * file_ptr, - int32_t max_index, - hbool_t verbose, - hbool_t reset_stats, - hbool_t display_stats, - hbool_t display_detailed_stats, - hbool_t do_inserts, - hbool_t dirty_inserts, - int dirty_unprotects) + int32_t max_index, + hbool_t verbose, + hbool_t reset_stats, + 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_backward2()"; H5C2_t * cache_ptr; @@ -5868,8 +5503,6 @@ hl_col_major_scan_backward2(H5F_t * file_ptr, * Programmer: John Mainzer * 4/18/04 * - * Modifications: - * *------------------------------------------------------------------------- */ @@ -6003,8 +5636,6 @@ check_and_validate_cache_hit_rate(hid_t file_id, * Programmer: John Mainzer * 4/18/04 * - * Modifications: - * *------------------------------------------------------------------------- */ @@ -6138,8 +5769,6 @@ check_and_validate_cache_size(hid_t file_id, * Programmer: John Mainzer * 4/14/04 * - * Modifications: - * *------------------------------------------------------------------------- */ -- cgit v0.12