summaryrefslogtreecommitdiffstats
path: root/src/H5Ocache.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Ocache.c')
-rw-r--r--src/H5Ocache.c64
1 files changed, 32 insertions, 32 deletions
diff --git a/src/H5Ocache.c b/src/H5Ocache.c
index 4a56cb2..31763f9 100644
--- a/src/H5Ocache.c
+++ b/src/H5Ocache.c
@@ -57,7 +57,7 @@ static herr_t H5O__cache_get_initial_load_size(void *udata, size_t *image_len);
static herr_t H5O__cache_get_final_load_size(const void *image_ptr, size_t image_len, void *udata,
size_t *actual_len);
static htri_t H5O__cache_verify_chksum(const void *image_ptr, size_t len, void *udata_ptr);
-static void *H5O__cache_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty);
+static void *H5O__cache_deserialize(const void *image, size_t len, void *udata, bool *dirty);
static herr_t H5O__cache_image_len(const void *thing, size_t *image_len);
static herr_t H5O__cache_serialize(const H5F_t *f, void *image, size_t len, void *thing);
static herr_t H5O__cache_notify(H5AC_notify_action_t action, void *_thing);
@@ -65,7 +65,7 @@ static herr_t H5O__cache_free_icr(void *thing);
static herr_t H5O__cache_chk_get_initial_load_size(void *udata, size_t *image_len);
static htri_t H5O__cache_chk_verify_chksum(const void *image_ptr, size_t len, void *udata_ptr);
-static void *H5O__cache_chk_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty);
+static void *H5O__cache_chk_deserialize(const void *image, size_t len, void *udata, bool *dirty);
static herr_t H5O__cache_chk_image_len(const void *thing, size_t *image_len);
static herr_t H5O__cache_chk_serialize(const H5F_t *f, void *image, size_t len, void *thing);
static herr_t H5O__cache_chk_notify(H5AC_notify_action_t action, void *_thing);
@@ -76,7 +76,7 @@ static herr_t H5O__prefix_deserialize(const uint8_t *image, size_t len, H5O_cach
/* Chunk routines */
static herr_t H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t chunk_size, const uint8_t *image,
- size_t len, H5O_common_cache_ud_t *udata, hbool_t *dirty);
+ size_t len, H5O_common_cache_ud_t *udata, bool *dirty);
static herr_t H5O__chunk_serialize(const H5F_t *f, H5O_t *oh, unsigned chunkno);
/* Misc. routines */
@@ -202,7 +202,7 @@ done:
* Purpose: Verify the computed checksum of the data structure is the
* same as the stored chksum.
*
- * Return: Success: TRUE/FALSE
+ * Return: Success: true/false
* Failure: Negative
*-------------------------------------------------------------------------
*/
@@ -211,7 +211,7 @@ H5O__cache_verify_chksum(const void *_image, size_t len, void *_udata)
{
const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */
H5O_cache_ud_t *udata = (H5O_cache_ud_t *)_udata; /* User data for callback */
- htri_t ret_value = TRUE;
+ htri_t ret_value = true;
FUNC_ENTER_PACKAGE_NOERR
@@ -235,8 +235,8 @@ H5O__cache_verify_chksum(const void *_image, size_t len, void *_udata)
/* Indicate that udata->oh is to be freed later
in H5O__prefix_deserialize() */
- udata->free_oh = TRUE;
- ret_value = FALSE;
+ udata->free_oh = true;
+ ret_value = false;
}
}
else
@@ -263,7 +263,7 @@ H5O__cache_verify_chksum(const void *_image, size_t len, void *_udata)
*-------------------------------------------------------------------------
*/
static void *
-H5O__cache_deserialize(const void *image, size_t len, void *_udata, hbool_t *dirty)
+H5O__cache_deserialize(const void *image, size_t len, void *_udata, bool *dirty)
{
H5O_t *oh = NULL; /* Object header read in */
H5O_cache_ud_t *udata = (H5O_cache_ud_t *)_udata; /* User data for callback */
@@ -312,7 +312,7 @@ H5O__cache_deserialize(const void *image, size_t len, void *_udata, hbool_t *dir
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "can't deserialize first object header chunk");
/* Note that we've loaded the object header from the file */
- udata->made_attempt = TRUE;
+ udata->made_attempt = true;
/* Set return value */
ret_value = oh;
@@ -320,7 +320,7 @@ H5O__cache_deserialize(const void *image, size_t len, void *_udata, hbool_t *dir
done:
/* Release the [possibly partially initialized] object header on errors */
if (!ret_value && oh)
- if (H5O__free(oh, FALSE) < 0)
+ if (H5O__free(oh, false) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTRELEASE, NULL, "unable to destroy object header data");
FUNC_LEAVE_NOAPI(ret_value)
@@ -531,7 +531,7 @@ H5O__cache_notify(H5AC_notify_action_t action, void *_thing)
/* Mark messages stored with the object header (i.e. messages in chunk 0) as clean */
for (u = 0; u < oh->nmesgs; u++)
if (oh->mesg[u].chunkno == 0)
- oh->mesg[u].dirty = FALSE;
+ oh->mesg[u].dirty = false;
#ifndef NDEBUG
/* Reset the number of messages dirtied by decoding */
oh->ndecode_dirtied = 0;
@@ -581,7 +581,7 @@ H5O__cache_free_icr(void *_thing)
assert(oh->cache_info.type == H5AC_OHDR);
/* Destroy object header */
- if (H5O__free(oh, FALSE) < 0)
+ if (H5O__free(oh, false) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "can't destroy object header");
done:
@@ -621,7 +621,7 @@ H5O__cache_chk_get_initial_load_size(void *_udata, size_t *image_len)
* Purpose: Verify the computed checksum of the data structure is the
* same as the stored chksum.
*
- * Return: Success: TRUE/FALSE
+ * Return: Success: true/false
* Failure: Negative
*-------------------------------------------------------------------------
*/
@@ -630,7 +630,7 @@ H5O__cache_chk_verify_chksum(const void *_image, size_t len, void *_udata)
{
const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */
H5O_chk_cache_ud_t *udata = (H5O_chk_cache_ud_t *)_udata; /* User data for callback */
- htri_t ret_value = TRUE;
+ htri_t ret_value = true;
FUNC_ENTER_PACKAGE_NOERR
@@ -645,7 +645,7 @@ H5O__cache_chk_verify_chksum(const void *_image, size_t len, void *_udata)
H5F_get_checksums(image, len, &stored_chksum, &computed_chksum);
if (stored_chksum != computed_chksum)
- ret_value = FALSE;
+ ret_value = false;
}
FUNC_LEAVE_NOAPI(ret_value)
@@ -663,7 +663,7 @@ H5O__cache_chk_verify_chksum(const void *_image, size_t len, void *_udata)
*-------------------------------------------------------------------------
*/
static void *
-H5O__cache_chk_deserialize(const void *image, size_t len, void *_udata, hbool_t *dirty)
+H5O__cache_chk_deserialize(const void *image, size_t len, void *_udata, bool *dirty)
{
H5O_chunk_proxy_t *chk_proxy = NULL; /* Chunk proxy object */
H5O_chk_cache_ud_t *udata = (H5O_chk_cache_ud_t *)_udata; /* User data for callback */
@@ -858,7 +858,7 @@ H5O__cache_chk_notify(H5AC_notify_action_t action, void *_thing)
/* Mark messages in chunk as clean */
for (u = 0; u < chk_proxy->oh->nmesgs; u++)
if (chk_proxy->oh->mesg[u].chunkno == chk_proxy->chunkno)
- chk_proxy->oh->mesg[u].dirty = FALSE;
+ chk_proxy->oh->mesg[u].dirty = false;
} break;
case H5AC_NOTIFY_ACTION_CHILD_DIRTIED:
@@ -1152,9 +1152,9 @@ H5O__prefix_deserialize(const uint8_t *_image, size_t len, H5O_cache_ud_t *udata
/* Save the object header for later use in 'deserialize' callback */
udata->oh = oh;
- if (H5O__free(saved_oh, FALSE) < 0)
+ if (H5O__free(saved_oh, false) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "can't destroy object header");
- udata->free_oh = FALSE;
+ udata->free_oh = false;
}
else
/* Save the object header for later use in 'deserialize' callback */
@@ -1165,7 +1165,7 @@ H5O__prefix_deserialize(const uint8_t *_image, size_t len, H5O_cache_ud_t *udata
done:
/* Release the [possibly partially initialized] object header on errors */
if (ret_value < 0 && oh)
- if (H5O__free(oh, FALSE) < 0)
+ if (H5O__free(oh, false) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "unable to destroy object header data");
FUNC_LEAVE_NOAPI(ret_value)
@@ -1181,7 +1181,7 @@ done:
*/
static herr_t
H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t chunk_size, const uint8_t *image, size_t len,
- H5O_common_cache_ud_t *udata, hbool_t *dirty)
+ H5O_common_cache_ud_t *udata, bool *dirty)
{
const uint8_t *chunk_image = NULL; /* Pointer into buffer to decode */
const uint8_t *p_end = NULL; /* End of image buffer */
@@ -1189,8 +1189,8 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t chunk_size, const uint8_t
unsigned merged_null_msgs = 0; /* Number of null messages merged together */
unsigned chunkno; /* Current chunk's index */
unsigned nullcnt; /* Count of null messages (for sanity checking gaps in chunks) */
- hbool_t mesgs_modified =
- FALSE; /* Whether any messages were modified when the object header was deserialized */
+ bool mesgs_modified =
+ false; /* Whether any messages were modified when the object header was deserialized */
herr_t ret_value = SUCCEED;
FUNC_ENTER_PACKAGE
@@ -1336,7 +1336,7 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t chunk_size, const uint8_t
/* Combine adjacent null messages */
mesgno = oh->nmesgs - 1;
oh->mesg[mesgno].raw_size += (size_t)H5O_SIZEOF_MSGHDR_OH(oh) + mesg_size;
- oh->mesg[mesgno].dirty = TRUE;
+ oh->mesg[mesgno].dirty = true;
merged_null_msgs++;
}
else {
@@ -1355,7 +1355,7 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t chunk_size, const uint8_t
oh->nmesgs++;
/* Initialize information about message */
- mesg->dirty = FALSE;
+ mesg->dirty = false;
mesg->flags = flags;
mesg->crt_idx = crt_idx;
mesg->native = NULL;
@@ -1412,8 +1412,8 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t chunk_size, const uint8_t
mesg->flags |= H5O_MSG_FLAG_WAS_UNKNOWN;
/* Mark the message and chunk as dirty */
- mesg->dirty = TRUE;
- mesgs_modified = TRUE;
+ mesg->dirty = true;
+ mesgs_modified = true;
}
}
else {
@@ -1464,7 +1464,7 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t chunk_size, const uint8_t
mesg->native = refcount;
/* Set object header values */
- oh->has_refcount_msg = TRUE;
+ oh->has_refcount_msg = true;
if (!refcount)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't decode refcount");
oh->nlink = *refcount;
@@ -1482,8 +1482,8 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t chunk_size, const uint8_t
/* Mark the message & chunk as dirty if the message was changed by decoding */
if ((ioflags & H5O_DECODEIO_DIRTY) && (udata->file_intent & H5F_ACC_RDWR)) {
- mesg->dirty = TRUE;
- mesgs_modified = TRUE;
+ mesg->dirty = true;
+ mesgs_modified = true;
}
}
@@ -1526,12 +1526,12 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t chunk_size, const uint8_t
/* Mark the chunk dirty if we've modified messages */
if (mesgs_modified)
- *dirty = TRUE;
+ *dirty = true;
/* Mark the chunk dirty if we've merged null messages */
if (merged_null_msgs > 0) {
udata->merged_null_msgs += merged_null_msgs;
- *dirty = TRUE;
+ *dirty = true;
}
done: