diff options
Diffstat (limited to 'testpar')
-rw-r--r-- | testpar/t_cache.c | 73 |
1 files changed, 12 insertions, 61 deletions
diff --git a/testpar/t_cache.c b/testpar/t_cache.c index 8312512..b855f5d 100644 --- a/testpar/t_cache.c +++ b/testpar/t_cache.c @@ -139,7 +139,8 @@ int total_writes = 0; * happen to overlap some collective operation. * * cleared: Boolean flag that is set to true whenever the entry is - * dirty, and is cleared via a call to datum_clear(). + * dirty, and is cleared via a call to datum_notify with the + * "entry cleaned" action. * * flushed: Boolean flag that is set to true whenever the entry is * dirty, and is flushed by the metadata cache. @@ -409,8 +410,6 @@ static herr_t datum_notify(H5C_notify_action_t action, void *thing); static herr_t datum_free_icr(void * thing); -static herr_t datum_clear(H5F_t * f, void * thing, hbool_t about_to_destroy); - #define DATUM_ENTRY_TYPE H5AC_TEST_ID #define NUMBER_OF_ENTRY_TYPES 1 @@ -444,7 +443,6 @@ const H5C_class_t types[NUMBER_OF_ENTRY_TYPES] = /* serialize */ datum_serialize, /* notify */ datum_notify, /* free_icr */ datum_free_icr, - /* clear */ datum_clear, /* fsf_size */ NULL, } }; @@ -2893,7 +2891,16 @@ datum_notify(H5C_notify_action_t action, void *thing) fflush(stdout); } - /* do nothing */ + entry_ptr->cleared = TRUE; + entry_ptr->dirty = FALSE; + + datum_clears++; + + if(entry_ptr->header.is_pinned) { + datum_pinned_clears++; + HDassert( entry_ptr->global_pinned || entry_ptr->local_pinned ); + } /* end if */ + break; case H5AC_NOTIFY_ACTION_CHILD_DIRTIED: @@ -2991,62 +2998,6 @@ datum_free_icr(void * thing) } /* datum_free_icr() */ -/*------------------------------------------------------------------------- - * Function: datum_clear - * - * Purpose: Mark the datum as clean. - * - * Do not write it to the server, or increment the version. - * - * Return: SUCCEED - * - * Programmer: John Mainzer - * 12/29/05 - * - *------------------------------------------------------------------------- - */ -static herr_t -datum_clear(H5F_t H5_ATTR_UNUSED * f, - void * thing, - hbool_t H5_ATTR_UNUSED about_to_destroy) -{ - int idx; - struct datum * entry_ptr; - - HDassert( thing ); - - entry_ptr = (struct datum *)thing; - - idx = addr_to_datum_index(entry_ptr->base_addr); - - HDassert( idx >= 0 ); - HDassert( idx < NUM_DATA_ENTRIES ); - HDassert( idx < virt_num_data_entries ); - HDassert( &(data[idx]) == entry_ptr ); - - HDassert( entry_ptr->header.addr == entry_ptr->base_addr ); - HDassert( ( entry_ptr->header.size == entry_ptr->len ) || - ( entry_ptr->header.size == entry_ptr->local_len ) ); - - HDassert( ( entry_ptr->dirty ) || - ( entry_ptr->header.is_dirty == entry_ptr->dirty ) ); - - entry_ptr->cleared = TRUE; - entry_ptr->dirty = FALSE; - - datum_clears++; - - if ( entry_ptr->header.is_pinned ) { - - datum_pinned_clears++; - HDassert( entry_ptr->global_pinned || entry_ptr->local_pinned ); - } - - return(SUCCEED); - -} /* datum_clear() */ - - /*****************************************************************************/ /************************** test utility functions ***************************/ /*****************************************************************************/ |