diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2015-06-13 03:40:33 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2015-06-13 03:40:33 (GMT) |
commit | 65e76690fdafd30540acfd37d82ada689e363e6b (patch) | |
tree | efa73c207aa9923071da29fd7fb38e6bd17b77b4 /src/H5C.c | |
parent | e29904660a01b137e8470a8fe71d2d73a3f76538 (diff) | |
download | hdf5-65e76690fdafd30540acfd37d82ada689e363e6b.zip hdf5-65e76690fdafd30540acfd37d82ada689e363e6b.tar.gz hdf5-65e76690fdafd30540acfd37d82ada689e363e6b.tar.bz2 |
[svn-r27199] Description:
Large code cleanups and optimizations, in preparation for the upcoming
v3 metadata cache merge.
Tested on:
MacOSX/64 10.10.3 (amazon) w/serial & parallel
Linux/32 2.6.x (jam) w/serial & parallel
Diffstat (limited to 'src/H5C.c')
-rw-r--r-- | src/H5C.c | 42 |
1 files changed, 14 insertions, 28 deletions
@@ -2127,9 +2127,7 @@ H5C_flush_to_min_clean(H5F_t * f, if ( cache_ptr->check_write_permitted != NULL ) { - result = (cache_ptr->check_write_permitted)(f, - primary_dxpl_id, - &write_permitted); + result = (cache_ptr->check_write_permitted)(f, &write_permitted); if ( result < 0 ) { @@ -2569,25 +2567,23 @@ done: * file logging is turned off), or contain a pointer to the * open file to which trace file data is to be written. * - * Return: Non-negative on success/Negative on failure + * Return: Non-NULL trace file pointer (can't fail) * * Programmer: John Mainzer * 1/20/06 * *------------------------------------------------------------------------- */ -herr_t -H5C_get_trace_file_ptr(const H5C_t *cache_ptr, FILE **trace_file_ptr_ptr) +FILE * +H5C_get_trace_file_ptr(const H5C_t *cache_ptr) { FUNC_ENTER_NOAPI_NOERR + /* Check arguments */ HDassert(cache_ptr); HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); - HDassert(trace_file_ptr_ptr); - *trace_file_ptr_ptr = cache_ptr->trace_file_ptr; - - FUNC_LEAVE_NOAPI(SUCCEED) + FUNC_LEAVE_NOAPI(cache_ptr->trace_file_ptr) } /* H5C_get_trace_file_ptr() */ @@ -2600,16 +2596,15 @@ H5C_get_trace_file_ptr(const H5C_t *cache_ptr, FILE **trace_file_ptr_ptr) * file logging is turned off), or contain a pointer to the * open file to which trace file data is to be written. * - * Return: Non-negative on success/Negative on failure + * Return: Non-NULL trace file pointer (can't fail) * * Programmer: Quincey Koziol * 6/9/08 * *------------------------------------------------------------------------- */ -herr_t -H5C_get_trace_file_ptr_from_entry(const H5C_cache_entry_t *entry_ptr, - FILE **trace_file_ptr_ptr) +FILE * +H5C_get_trace_file_ptr_from_entry(const H5C_cache_entry_t *entry_ptr) { FUNC_ENTER_NOAPI_NOERR @@ -2617,9 +2612,7 @@ H5C_get_trace_file_ptr_from_entry(const H5C_cache_entry_t *entry_ptr, HDassert(entry_ptr); HDassert(entry_ptr->cache_ptr); - H5C_get_trace_file_ptr(entry_ptr->cache_ptr, trace_file_ptr_ptr); - - FUNC_LEAVE_NOAPI(SUCCEED) + FUNC_LEAVE_NOAPI(H5C_get_trace_file_ptr(entry_ptr->cache_ptr)) } /* H5C_get_trace_file_ptr_from_entry() */ @@ -2820,9 +2813,7 @@ H5C_insert_entry(H5F_t * f, if ( cache_ptr->check_write_permitted != NULL ) { - result = (cache_ptr->check_write_permitted)(f, - primary_dxpl_id, - &write_permitted); + result = (cache_ptr->check_write_permitted)(f, &write_permitted); if ( result < 0 ) { @@ -3934,9 +3925,7 @@ H5C_protect(H5F_t * f, if ( cache_ptr->check_write_permitted != NULL ) { - result = (cache_ptr->check_write_permitted)(f, - primary_dxpl_id, - &write_permitted); + result = (cache_ptr->check_write_permitted)(f, &write_permitted); if ( result < 0 ) { @@ -4083,9 +4072,7 @@ H5C_protect(H5F_t * f, if ( cache_ptr->check_write_permitted != NULL ) { - result = (cache_ptr->check_write_permitted)(f, - primary_dxpl_id, - &write_permitted); + result = (cache_ptr->check_write_permitted)(f, &write_permitted); if ( result < 0 ) { @@ -8611,8 +8598,7 @@ H5C_flush_single_entry(H5F_t * f, if ( cache_ptr->log_flush ) { - status = (cache_ptr->log_flush)(cache_ptr, addr, was_dirty, - flags, type_id); + status = (cache_ptr->log_flush)(cache_ptr, addr, was_dirty, flags); if ( status < 0 ) { |