summaryrefslogtreecommitdiffstats
path: root/src/H5Ctag.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Ctag.c')
-rw-r--r--src/H5Ctag.c64
1 files changed, 32 insertions, 32 deletions
diff --git a/src/H5Ctag.c b/src/H5Ctag.c
index 082b57e..a1a9f42 100644
--- a/src/H5Ctag.c
+++ b/src/H5Ctag.c
@@ -49,19 +49,19 @@
/* Typedef for tagged entry iterator callback context - evict tagged entries */
typedef struct {
- H5F_t *f; /* File pointer for evicting entry */
- hbool_t evicted_entries_last_pass; /* Flag to indicate that an entry
- * was evicted when iterating over
- * cache
- */
- hbool_t pinned_entries_need_evicted; /* Flag to indicate that a pinned
- * entry was attempted to be evicted
- */
- hbool_t skipped_pf_dirty_entries; /* Flag indicating that one or more
- * entries marked prefetched_dirty
- * were encountered and not
- * evicted.
- */
+ H5F_t *f; /* File pointer for evicting entry */
+ bool evicted_entries_last_pass; /* Flag to indicate that an entry
+ * was evicted when iterating over
+ * cache
+ */
+ bool pinned_entries_need_evicted; /* Flag to indicate that a pinned
+ * entry was attempted to be evicted
+ */
+ bool skipped_pf_dirty_entries; /* Flag indicating that one or more
+ * entries marked prefetched_dirty
+ * were encountered and not
+ * evicted.
+ */
} H5C_tag_iter_evict_ctx_t;
/* Typedef for tagged entry iterator callback context - expunge tag type metadata */
@@ -73,7 +73,7 @@ typedef struct {
/* Typedef for tagged entry iterator callback context - mark corked */
typedef struct {
- hbool_t cork_val; /* Corked value */
+ bool cork_val; /* Corked value */
} H5C_tag_iter_cork_ctx_t;
/********************/
@@ -125,7 +125,7 @@ H5C_ignore_tags(H5C_t *cache)
assert(cache != NULL);
/* Set variable to ignore tag values upon assignment */
- cache->ignore_tags = TRUE;
+ cache->ignore_tags = true;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5C_ignore_tags */
@@ -139,7 +139,7 @@ H5C_ignore_tags(H5C_t *cache)
*
*-------------------------------------------------------------------------
*/
-H5_ATTR_PURE hbool_t
+H5_ATTR_PURE bool
H5C_get_ignore_tags(const H5C_t *cache)
{
FUNC_ENTER_NOAPI_NOERR
@@ -370,7 +370,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5C__iter_tagged_entries(H5C_t *cache, haddr_t tag, hbool_t match_global, H5C_tag_iter_cb_t cb, void *cb_ctx)
+H5C__iter_tagged_entries(H5C_t *cache, haddr_t tag, bool match_global, H5C_tag_iter_cb_t cb, void *cb_ctx)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -430,17 +430,17 @@ H5C__evict_tagged_entries_cb(H5C_cache_entry_t *entry, void *_ctx)
/* Can't evict at this time, but let's note that we hit a pinned
entry and we'll loop back around again (as evicting other
entries will hopefully unpin this entry) */
- ctx->pinned_entries_need_evicted = TRUE;
+ ctx->pinned_entries_need_evicted = true;
else if (!entry->prefetched_dirty) {
/* Evict the Entry */
if (H5C__flush_single_entry(ctx->f, entry,
H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG |
H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, H5_ITER_ERROR, "Entry eviction failed.");
- ctx->evicted_entries_last_pass = TRUE;
+ ctx->evicted_entries_last_pass = true;
}
else
- ctx->skipped_pf_dirty_entries = TRUE;
+ ctx->skipped_pf_dirty_entries = true;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -456,7 +456,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5C_evict_tagged_entries(H5F_t *f, haddr_t tag, hbool_t match_global)
+H5C_evict_tagged_entries(H5F_t *f, haddr_t tag, bool match_global)
{
H5C_t *cache; /* Pointer to cache structure */
H5C_tag_iter_evict_ctx_t ctx; /* Context for iterator callback */
@@ -477,16 +477,16 @@ H5C_evict_tagged_entries(H5F_t *f, haddr_t tag, hbool_t match_global)
/* Start evicting entries */
do {
/* Reset pinned/evicted tracking flags */
- ctx.pinned_entries_need_evicted = FALSE;
- ctx.evicted_entries_last_pass = FALSE;
- ctx.skipped_pf_dirty_entries = FALSE;
+ ctx.pinned_entries_need_evicted = false;
+ ctx.evicted_entries_last_pass = false;
+ ctx.skipped_pf_dirty_entries = false;
/* Iterate through entries in the cache */
if (H5C__iter_tagged_entries(cache, tag, match_global, H5C__evict_tagged_entries_cb, &ctx) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_BADITER, FAIL, "Iteration of tagged entries failed");
/* Keep doing this until we have stopped evicted entries */
- } while (TRUE == ctx.evicted_entries_last_pass);
+ } while (true == ctx.evicted_entries_last_pass);
/* In most cases, fail if we have finished evicting entries and pinned
* entries still need evicted
@@ -511,7 +511,7 @@ H5C_evict_tagged_entries(H5F_t *f, haddr_t tag, hbool_t match_global)
* entries from becoming unpinned.
*
* Thus we must ignore ctx.pinned_entries_need_evicted if
- * ctx.skipped_pf_dirty_entries is TRUE.
+ * ctx.skipped_pf_dirty_entries is true.
*/
if ((!ctx.skipped_pf_dirty_entries) && (ctx.pinned_entries_need_evicted))
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Pinned entries still need evicted?!");
@@ -541,7 +541,7 @@ H5C__mark_tagged_entries_cb(H5C_cache_entry_t *entry, void H5_ATTR_UNUSED *_ctx)
/* We only want to set the flush marker on entries that
* actually need flushed (i.e., dirty ones) */
if (entry->is_dirty)
- entry->flush_marker = TRUE;
+ entry->flush_marker = true;
FUNC_LEAVE_NOAPI(H5_ITER_CONT)
} /* H5C__mark_tagged_entries_cb() */
@@ -570,7 +570,7 @@ H5C__mark_tagged_entries(H5C_t *cache, haddr_t tag)
/* Iterate through hash table entries, marking those with specified tag, as
* well as any major global entries which should always be flushed
* when flushing based on tag value */
- if (H5C__iter_tagged_entries(cache, tag, TRUE, H5C__mark_tagged_entries_cb, NULL) < 0)
+ if (H5C__iter_tagged_entries(cache, tag, true, H5C__mark_tagged_entries_cb, NULL) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_BADITER, FAIL, "Iteration of tagged entries failed");
done:
@@ -597,18 +597,18 @@ H5C__flush_marked_entries(H5F_t *f)
assert(f != NULL);
/* Enable the slist, as it is needed in the flush */
- if (H5C_set_slist_enabled(f->shared->cache, TRUE, FALSE) < 0)
+ if (H5C_set_slist_enabled(f->shared->cache, true, false) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "set slist enabled failed");
/* Flush all marked entries */
if (H5C_flush_cache(f, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_IGNORE_PROTECTED_FLAG) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't flush cache");
- /* Disable the slist. Set the clear_slist parameter to TRUE
+ /* Disable the slist. Set the clear_slist parameter to true
* since we called H5C_flush_cache() with the
* H5C__FLUSH_MARKED_ENTRIES_FLAG.
*/
- if (H5C_set_slist_enabled(f->shared->cache, FALSE, TRUE) < 0)
+ if (H5C_set_slist_enabled(f->shared->cache, false, true) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "disable slist failed");
done:
@@ -823,7 +823,7 @@ H5C_expunge_tag_type_metadata(H5F_t *f, haddr_t tag, int type_id, unsigned flags
ctx.flags = flags;
/* Iterate through hash table entries, expunge those with specified tag and type id */
- if (H5C__iter_tagged_entries(cache, tag, FALSE, H5C__expunge_tag_type_metadata_cb, &ctx) < 0)
+ if (H5C__iter_tagged_entries(cache, tag, false, H5C__expunge_tag_type_metadata_cb, &ctx) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_BADITER, FAIL, "Iteration of tagged entries failed");
done: