summaryrefslogtreecommitdiffstats
path: root/src/H5C.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2015-06-13 03:40:33 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2015-06-13 03:40:33 (GMT)
commit65e76690fdafd30540acfd37d82ada689e363e6b (patch)
treeefa73c207aa9923071da29fd7fb38e6bd17b77b4 /src/H5C.c
parente29904660a01b137e8470a8fe71d2d73a3f76538 (diff)
downloadhdf5-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.c42
1 files changed, 14 insertions, 28 deletions
diff --git a/src/H5C.c b/src/H5C.c
index a5eaa93..d6a89e6 100644
--- a/src/H5C.c
+++ b/src/H5C.c
@@ -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 ) {