summaryrefslogtreecommitdiffstats
path: root/src/H5C.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5C.c')
-rw-r--r--src/H5C.c83
1 files changed, 39 insertions, 44 deletions
diff --git a/src/H5C.c b/src/H5C.c
index 3f11493..a5eaa93 100644
--- a/src/H5C.c
+++ b/src/H5C.c
@@ -241,10 +241,10 @@ const H5C_class_t epoch_marker_class =
***************************************************************************/
static void *
-H5C_epoch_marker_load(H5F_t UNUSED * f,
- hid_t UNUSED dxpl_id,
- haddr_t UNUSED addr,
- void UNUSED * udata)
+H5C_epoch_marker_load(H5F_t H5_ATTR_UNUSED * f,
+ hid_t H5_ATTR_UNUSED dxpl_id,
+ haddr_t H5_ATTR_UNUSED addr,
+ void H5_ATTR_UNUSED * udata)
{
void * ret_value = NULL; /* Return value */
@@ -260,12 +260,12 @@ done:
static herr_t
-H5C_epoch_marker_flush(H5F_t UNUSED *f,
- hid_t UNUSED dxpl_id,
- hbool_t UNUSED dest,
- haddr_t UNUSED addr,
- void UNUSED *thing,
- unsigned UNUSED * flags_ptr)
+H5C_epoch_marker_flush(H5F_t H5_ATTR_UNUSED *f,
+ hid_t H5_ATTR_UNUSED dxpl_id,
+ hbool_t H5_ATTR_UNUSED dest,
+ haddr_t H5_ATTR_UNUSED addr,
+ void H5_ATTR_UNUSED *thing,
+ unsigned H5_ATTR_UNUSED * flags_ptr)
{
herr_t ret_value = FAIL; /* Return value */
@@ -281,8 +281,8 @@ done:
static herr_t
-H5C_epoch_marker_dest(H5F_t UNUSED * f,
- void UNUSED * thing)
+H5C_epoch_marker_dest(H5F_t H5_ATTR_UNUSED * f,
+ void H5_ATTR_UNUSED * thing)
{
herr_t ret_value = FAIL; /* Return value */
@@ -296,9 +296,9 @@ done:
}
static herr_t
-H5C_epoch_marker_clear(H5F_t UNUSED * f,
- void UNUSED * thing,
- hbool_t UNUSED dest)
+H5C_epoch_marker_clear(H5F_t H5_ATTR_UNUSED * f,
+ void H5_ATTR_UNUSED * thing,
+ hbool_t H5_ATTR_UNUSED dest)
{
herr_t ret_value = FAIL; /* Return value */
@@ -312,8 +312,8 @@ done:
}
static herr_t
-H5C_epoch_marker_notify(H5C_notify_action_t UNUSED action,
- void UNUSED * thing)
+H5C_epoch_marker_notify(H5C_notify_action_t H5_ATTR_UNUSED action,
+ void H5_ATTR_UNUSED * thing)
{
herr_t ret_value = FAIL; /* Return value */
@@ -326,9 +326,9 @@ done:
}
static herr_t
-H5C_epoch_marker_size(const H5F_t UNUSED * f,
- const void UNUSED * thing,
- size_t UNUSED * size_ptr)
+H5C_epoch_marker_size(const H5F_t H5_ATTR_UNUSED * f,
+ const void H5_ATTR_UNUSED * thing,
+ size_t H5_ATTR_UNUSED * size_ptr)
{
herr_t ret_value = FAIL; /* Return value */
@@ -621,7 +621,7 @@ H5C_apply_candidate_list(H5F_t * f,
(int)(cache_ptr->LRU_list_len));
#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */
- /* ====================================================================== *
+ /* ===================================================================== *
* Now scan the LRU and PEL lists, flushing or clearing entries as
* needed.
*
@@ -632,7 +632,7 @@ H5C_apply_candidate_list(H5F_t * f,
* to account for this one case where they come into play. If these flags
* are ever expanded upon, this function and the following flushing steps
* should be reworked to account for additional cases.
- * ====================================================================== */
+ * ===================================================================== */
entries_examined = 0;
initial_list_len = cache_ptr->LRU_list_len;
@@ -1339,7 +1339,7 @@ H5C_def_auto_resize_rpt_fcn(H5C_t * cache_ptr,
#ifndef NDEBUG
int32_t version,
#else /* NDEBUG */
- int32_t UNUSED version,
+ int32_t H5_ATTR_UNUSED version,
#endif /* NDEBUG */
double hit_rate,
enum H5C_resize_status status,
@@ -1612,9 +1612,7 @@ H5C_expunge_entry(H5F_t * f,
HDassert(f);
HDassert(f->shared);
-
cache_ptr = f->shared->cache;
-
HDassert(cache_ptr);
HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
HDassert(type);
@@ -2394,7 +2392,7 @@ H5C_get_cache_hit_rate(H5C_t * cache_ptr, double * hit_rate_ptr)
FUNC_ENTER_NOAPI(FAIL)
- if((cache_ptr == NULL ) || (cache_ptr->magic != H5C__H5C_T_MAGIC))
+ if((cache_ptr == NULL) || (cache_ptr->magic != H5C__H5C_T_MAGIC))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr on entry.")
if(hit_rate_ptr == NULL)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad hit_rate_ptr on entry.")
@@ -2733,7 +2731,7 @@ H5C_insert_entry(H5F_t * f,
entry_ptr->cache_ptr = cache_ptr;
entry_ptr->addr = addr;
entry_ptr->type = type;
-
+
/* Apply tag to newly inserted entry */
if(H5C_tag_entry(cache_ptr, entry_ptr, primary_dxpl_id) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, FAIL, "Cannot tag metadata entry")
@@ -3469,7 +3467,7 @@ H5C_move_entry(H5C_t * cache_ptr,
#endif /* H5C_DO_SANITY_CHECKS */
H5C__UPDATE_RP_FOR_MOVE(cache_ptr, entry_ptr, was_dirty, FAIL)
- }
+ }
}
H5C__UPDATE_STATS_FOR_MOVE(cache_ptr, entry_ptr)
@@ -3637,7 +3635,7 @@ H5C_pin_entry_from_client(H5C_t * cache_ptr,
H5C_cache_entry_t * entry_ptr)
#else
static herr_t
-H5C_pin_entry_from_client(H5C_t UNUSED * cache_ptr,
+H5C_pin_entry_from_client(H5C_t H5_ATTR_UNUSED * cache_ptr,
H5C_cache_entry_t * entry_ptr)
#endif
{
@@ -4658,7 +4656,7 @@ H5C_stats(H5C_t * cache_ptr,
const char * cache_name,
hbool_t
#if !H5C_COLLECT_CACHE_STATS
- UNUSED
+ H5_ATTR_UNUSED
#endif /* H5C_COLLECT_CACHE_STATS */
display_detailed_stats)
{
@@ -4729,11 +4727,9 @@ H5C_stats(H5C_t * cache_ptr,
total_clears += cache_ptr->clears[i];
total_flushes += cache_ptr->flushes[i];
total_evictions += cache_ptr->evictions[i];
- total_moves += cache_ptr->moves[i];
- total_entry_flush_moves
- += cache_ptr->entry_flush_moves[i];
- total_cache_flush_moves
- += cache_ptr->cache_flush_moves[i];
+ total_moves += cache_ptr->moves[i];
+ total_entry_flush_moves += cache_ptr->entry_flush_moves[i];
+ total_cache_flush_moves += cache_ptr->cache_flush_moves[i];
total_size_increases += cache_ptr->size_increases[i];
total_size_decreases += cache_ptr->size_decreases[i];
total_entry_flush_size_changes
@@ -4889,14 +4885,14 @@ H5C_stats(H5C_t * cache_ptr,
(long)total_evictions);
HDfprintf(stdout,
- "%s Total insertions(pinned) / moves = %ld(%ld) / %ld\n",
+ "%s Total insertions(pinned) / moves = %ld(%ld) / %ld\n",
cache_ptr->prefix,
(long)total_insertions,
(long)total_pinned_insertions,
(long)total_moves);
HDfprintf(stdout,
- "%s Total entry / cache flush moves = %ld / %ld\n",
+ "%s Total entry / cache flush moves = %ld / %ld\n",
cache_ptr->prefix,
(long)total_entry_flush_moves,
(long)total_cache_flush_moves);
@@ -5018,14 +5014,14 @@ H5C_stats(H5C_t * cache_ptr,
(long)(cache_ptr->evictions[i]));
HDfprintf(stdout,
- "%s insertions(pinned) / moves = %ld(%ld) / %ld\n",
+ "%s insertions(pinned) / moves = %ld(%ld) / %ld\n",
cache_ptr->prefix,
(long)(cache_ptr->insertions[i]),
(long)(cache_ptr->pinned_insertions[i]),
(long)(cache_ptr->moves[i]));
HDfprintf(stdout,
- "%s entry / cache flush moves = %ld / %ld\n",
+ "%s entry / cache flush moves = %ld / %ld\n",
cache_ptr->prefix,
(long)(cache_ptr->entry_flush_moves[i]),
(long)(cache_ptr->cache_flush_moves[i]));
@@ -5050,7 +5046,7 @@ H5C_stats(H5C_t * cache_ptr,
(long)(cache_ptr->unpins[i]));
HDfprintf(stdout,
- "%s entry dirty pins/pin'd flushes = %ld / %ld\n",
+ "%s entry dirty pins/pin'd flushes = %ld / %ld\n",
cache_ptr->prefix,
(long)(cache_ptr->dirty_pins[i]),
(long)(cache_ptr->pinned_flushes[i]));
@@ -5119,7 +5115,7 @@ H5C_stats__reset(H5C_t * cache_ptr)
#if H5C_COLLECT_CACHE_STATS
H5C_stats__reset(H5C_t * cache_ptr)
#else /* H5C_COLLECT_CACHE_STATS */
-H5C_stats__reset(H5C_t UNUSED * cache_ptr)
+H5C_stats__reset(H5C_t H5_ATTR_UNUSED * cache_ptr)
#endif /* H5C_COLLECT_CACHE_STATS */
#endif /* NDEBUG */
{
@@ -5144,8 +5140,8 @@ H5C_stats__reset(H5C_t UNUSED * cache_ptr)
cache_ptr->flushes[i] = 0;
cache_ptr->evictions[i] = 0;
cache_ptr->moves[i] = 0;
- cache_ptr->entry_flush_moves[i] = 0;
- cache_ptr->cache_flush_moves[i] = 0;
+ cache_ptr->entry_flush_moves[i] = 0;
+ cache_ptr->cache_flush_moves[i] = 0;
cache_ptr->pins[i] = 0;
cache_ptr->unpins[i] = 0;
cache_ptr->dirty_pins[i] = 0;
@@ -8943,7 +8939,6 @@ H5C_make_space_in_cache(H5F_t * f,
total_entries_scanned++;
#endif /* H5C_COLLECT_CACHE_STATS */
-
} else {
/* Skip epoch markers. Set result to SUCCEED to avoid