summaryrefslogtreecommitdiffstats
path: root/test/cache_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/cache_common.c')
-rw-r--r--test/cache_common.c822
1 files changed, 406 insertions, 416 deletions
diff --git a/test/cache_common.c b/test/cache_common.c
index 82ef9e4..e4135b0 100644
--- a/test/cache_common.c
+++ b/test/cache_common.c
@@ -389,8 +389,8 @@ addr_to_type_and_index(haddr_t addr, int32_t *type_ptr, int32_t *index_ptr)
int32_t type;
int32_t idx;
- HDassert(type_ptr);
- HDassert(index_ptr);
+ assert(type_ptr);
+ assert(index_ptr);
/* we only have a small number of entry types, so just do a
* linear search. If NUMBER_OF_ENTRY_TYPES grows, we may want
@@ -412,24 +412,24 @@ addr_to_type_and_index(haddr_t addr, int32_t *type_ptr, int32_t *index_ptr)
type = i - 1;
- HDassert((type >= 0) && (type < NUMBER_OF_ENTRY_TYPES));
+ assert((type >= 0) && (type < NUMBER_OF_ENTRY_TYPES));
if (addr >= PICO_ALT_BASE_ADDR) {
idx = (int32_t)((addr - alt_base_addrs[type]) / entry_sizes[type]);
- HDassert((idx >= 0) && (idx <= max_indices[type]));
- HDassert(!((entries[type])[idx].at_main_addr));
- HDassert(addr == (entries[type])[idx].alt_addr);
+ assert((idx >= 0) && (idx <= max_indices[type]));
+ assert(!((entries[type])[idx].at_main_addr));
+ assert(addr == (entries[type])[idx].alt_addr);
}
else {
idx = (int32_t)((addr - base_addrs[type]) / entry_sizes[type]);
- HDassert((idx >= 0) && (idx <= max_indices[type]));
- HDassert((entries[type])[idx].at_main_addr);
- HDassert(addr == (entries[type])[idx].main_addr);
+ assert((idx >= 0) && (idx <= max_indices[type]));
+ assert((entries[type])[idx].at_main_addr);
+ assert(addr == (entries[type])[idx].main_addr);
}
- HDassert(addr == (entries[type])[idx].addr);
+ assert(addr == (entries[type])[idx].addr);
*type_ptr = type;
*index_ptr = idx;
@@ -465,15 +465,15 @@ get_initial_load_size(void *udata, size_t *image_length, int32_t H5_ATTR_NDEBUG_
base_addr = entries[type];
entry = &(base_addr[idx]);
- HDassert(entry->type >= 0);
- HDassert(entry->type == type);
- HDassert(entry->type == entry_type);
- HDassert(entry->type < NUMBER_OF_ENTRY_TYPES);
- HDassert(entry->index == idx);
- HDassert(entry->index >= 0);
- HDassert(entry->index <= max_indices[type]);
- HDassert(entry == entry->self);
- HDassert(entry->addr == addr);
+ assert(entry->type >= 0);
+ assert(entry->type == type);
+ assert(entry->type == entry_type);
+ assert(entry->type < NUMBER_OF_ENTRY_TYPES);
+ assert(entry->index == idx);
+ assert(entry->index >= 0);
+ assert(entry->index <= max_indices[type]);
+ assert(entry == entry->self);
+ assert(entry->addr == addr);
*image_length = entry->size;
@@ -574,16 +574,16 @@ get_final_load_size(const void H5_ATTR_UNUSED *image, size_t H5_ATTR_UNUSED imag
base_addr = entries[type];
entry = &(base_addr[idx]);
- HDassert(entry->type >= 0);
- HDassert(entry->type == type);
- HDassert(entry->type == entry_type);
- HDassert(entry->type < NUMBER_OF_ENTRY_TYPES);
- HDassert(entry->index == idx);
- HDassert(entry->index >= 0);
- HDassert(entry->index <= max_indices[type]);
- HDassert(entry == entry->self);
- HDassert(entry->addr == addr);
- HDassert(type == VARIABLE_ENTRY_TYPE);
+ assert(entry->type >= 0);
+ assert(entry->type == type);
+ assert(entry->type == entry_type);
+ assert(entry->type < NUMBER_OF_ENTRY_TYPES);
+ assert(entry->index == idx);
+ assert(entry->index >= 0);
+ assert(entry->index <= max_indices[type]);
+ assert(entry == entry->self);
+ assert(entry->addr == addr);
+ assert(type == VARIABLE_ENTRY_TYPE);
/* Simulate SPECULATIVE read with a specified actual_len */
if (entry->actual_len) {
@@ -633,16 +633,16 @@ verify_chksum(const void H5_ATTR_UNUSED *image, size_t H5_ATTR_UNUSED len, void
base_addr = entries[type];
entry = &(base_addr[idx]);
- HDassert(entry->type >= 0);
- HDassert(entry->type == type);
- HDassert(entry->type == entry_type);
- HDassert(entry->type < NUMBER_OF_ENTRY_TYPES);
- HDassert(type == VARIABLE_ENTRY_TYPE);
- HDassert(entry->index == idx);
- HDassert(entry->index >= 0);
- HDassert(entry->index <= max_indices[type]);
- HDassert(entry == entry->self);
- HDassert(entry->addr == addr);
+ assert(entry->type >= 0);
+ assert(entry->type == type);
+ assert(entry->type == entry_type);
+ assert(entry->type < NUMBER_OF_ENTRY_TYPES);
+ assert(type == VARIABLE_ENTRY_TYPE);
+ assert(entry->index == idx);
+ assert(entry->index >= 0);
+ assert(entry->index <= max_indices[type]);
+ assert(entry == entry->self);
+ assert(entry->addr == addr);
if (++entry->verify_ct >= entry->max_verify_ct)
return (TRUE);
@@ -686,26 +686,26 @@ deserialize(const void *image, size_t H5_ATTR_NDEBUG_UNUSED len, void *udata, hb
base_addr = entries[type];
entry = &(base_addr[idx]);
- HDassert(entry->type >= 0);
- HDassert(entry->type == type);
- HDassert(entry->type == entry_type);
- HDassert(entry->type < NUMBER_OF_ENTRY_TYPES);
- HDassert(entry->index == idx);
- HDassert(entry->index >= 0);
- HDassert(entry->index <= max_indices[type]);
- HDassert(entry == entry->self);
- HDassert(entry->addr == addr);
- HDassert(entry->size == len);
- HDassert((entry->type == VARIABLE_ENTRY_TYPE) || (entry->size == entry_sizes[type]));
- HDassert(dirty != NULL);
- HDassert(entry->flush_dep_npar == 0);
- HDassert(entry->flush_dep_nchd == 0);
+ assert(entry->type >= 0);
+ assert(entry->type == type);
+ assert(entry->type == entry_type);
+ assert(entry->type < NUMBER_OF_ENTRY_TYPES);
+ assert(entry->index == idx);
+ assert(entry->index >= 0);
+ assert(entry->index <= max_indices[type]);
+ assert(entry == entry->self);
+ assert(entry->addr == addr);
+ assert(entry->size == len);
+ assert((entry->type == VARIABLE_ENTRY_TYPE) || (entry->size == entry_sizes[type]));
+ assert(dirty != NULL);
+ assert(entry->flush_dep_npar == 0);
+ assert(entry->flush_dep_nchd == 0);
/* for now *dirty will always be FALSE */
*dirty = FALSE;
/* verify that the image contains the expected data. */
- HDassert(image != NULL);
+ assert(image != NULL);
if ((entry->at_main_addr && entry->written_to_main_addr) ||
(!entry->at_main_addr && entry->written_to_alt_addr)) {
if ((type == PICO_ENTRY_TYPE) || (type == VARIABLE_ENTRY_TYPE) || (type == NOTIFY_ENTRY_TYPE)) {
@@ -714,7 +714,7 @@ deserialize(const void *image, size_t H5_ATTR_NDEBUG_UNUSED len, void *udata, hb
HDfprintf(stdout, "*image = 0x%x\n", (int)(*((const char *)image)));
HDfprintf(stdout, "expected *image = 0x%x\n", (int)(idx & 0xFF));
} /* end if */
- HDassert((*((const char *)image)) == (char)(idx & 0xFF));
+ assert((*((const char *)image)) == (char)(idx & 0xFF));
} /* end if */
else {
if ((*(((const char *)image) + 2)) != (char)(idx & 0xFF)) {
@@ -725,9 +725,9 @@ deserialize(const void *image, size_t H5_ATTR_NDEBUG_UNUSED len, void *udata, hb
HDfprintf(stdout, "expected *image = 0x%02" PRIx32 "%02" PRIx32 "\n", (uint32_t)idx & 0xFF,
(((uint32_t)idx & 0xFF00) >> 8));
} /* end if */
- HDassert((*((const char *)image)) == (char)(type & 0xFF));
- HDassert((*(((const char *)image) + 1)) == (char)((idx & 0xFF00) >> 8));
- HDassert((*(((const char *)image) + 2)) == (char)(idx & 0xFF));
+ assert((*((const char *)image)) == (char)(type & 0xFF));
+ assert((*(((const char *)image) + 1)) == (char)((idx & 0xFF00) >> 8));
+ assert((*(((const char *)image) + 2)) == (char)(idx & 0xFF));
} /* end else */
} /* end if */
@@ -826,26 +826,26 @@ image_len(const void *thing, size_t *image_length, int32_t H5_ATTR_NDEBUG_UNUSED
const test_entry_t *entry;
int32_t type;
- HDassert(thing);
- HDassert(image_length);
+ assert(thing);
+ assert(image_length);
entry = (const test_entry_t *)thing;
- HDassert(entry->self == entry);
+ assert(entry->self == entry);
type = entry->type;
- HDassert((type >= 0) && (type < NUMBER_OF_ENTRY_TYPES));
- HDassert(type == entry_type);
- HDassert((entry->index >= 0) && (entry->index <= max_indices[type]));
+ assert((type >= 0) && (type < NUMBER_OF_ENTRY_TYPES));
+ assert(type == entry_type);
+ assert((entry->index >= 0) && (entry->index <= max_indices[type]));
- HDassert(entry == &(entries[type][entry->index]));
+ assert(entry == &(entries[type][entry->index]));
if (type != VARIABLE_ENTRY_TYPE)
- HDassert(entry->size == entry_sizes[type]);
+ assert(entry->size == entry_sizes[type]);
else {
- HDassert(entry->size <= entry_sizes[type]);
- HDassert(entry->size > 0);
+ assert(entry->size <= entry_sizes[type]);
+ assert(entry->size > 0);
} /* end else */
*image_length = entry->size;
@@ -945,32 +945,32 @@ pre_serialize(H5F_t H5_ATTR_NDEBUG_UNUSED *f, void *thing, haddr_t H5_ATTR_NDEBU
test_entry_t *entry;
int32_t i;
- HDassert(f);
- HDassert(thing);
- HDassert(flags_ptr);
+ assert(f);
+ assert(thing);
+ assert(flags_ptr);
*flags_ptr = H5C__SERIALIZE_NO_FLAGS_SET;
- HDassert(new_addr_ptr);
- HDassert(new_len_ptr);
+ assert(new_addr_ptr);
+ assert(new_len_ptr);
entry = (test_entry_t *)thing;
- HDassert(entry->self == entry);
- HDassert(entry->addr == addr);
- HDassert(entry->size == len);
+ assert(entry->self == entry);
+ assert(entry->addr == addr);
+ assert(entry->size == len);
/* shouldn't serialize the entry unless it is dirty */
- HDassert(entry->is_dirty);
- HDassert((entry->type >= 0) && (entry->type < NUMBER_OF_ENTRY_TYPES));
- HDassert((entry->index >= 0) && (entry->index <= max_indices[entry->type]));
- HDassert(entry == &(entries[entry->type][entry->index]));
- HDassert(entry->num_flush_ops >= 0);
- HDassert(entry->num_flush_ops < MAX_FLUSH_OPS);
+ assert(entry->is_dirty);
+ assert((entry->type >= 0) && (entry->type < NUMBER_OF_ENTRY_TYPES));
+ assert((entry->index >= 0) && (entry->index <= max_indices[entry->type]));
+ assert(entry == &(entries[entry->type][entry->index]));
+ assert(entry->num_flush_ops >= 0);
+ assert(entry->num_flush_ops < MAX_FLUSH_OPS);
if (entry->num_flush_ops > 0) {
for (i = 0; i < entry->num_flush_ops; i++) {
- HDassert(entry->file_ptr);
+ assert(entry->file_ptr);
execute_flush_op(entry->file_ptr, entry, &((entry->flush_ops)[i]), flags_ptr);
} /* end for */
@@ -986,16 +986,16 @@ pre_serialize(H5F_t H5_ATTR_NDEBUG_UNUSED *f, void *thing, haddr_t H5_ATTR_NDEBU
/* set *new_len_ptr to the new length. */
- HDassert(entry->type == VARIABLE_ENTRY_TYPE);
- HDassert(entry->size > 0);
- HDassert(entry->size <= VARIABLE_ENTRY_SIZE);
+ assert(entry->type == VARIABLE_ENTRY_TYPE);
+ assert(entry->size > 0);
+ assert(entry->size <= VARIABLE_ENTRY_SIZE);
*new_len_ptr = entry->size;
} /* end if */
if (((*flags_ptr) & H5C__SERIALIZE_MOVED_FLAG) != 0) {
- HDassert(((*flags_ptr) | H5C__SERIALIZE_RESIZED_FLAG) != 0);
+ assert(((*flags_ptr) | H5C__SERIALIZE_RESIZED_FLAG) != 0);
/* place the new address in *new_addr */
*new_addr_ptr = entry->addr;
@@ -1109,35 +1109,35 @@ serialize(const H5F_t H5_ATTR_UNUSED *f, void *image_ptr, size_t len, void *thin
test_entry_t *entry;
int32_t type;
- HDassert(image_ptr);
- HDassert(thing);
+ assert(image_ptr);
+ assert(thing);
entry = (test_entry_t *)thing;
- HDassert(entry->self == entry);
- HDassert(entry->size == len);
+ assert(entry->self == entry);
+ assert(entry->size == len);
/* shouldn't serialize the entry unless it is dirty */
- HDassert(entry->is_dirty);
+ assert(entry->is_dirty);
type = entry->type;
- HDassert((type >= 0) && (type < NUMBER_OF_ENTRY_TYPES));
- HDassert((entry->index >= 0) && (entry->index <= max_indices[type]));
+ assert((type >= 0) && (type < NUMBER_OF_ENTRY_TYPES));
+ assert((entry->index >= 0) && (entry->index <= max_indices[type]));
- HDassert(entry == &(entries[type][entry->index]));
- HDassert(entry->num_flush_ops >= 0);
- HDassert(entry->num_flush_ops < MAX_FLUSH_OPS);
+ assert(entry == &(entries[type][entry->index]));
+ assert(entry->num_flush_ops >= 0);
+ assert(entry->num_flush_ops < MAX_FLUSH_OPS);
/* null out the image to avoid spurious failures */
HDmemset(image_ptr, 0, len);
if ((type == PICO_ENTRY_TYPE) || (type == VARIABLE_ENTRY_TYPE) || (type == NOTIFY_ENTRY_TYPE)) {
- HDassert(entry->size >= PICO_ENTRY_SIZE);
+ assert(entry->size >= PICO_ENTRY_SIZE);
*((char *)image_ptr) = (char)((entry->index) & 0xFF);
} /* end if */
else {
- HDassert(entry->size >= NANO_ENTRY_SIZE);
+ assert(entry->size >= NANO_ENTRY_SIZE);
*((char *)image_ptr) = (char)((entry->type) & 0xFF);
*(((char *)image_ptr) + 1) = (char)(((entry->index) & 0xFF00) >> 8);
*(((char *)image_ptr) + 2) = (char)((entry->index) & 0xFF);
@@ -1150,7 +1150,7 @@ serialize(const H5F_t H5_ATTR_UNUSED *f, void *image_ptr, size_t len, void *thin
entry->is_dirty = FALSE;
if (entry->flush_dep_npar > 0) {
- HDassert(entry->flush_dep_ndirty_chd == 0);
+ assert(entry->flush_dep_ndirty_chd == 0);
mark_flush_dep_clean(entry);
} /* end if */
@@ -1254,19 +1254,19 @@ notify(H5C_notify_action_t action, void *thing, int32_t H5_ATTR_NDEBUG_UNUSED en
{
test_entry_t *entry;
- HDassert(thing);
+ assert(thing);
entry = (test_entry_t *)thing;
- HDassert(entry->index >= 0);
- HDassert(entry->index <= max_indices[entry->type]);
- HDassert((entry->type >= 0) && (entry->type < NUMBER_OF_ENTRY_TYPES));
- HDassert(entry->type == entry_type);
- HDassert(entry == &(entries[entry->type][entry->index]));
- HDassert(entry == entry->self);
+ assert(entry->index >= 0);
+ assert(entry->index <= max_indices[entry->type]);
+ assert((entry->type >= 0) && (entry->type < NUMBER_OF_ENTRY_TYPES));
+ assert(entry->type == entry_type);
+ assert(entry == &(entries[entry->type][entry->index]));
+ assert(entry == entry->self);
if (!(action == H5C_NOTIFY_ACTION_ENTRY_DIRTIED && entry->action == TEST_ENTRY_ACTION_MOVE))
- HDassert(entry->header.addr == entry->addr);
- HDassert((entry->type == VARIABLE_ENTRY_TYPE) || (entry->size == entry_sizes[entry->type]));
+ assert(entry->header.addr == entry->addr);
+ assert((entry->type == VARIABLE_ENTRY_TYPE) || (entry->size == entry_sizes[entry->type]));
/* Increment count for appropriate action */
switch (action) {
@@ -1290,7 +1290,7 @@ notify(H5C_notify_action_t action, void *thing, int32_t H5_ATTR_NDEBUG_UNUSED en
break;
default:
- HDassert(0 && "Unknown notify action!?!");
+ assert(0 && "Unknown notify action!?!");
} /* end switch */
return (SUCCEED);
@@ -1327,19 +1327,19 @@ notify_notify(H5C_notify_action_t action, void *thing)
herr_t
free_icr(test_entry_t *entry, int32_t H5_ATTR_NDEBUG_UNUSED entry_type)
{
- HDassert(entry);
-
- HDassert(entry->type == entry_type);
- HDassert(entry->index >= 0);
- HDassert(entry->index <= max_indices[entry->type]);
- HDassert(entry == &(entries[entry->type][entry->index]));
- HDassert(entry == entry->self);
- HDassert(entry->cache_ptr != NULL);
- HDassert((entry->header.destroy_in_progress) || (entry->header.addr == entry->addr));
- HDassert(entry->header.size == entry->size);
- HDassert((entry->type == VARIABLE_ENTRY_TYPE) || (entry->size == entry_sizes[entry->type]));
- HDassert(entry->header.tl_next == NULL);
- HDassert(entry->header.tl_prev == NULL);
+ assert(entry);
+
+ assert(entry->type == entry_type);
+ assert(entry->index >= 0);
+ assert(entry->index <= max_indices[entry->type]);
+ assert(entry == &(entries[entry->type][entry->index]));
+ assert(entry == entry->self);
+ assert(entry->cache_ptr != NULL);
+ assert((entry->header.destroy_in_progress) || (entry->header.addr == entry->addr));
+ assert(entry->header.size == entry->size);
+ assert((entry->type == VARIABLE_ENTRY_TYPE) || (entry->size == entry_sizes[entry->type]));
+ assert(entry->header.tl_next == NULL);
+ assert(entry->header.tl_prev == NULL);
if (entry->num_pins > 0) {
int i;
@@ -1351,21 +1351,21 @@ free_icr(test_entry_t *entry, int32_t H5_ATTR_NDEBUG_UNUSED entry_type)
pinned_base_addr = entries[entry->pin_type[i]];
pinned_entry = &(pinned_base_addr[entry->pin_idx[i]]);
- HDassert(0 <= pinned_entry->type);
- HDassert(pinned_entry->type < NUMBER_OF_ENTRY_TYPES);
- HDassert(pinned_entry->type == entry->pin_type[i]);
- HDassert(pinned_entry->index >= 0);
- HDassert(pinned_entry->index <= max_indices[pinned_entry->type]);
- HDassert(pinned_entry->index == entry->pin_idx[i]);
- HDassert(pinned_entry == pinned_entry->self);
- HDassert(pinned_entry->header.is_pinned);
- HDassert(pinned_entry->is_pinned);
- HDassert(pinned_entry->pinning_ref_count > 0);
+ assert(0 <= pinned_entry->type);
+ assert(pinned_entry->type < NUMBER_OF_ENTRY_TYPES);
+ assert(pinned_entry->type == entry->pin_type[i]);
+ assert(pinned_entry->index >= 0);
+ assert(pinned_entry->index <= max_indices[pinned_entry->type]);
+ assert(pinned_entry->index == entry->pin_idx[i]);
+ assert(pinned_entry == pinned_entry->self);
+ assert(pinned_entry->header.is_pinned);
+ assert(pinned_entry->is_pinned);
+ assert(pinned_entry->pinning_ref_count > 0);
pinned_entry->pinning_ref_count--;
if (pinned_entry->pinning_ref_count <= 0) {
- HDassert(pinned_entry->file_ptr);
+ assert(pinned_entry->file_ptr);
unpin_entry(pinned_entry->type, pinned_entry->index);
} /* end if */
@@ -1478,23 +1478,23 @@ add_flush_op(int target_type, int target_idx, int op_code, int type, int idx, hb
test_entry_t *target_base_addr;
test_entry_t *target_entry_ptr;
- HDassert((0 <= target_type) && (target_type < NUMBER_OF_ENTRY_TYPES));
- HDassert((0 <= target_idx) && (target_idx <= max_indices[target_type]));
- HDassert((0 <= op_code) && (op_code <= FLUSH_OP__MAX_OP));
- HDassert((op_code != FLUSH_OP__RESIZE) || (type == VARIABLE_ENTRY_TYPE));
- HDassert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
- HDassert((0 <= idx) && (idx <= max_indices[type]));
- HDassert(new_size <= VARIABLE_ENTRY_SIZE);
+ assert((0 <= target_type) && (target_type < NUMBER_OF_ENTRY_TYPES));
+ assert((0 <= target_idx) && (target_idx <= max_indices[target_type]));
+ assert((0 <= op_code) && (op_code <= FLUSH_OP__MAX_OP));
+ assert((op_code != FLUSH_OP__RESIZE) || (type == VARIABLE_ENTRY_TYPE));
+ assert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
+ assert((0 <= idx) && (idx <= max_indices[type]));
+ assert(new_size <= VARIABLE_ENTRY_SIZE);
if (pass) {
target_base_addr = entries[target_type];
target_entry_ptr = &(target_base_addr[target_idx]);
- HDassert(target_entry_ptr->index == target_idx);
- HDassert(target_entry_ptr->type == target_type);
- HDassert(target_entry_ptr == target_entry_ptr->self);
- HDassert(target_entry_ptr->num_flush_ops < MAX_FLUSH_OPS);
+ assert(target_entry_ptr->index == target_idx);
+ assert(target_entry_ptr->type == target_type);
+ assert(target_entry_ptr == target_entry_ptr->self);
+ assert(target_entry_ptr->num_flush_ops < MAX_FLUSH_OPS);
i = (target_entry_ptr->num_flush_ops)++;
(target_entry_ptr->flush_ops)[i].op_code = op_code;
@@ -1540,10 +1540,10 @@ create_pinned_entry_dependency(H5F_t *file_ptr, int pinning_type, int pinning_id
if (pass) {
- HDassert((0 <= pinning_type) && (pinning_type < NUMBER_OF_ENTRY_TYPES));
- HDassert((0 <= pinning_idx) && (pinning_idx <= max_indices[pinning_type]));
- HDassert((0 <= pinned_type) && (pinned_type < NUMBER_OF_ENTRY_TYPES));
- HDassert((0 <= pinned_idx) && (pinned_idx <= max_indices[pinned_type]));
+ assert((0 <= pinning_type) && (pinning_type < NUMBER_OF_ENTRY_TYPES));
+ assert((0 <= pinning_idx) && (pinning_idx <= max_indices[pinning_type]));
+ assert((0 <= pinned_type) && (pinned_type < NUMBER_OF_ENTRY_TYPES));
+ assert((0 <= pinned_idx) && (pinned_idx <= max_indices[pinned_type]));
pinning_base_addr = entries[pinning_type];
pinning_entry_ptr = &(pinning_base_addr[pinning_idx]);
@@ -1551,15 +1551,15 @@ create_pinned_entry_dependency(H5F_t *file_ptr, int pinning_type, int pinning_id
pinned_base_addr = entries[pinned_type];
pinned_entry_ptr = &(pinned_base_addr[pinned_idx]);
- HDassert(pinning_entry_ptr->index == pinning_idx);
- HDassert(pinning_entry_ptr->type == pinning_type);
- HDassert(pinning_entry_ptr == pinning_entry_ptr->self);
- HDassert(pinning_entry_ptr->num_pins < MAX_PINS);
+ assert(pinning_entry_ptr->index == pinning_idx);
+ assert(pinning_entry_ptr->type == pinning_type);
+ assert(pinning_entry_ptr == pinning_entry_ptr->self);
+ assert(pinning_entry_ptr->num_pins < MAX_PINS);
- HDassert(pinning_entry_ptr->index == pinning_idx);
- HDassert(pinning_entry_ptr->type == pinning_type);
- HDassert(pinning_entry_ptr == pinning_entry_ptr->self);
- HDassert(!(pinning_entry_ptr->is_protected));
+ assert(pinning_entry_ptr->index == pinning_idx);
+ assert(pinning_entry_ptr->type == pinning_type);
+ assert(pinning_entry_ptr == pinning_entry_ptr->self);
+ assert(!(pinning_entry_ptr->is_protected));
pinning_entry_ptr->pin_type[pinning_entry_ptr->num_pins] = pinned_type;
pinning_entry_ptr->pin_idx[pinning_entry_ptr->num_pins] = pinned_idx;
@@ -1603,16 +1603,16 @@ dirty_entry(H5F_t *file_ptr, int32_t type, int32_t idx, hbool_t dirty_pin)
test_entry_t *base_addr;
test_entry_t *entry_ptr;
- HDassert(file_ptr);
- HDassert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
- HDassert((0 <= idx) && (idx <= max_indices[type]));
+ assert(file_ptr);
+ assert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
+ assert((0 <= idx) && (idx <= max_indices[type]));
if (pass) {
if (dirty_pin) {
H5C_t *cache_ptr = file_ptr->shared->cache;
- HDassert(cache_ptr);
+ assert(cache_ptr);
if (!entry_in_cache(cache_ptr, type, idx)) {
@@ -1624,9 +1624,9 @@ dirty_entry(H5F_t *file_ptr, int32_t type, int32_t idx, hbool_t dirty_pin)
base_addr = entries[type];
entry_ptr = &(base_addr[idx]);
- HDassert(entry_ptr->index == idx);
- HDassert(entry_ptr->type == type);
- HDassert(entry_ptr == entry_ptr->self);
+ assert(entry_ptr->index == idx);
+ assert(entry_ptr->type == type);
+ assert(entry_ptr == entry_ptr->self);
if (!((entry_ptr->header).is_pinned)) {
@@ -1670,19 +1670,19 @@ execute_flush_op(H5F_t *file_ptr, struct test_entry_t *entry_ptr, struct flush_o
{
H5C_t *cache_ptr;
- HDassert(file_ptr);
+ assert(file_ptr);
cache_ptr = file_ptr->shared->cache;
- HDassert(cache_ptr != NULL);
- HDassert(entry_ptr != NULL);
- HDassert(entry_ptr == entry_ptr->self);
- HDassert(entry_ptr->header.addr == entry_ptr->addr);
- HDassert((entry_ptr->flush_op_self_resize_in_progress) || (entry_ptr->header.size == entry_ptr->size));
- HDassert(op_ptr != NULL);
- HDassert((0 <= entry_ptr->type) && (entry_ptr->type < NUMBER_OF_ENTRY_TYPES));
- HDassert((0 <= entry_ptr->index) && (entry_ptr->index <= max_indices[entry_ptr->type]));
- HDassert((0 <= op_ptr->type) && (op_ptr->type < NUMBER_OF_ENTRY_TYPES));
- HDassert((0 <= op_ptr->idx) && (op_ptr->idx <= max_indices[op_ptr->type]));
- HDassert(flags_ptr != NULL);
+ assert(cache_ptr != NULL);
+ assert(entry_ptr != NULL);
+ assert(entry_ptr == entry_ptr->self);
+ assert(entry_ptr->header.addr == entry_ptr->addr);
+ assert((entry_ptr->flush_op_self_resize_in_progress) || (entry_ptr->header.size == entry_ptr->size));
+ assert(op_ptr != NULL);
+ assert((0 <= entry_ptr->type) && (entry_ptr->type < NUMBER_OF_ENTRY_TYPES));
+ assert((0 <= entry_ptr->index) && (entry_ptr->index <= max_indices[entry_ptr->type]));
+ assert((0 <= op_ptr->type) && (op_ptr->type < NUMBER_OF_ENTRY_TYPES));
+ assert((0 <= op_ptr->idx) && (op_ptr->idx <= max_indices[op_ptr->type]));
+ assert(flags_ptr != NULL);
if (pass) {
@@ -1691,7 +1691,7 @@ execute_flush_op(H5F_t *file_ptr, struct test_entry_t *entry_ptr, struct flush_o
break;
case FLUSH_OP__DIRTY:
- HDassert((entry_ptr->type != op_ptr->type) || (entry_ptr->index != op_ptr->idx));
+ assert((entry_ptr->type != op_ptr->type) || (entry_ptr->index != op_ptr->idx));
dirty_entry(file_ptr, op_ptr->type, op_ptr->idx, op_ptr->flag);
break;
@@ -1702,9 +1702,9 @@ execute_flush_op(H5F_t *file_ptr, struct test_entry_t *entry_ptr, struct flush_o
/* the flush operation is acting on the entry to
* which it is attached. Handle this here:
*/
- HDassert(entry_ptr->type == VARIABLE_ENTRY_TYPE);
- HDassert(op_ptr->size > 0);
- HDassert(op_ptr->size <= VARIABLE_ENTRY_SIZE);
+ assert(entry_ptr->type == VARIABLE_ENTRY_TYPE);
+ assert(op_ptr->size > 0);
+ assert(op_ptr->size <= VARIABLE_ENTRY_SIZE);
entry_ptr->size = op_ptr->size;
@@ -1727,16 +1727,16 @@ execute_flush_op(H5F_t *file_ptr, struct test_entry_t *entry_ptr, struct flush_o
* which it is attached. Handle this here:
*/
- HDassert(((*flags_ptr) & H5C__SERIALIZE_RESIZED_FLAG) != 0);
+ assert(((*flags_ptr) & H5C__SERIALIZE_RESIZED_FLAG) != 0);
(*flags_ptr) |= H5C__SERIALIZE_MOVED_FLAG;
if (op_ptr->flag) {
- HDassert(entry_ptr->addr == entry_ptr->alt_addr);
+ assert(entry_ptr->addr == entry_ptr->alt_addr);
entry_ptr->addr = entry_ptr->main_addr;
entry_ptr->at_main_addr = TRUE;
} /* end if */
else {
- HDassert(entry_ptr->addr == entry_ptr->main_addr);
+ assert(entry_ptr->addr == entry_ptr->main_addr);
entry_ptr->addr = entry_ptr->alt_addr;
entry_ptr->at_main_addr = FALSE;
} /* end else */
@@ -1746,7 +1746,7 @@ execute_flush_op(H5F_t *file_ptr, struct test_entry_t *entry_ptr, struct flush_o
break;
case FLUSH_OP__ORDER:
- HDassert(op_ptr->order_ptr);
+ assert(op_ptr->order_ptr);
entry_ptr->flush_order = *op_ptr->order_ptr;
(*op_ptr->order_ptr)++;
break;
@@ -1766,12 +1766,12 @@ execute_flush_op(H5F_t *file_ptr, struct test_entry_t *entry_ptr, struct flush_o
* must always be executed on an entry other than the
* entry being flushed.
*/
- HDassert((entry_ptr->type != op_ptr->type) || (entry_ptr->index != op_ptr->idx));
+ assert((entry_ptr->type != op_ptr->type) || (entry_ptr->index != op_ptr->idx));
expunge_entry(file_ptr, op_ptr->type, op_ptr->idx);
break;
case FLUSH_OP__DEST_FLUSH_DEP:
- HDassert((entry_ptr->type != op_ptr->type) || (entry_ptr->index != op_ptr->idx));
+ assert((entry_ptr->type != op_ptr->type) || (entry_ptr->index != op_ptr->idx));
destroy_flush_dependency(op_ptr->type, op_ptr->idx, entry_ptr->type, entry_ptr->index);
break;
@@ -1806,24 +1806,24 @@ entry_in_cache(H5C_t *cache_ptr, int32_t type, int32_t idx)
test_entry_t *entry_ptr;
H5C_cache_entry_t *test_ptr = NULL;
- HDassert(cache_ptr);
- HDassert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
- HDassert((0 <= idx) && (idx <= max_indices[type]));
+ assert(cache_ptr);
+ assert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
+ assert((0 <= idx) && (idx <= max_indices[type]));
base_addr = entries[type];
entry_ptr = &(base_addr[idx]);
- HDassert(entry_ptr->index == idx);
- HDassert(entry_ptr->type == type);
- HDassert(entry_ptr == entry_ptr->self);
+ assert(entry_ptr->index == idx);
+ assert(entry_ptr->type == type);
+ assert(entry_ptr == entry_ptr->self);
H5C_TEST__SEARCH_INDEX(cache_ptr, entry_ptr->addr, test_ptr)
if (test_ptr != NULL) {
in_cache = TRUE;
- HDassert(test_ptr == (H5C_cache_entry_t *)entry_ptr);
- HDassert(entry_ptr->addr == entry_ptr->header.addr);
+ assert(test_ptr == (H5C_cache_entry_t *)entry_ptr);
+ assert(entry_ptr->addr == entry_ptr->header.addr);
}
return (in_cache);
@@ -2044,8 +2044,8 @@ reset_entries(void)
base_addr = entries[i];
orig_base_addr = orig_entries[i];
- HDassert(base_addr);
- HDassert(orig_base_addr);
+ assert(base_addr);
+ assert(orig_base_addr);
for (j = 0; j <= max_index; j++) {
int k;
@@ -2178,17 +2178,17 @@ resize_entry(H5F_t *file_ptr, int32_t type, int32_t idx, size_t new_size, hbool_
test_entry_t *entry_ptr;
herr_t result;
- HDassert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
- HDassert(type == VARIABLE_ENTRY_TYPE);
- HDassert((0 <= idx) && (idx <= max_indices[type]));
- HDassert((0 < new_size) && (new_size <= entry_sizes[type]));
+ assert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
+ assert(type == VARIABLE_ENTRY_TYPE);
+ assert((0 <= idx) && (idx <= max_indices[type]));
+ assert((0 < new_size) && (new_size <= entry_sizes[type]));
if (pass) {
if (in_cache) {
H5C_t *cache_ptr = file_ptr->shared->cache;
- HDassert(cache_ptr);
+ assert(cache_ptr);
if (!entry_in_cache(cache_ptr, type, idx)) {
@@ -2200,10 +2200,10 @@ resize_entry(H5F_t *file_ptr, int32_t type, int32_t idx, size_t new_size, hbool_
base_addr = entries[type];
entry_ptr = &(base_addr[idx]);
- HDassert(entry_ptr->index == idx);
- HDassert(entry_ptr->type == type);
- HDassert(entry_ptr->cache_ptr == cache_ptr);
- HDassert(entry_ptr == entry_ptr->self);
+ assert(entry_ptr->index == idx);
+ assert(entry_ptr->type == type);
+ assert(entry_ptr->cache_ptr == cache_ptr);
+ assert(entry_ptr == entry_ptr->self);
if (!(entry_ptr->header.is_pinned || entry_ptr->header.is_protected)) {
@@ -2228,7 +2228,7 @@ resize_entry(H5F_t *file_ptr, int32_t type, int32_t idx, size_t new_size, hbool_
}
else {
- HDassert(entry_ptr->size == (entry_ptr->header).size);
+ assert(entry_ptr->size == (entry_ptr->header).size);
}
}
}
@@ -2275,7 +2275,7 @@ verify_clean(void)
max_index = max_indices[i];
base_addr = entries[i];
- HDassert(base_addr);
+ assert(base_addr);
for (j = 0; j <= max_index; j++) {
if ((base_addr[j].header.is_dirty) || (base_addr[j].is_dirty)) {
@@ -2642,10 +2642,10 @@ verify_unprotected(void)
max_index = max_indices[i];
base_addr = entries[i];
- HDassert(base_addr);
+ assert(base_addr);
for (j = 0; j <= max_index; j++) {
- HDassert(base_addr[j].header.is_protected == base_addr[j].is_protected);
+ assert(base_addr[j].header.is_protected == base_addr[j].is_protected);
if ((base_addr[j].header.is_protected) || (base_addr[j].is_protected)) {
@@ -2688,23 +2688,23 @@ expunge_entry(H5F_t *file_ptr, int32_t type, int32_t idx)
#ifndef NDEBUG
H5C_t *cache_ptr = file_ptr->shared->cache;
- HDassert(cache_ptr);
+ assert(cache_ptr);
#endif /* NDEBUG */
- HDassert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
- HDassert((0 <= idx) && (idx <= max_indices[type]));
+ assert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
+ assert((0 <= idx) && (idx <= max_indices[type]));
base_addr = entries[type];
entry_ptr = &(base_addr[idx]);
- HDassert(entry_ptr->index == idx);
- HDassert(entry_ptr->type == type);
- HDassert(entry_ptr == entry_ptr->self);
- HDassert(entry_ptr->cache_ptr == cache_ptr);
- HDassert(!(entry_ptr->header.is_protected));
- HDassert(!(entry_ptr->is_protected));
- HDassert(!(entry_ptr->header.is_pinned));
- HDassert(!(entry_ptr->is_pinned));
+ assert(entry_ptr->index == idx);
+ assert(entry_ptr->type == type);
+ assert(entry_ptr == entry_ptr->self);
+ assert(entry_ptr->cache_ptr == cache_ptr);
+ assert(!(entry_ptr->header.is_protected));
+ assert(!(entry_ptr->is_protected));
+ assert(!(entry_ptr->header.is_pinned));
+ assert(!(entry_ptr->is_pinned));
result = H5C_expunge_entry(file_ptr, types[type], entry_ptr->addr, H5C__NO_FLAGS_SET);
@@ -2745,7 +2745,7 @@ flush_cache(H5F_t *file_ptr, hbool_t destroy_entries, hbool_t dump_stats, hbool_
if (pass) {
H5C_t *cache_ptr;
- HDassert(file_ptr);
+ assert(file_ptr);
cache_ptr = file_ptr->shared->cache;
@@ -2803,8 +2803,8 @@ cork_entry_type(H5F_t *file_ptr, int32_t type)
cache_ptr = file_ptr->shared->cache;
- HDassert(cache_ptr);
- HDassert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
+ assert(cache_ptr);
+ assert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
baddrs = base_addrs[type];
if (H5C_cork(cache_ptr, baddrs, H5C__SET_CORK, NULL) < 0) {
@@ -2838,8 +2838,8 @@ uncork_entry_type(H5F_t *file_ptr, int32_t type)
cache_ptr = file_ptr->shared->cache;
- HDassert(cache_ptr);
- HDassert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
+ assert(cache_ptr);
+ assert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
baddrs = base_addrs[type];
if (H5C_cork(cache_ptr, baddrs, H5C__UNCORK, NULL) < 0) {
@@ -2879,20 +2879,20 @@ insert_entry(H5F_t *file_ptr, int32_t type, int32_t idx, unsigned int flags)
cache_ptr = file_ptr->shared->cache;
- HDassert(cache_ptr);
- HDassert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
- HDassert((0 <= idx) && (idx <= max_indices[type]));
+ assert(cache_ptr);
+ assert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
+ assert((0 <= idx) && (idx <= max_indices[type]));
base_addr = entries[type];
entry_ptr = &(base_addr[idx]);
baddrs = base_addrs[type];
- HDassert(entry_ptr->index == idx);
- HDassert(entry_ptr->type == type);
- HDassert(entry_ptr == entry_ptr->self);
- HDassert(!(entry_ptr->is_protected));
- HDassert(entry_ptr->flush_dep_npar == 0);
- HDassert(entry_ptr->flush_dep_nchd == 0);
+ assert(entry_ptr->index == idx);
+ assert(entry_ptr->type == type);
+ assert(entry_ptr == entry_ptr->self);
+ assert(!(entry_ptr->is_protected));
+ assert(entry_ptr->flush_dep_npar == 0);
+ assert(entry_ptr->flush_dep_nchd == 0);
insert_pinned = (hbool_t)((flags & H5C__PIN_ENTRY_FLAG) != 0);
@@ -2926,23 +2926,23 @@ insert_entry(H5F_t *file_ptr, int32_t type, int32_t idx, unsigned int flags)
(int)(entry_ptr->addr != entry_ptr->header.addr));
#endif
} /* end if */
- HDassert(entry_ptr->cache_ptr == NULL);
+ assert(entry_ptr->cache_ptr == NULL);
entry_ptr->file_ptr = file_ptr;
entry_ptr->cache_ptr = cache_ptr;
if (insert_pinned)
- HDassert(entry_ptr->header.is_pinned);
+ assert(entry_ptr->header.is_pinned);
else
- HDassert(!(entry_ptr->header.is_pinned));
+ assert(!(entry_ptr->header.is_pinned));
entry_ptr->is_pinned = insert_pinned;
entry_ptr->pinned_from_client = insert_pinned;
if (entry_ptr->header.tag_info && entry_ptr->header.tag_info->corked)
entry_ptr->is_corked = TRUE;
- HDassert(entry_ptr->header.is_dirty);
- HDassert(((entry_ptr->header).type)->id == type);
+ assert(entry_ptr->header.is_dirty);
+ assert(((entry_ptr->header).type)->id == type);
} /* end if */
} /* insert_entry() */
@@ -2972,16 +2972,16 @@ mark_entry_dirty(int32_t type, int32_t idx)
if (pass) {
- HDassert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
- HDassert((0 <= idx) && (idx <= max_indices[type]));
+ assert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
+ assert((0 <= idx) && (idx <= max_indices[type]));
base_addr = entries[type];
entry_ptr = &(base_addr[idx]);
- HDassert(entry_ptr->index == idx);
- HDassert(entry_ptr->type == type);
- HDassert(entry_ptr == entry_ptr->self);
- HDassert(entry_ptr->header.is_protected || entry_ptr->header.is_pinned);
+ assert(entry_ptr->index == idx);
+ assert(entry_ptr->type == type);
+ assert(entry_ptr == entry_ptr->self);
+ assert(entry_ptr->header.is_protected || entry_ptr->header.is_pinned);
was_dirty = entry_ptr->is_dirty;
entry_ptr->is_dirty = TRUE;
@@ -3001,7 +3001,7 @@ mark_entry_dirty(int32_t type, int32_t idx)
failure_mssg = "error in H5C_mark_entry_dirty().";
}
- HDassert(((entry_ptr->header).type)->id == type);
+ assert(((entry_ptr->header).type)->id == type);
}
} /* mark_entry_dirty() */
@@ -3033,25 +3033,25 @@ move_entry(H5C_t *cache_ptr, int32_t type, int32_t idx, hbool_t main_addr)
if (pass) {
- HDassert(cache_ptr);
- HDassert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
- HDassert((0 <= idx) && (idx <= max_indices[type]));
+ assert(cache_ptr);
+ assert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
+ assert((0 <= idx) && (idx <= max_indices[type]));
base_addr = entries[type];
entry_ptr = &(base_addr[idx]);
- HDassert(entry_ptr->index == idx);
- HDassert(entry_ptr->type == type);
- HDassert(entry_ptr == entry_ptr->self);
- HDassert(entry_ptr->cache_ptr == cache_ptr);
- HDassert(!entry_ptr->is_read_only);
- HDassert(!entry_ptr->header.is_read_only);
+ assert(entry_ptr->index == idx);
+ assert(entry_ptr->type == type);
+ assert(entry_ptr == entry_ptr->self);
+ assert(entry_ptr->cache_ptr == cache_ptr);
+ assert(!entry_ptr->is_read_only);
+ assert(!entry_ptr->header.is_read_only);
if (entry_ptr->at_main_addr && !main_addr) {
/* move to alt addr */
- HDassert(entry_ptr->addr == entry_ptr->main_addr);
+ assert(entry_ptr->addr == entry_ptr->main_addr);
done = FALSE;
old_addr = entry_ptr->addr;
@@ -3061,7 +3061,7 @@ move_entry(H5C_t *cache_ptr, int32_t type, int32_t idx, hbool_t main_addr)
/* move to main addr */
- HDassert(entry_ptr->addr == entry_ptr->alt_addr);
+ assert(entry_ptr->addr == entry_ptr->alt_addr);
done = FALSE;
old_addr = entry_ptr->addr;
@@ -3096,10 +3096,10 @@ move_entry(H5C_t *cache_ptr, int32_t type, int32_t idx, hbool_t main_addr)
}
}
- HDassert(((entry_ptr->header).type)->id == type);
+ assert(((entry_ptr->header).type)->id == type);
- HDassert(entry_ptr->header.is_dirty);
- HDassert(entry_ptr->is_dirty);
+ assert(entry_ptr->header.is_dirty);
+ assert(entry_ptr->is_dirty);
}
} /* move_entry() */
@@ -3130,18 +3130,18 @@ protect_entry(H5F_t *file_ptr, int32_t type, int32_t idx)
if (pass) {
cache_ptr = file_ptr->shared->cache;
- HDassert(cache_ptr);
- HDassert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
- HDassert((0 <= idx) && (idx <= max_indices[type]));
+ assert(cache_ptr);
+ assert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
+ assert((0 <= idx) && (idx <= max_indices[type]));
base_addr = entries[type];
entry_ptr = &(base_addr[idx]);
baddrs = base_addrs[type];
- HDassert(entry_ptr->index == idx);
- HDassert(entry_ptr->type == type);
- HDassert(entry_ptr == entry_ptr->self);
- HDassert(!(entry_ptr->is_protected));
+ assert(entry_ptr->index == idx);
+ assert(entry_ptr->type == type);
+ assert(entry_ptr == entry_ptr->self);
+ assert(!(entry_ptr->is_protected));
/* Set the base address of the entry type into the property list as tag */
/* Use to cork entries for the object */
@@ -3186,7 +3186,7 @@ protect_entry(H5F_t *file_ptr, int32_t type, int32_t idx)
} /* end if */
else {
- HDassert((entry_ptr->cache_ptr == NULL) || (entry_ptr->cache_ptr == cache_ptr));
+ assert((entry_ptr->cache_ptr == NULL) || (entry_ptr->cache_ptr == cache_ptr));
entry_ptr->cache_ptr = cache_ptr;
entry_ptr->file_ptr = file_ptr;
@@ -3197,7 +3197,7 @@ protect_entry(H5F_t *file_ptr, int32_t type, int32_t idx)
if (entry_ptr->header.tag_info && entry_ptr->header.tag_info->corked)
entry_ptr->is_corked = TRUE;
- HDassert(((entry_ptr->header).type)->id == type);
+ assert(((entry_ptr->header).type)->id == type);
} /* end if */
} /* protect_entry() */
@@ -3230,18 +3230,17 @@ protect_entry_ro(H5F_t *file_ptr, int32_t type, int32_t idx)
cache_ptr = file_ptr->shared->cache;
- HDassert(cache_ptr);
- HDassert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
- HDassert((0 <= idx) && (idx <= max_indices[type]));
+ assert(cache_ptr);
+ assert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
+ assert((0 <= idx) && (idx <= max_indices[type]));
base_addr = entries[type];
entry_ptr = &(base_addr[idx]);
- HDassert(entry_ptr->index == idx);
- HDassert(entry_ptr->type == type);
- HDassert(entry_ptr == entry_ptr->self);
- HDassert((!(entry_ptr->is_protected)) ||
- ((entry_ptr->is_read_only) && (entry_ptr->ro_ref_count > 0)));
+ assert(entry_ptr->index == idx);
+ assert(entry_ptr->type == type);
+ assert(entry_ptr == entry_ptr->self);
+ assert((!(entry_ptr->is_protected)) || ((entry_ptr->is_read_only) && (entry_ptr->ro_ref_count > 0)));
cache_entry_ptr = (H5C_cache_entry_t *)H5C_protect(file_ptr, types[type], entry_ptr->addr,
&entry_ptr->addr, H5C__READ_ONLY_FLAG);
@@ -3256,7 +3255,7 @@ protect_entry_ro(H5F_t *file_ptr, int32_t type, int32_t idx)
}
else {
- HDassert((entry_ptr->cache_ptr == NULL) || (entry_ptr->cache_ptr == cache_ptr));
+ assert((entry_ptr->cache_ptr == NULL) || (entry_ptr->cache_ptr == cache_ptr));
entry_ptr->cache_ptr = cache_ptr;
entry_ptr->file_ptr = file_ptr;
@@ -3265,7 +3264,7 @@ protect_entry_ro(H5F_t *file_ptr, int32_t type, int32_t idx)
entry_ptr->ro_ref_count++;
}
- HDassert(((entry_ptr->header).type)->id == type);
+ assert(((entry_ptr->header).type)->id == type);
}
} /* protect_entry_ro() */
@@ -3288,8 +3287,8 @@ protect_entry_ro(H5F_t *file_ptr, int32_t type, int32_t idx)
void
pin_entry(int32_t type, int32_t idx)
{
- HDassert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
- HDassert((0 <= idx) && (idx <= max_indices[type]));
+ assert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
+ assert((0 <= idx) && (idx <= max_indices[type]));
if (pass) {
test_entry_t *base_addr;
@@ -3299,11 +3298,11 @@ pin_entry(int32_t type, int32_t idx)
base_addr = entries[type];
entry_ptr = &(base_addr[idx]);
- HDassert(entry_ptr->index == idx);
- HDassert(entry_ptr->type == type);
- HDassert(entry_ptr == entry_ptr->self);
- HDassert(entry_ptr->is_protected);
- HDassert(!(entry_ptr->pinned_from_client));
+ assert(entry_ptr->index == idx);
+ assert(entry_ptr->type == type);
+ assert(entry_ptr == entry_ptr->self);
+ assert(entry_ptr->is_protected);
+ assert(!(entry_ptr->pinned_from_client));
result = H5C_pin_protected_entry((void *)entry_ptr);
@@ -3349,19 +3348,19 @@ unpin_entry(int32_t type, int32_t idx)
test_entry_t *entry_ptr;
if (pass) {
- HDassert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
- HDassert((0 <= idx) && (idx <= max_indices[type]));
+ assert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
+ assert((0 <= idx) && (idx <= max_indices[type]));
base_addr = entries[type];
entry_ptr = &(base_addr[idx]);
- HDassert(entry_ptr->index == idx);
- HDassert(entry_ptr->type == type);
- HDassert(entry_ptr == entry_ptr->self);
- HDassert(entry_ptr->header.is_pinned);
- HDassert(entry_ptr->header.pinned_from_client);
- HDassert(entry_ptr->is_pinned);
- HDassert(entry_ptr->pinned_from_client);
+ assert(entry_ptr->index == idx);
+ assert(entry_ptr->type == type);
+ assert(entry_ptr == entry_ptr->self);
+ assert(entry_ptr->header.is_pinned);
+ assert(entry_ptr->header.pinned_from_client);
+ assert(entry_ptr->is_pinned);
+ assert(entry_ptr->pinned_from_client);
result = H5C_unpin_entry(entry_ptr);
@@ -3378,7 +3377,7 @@ unpin_entry(int32_t type, int32_t idx)
entry_ptr->is_pinned = entry_ptr->pinned_from_cache;
- HDassert(((entry_ptr->header).type)->id == type);
+ assert(((entry_ptr->header).type)->id == type);
}
} /* unpin_entry() */
@@ -3408,24 +3407,24 @@ unprotect_entry(H5F_t *file_ptr, int32_t type, int32_t idx, unsigned int flags)
test_entry_t *entry_ptr;
if (pass) {
- HDassert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
- HDassert((0 <= idx) && (idx <= max_indices[type]));
+ assert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES));
+ assert((0 <= idx) && (idx <= max_indices[type]));
base_addr = entries[type];
entry_ptr = &(base_addr[idx]);
- HDassert(entry_ptr->index == idx);
- HDassert(entry_ptr->type == type);
- HDassert(entry_ptr == entry_ptr->self);
- HDassert(entry_ptr->header.is_protected);
- HDassert(entry_ptr->is_protected);
+ assert(entry_ptr->index == idx);
+ assert(entry_ptr->type == type);
+ assert(entry_ptr == entry_ptr->self);
+ assert(entry_ptr->header.is_protected);
+ assert(entry_ptr->is_protected);
pin_flag_set = (hbool_t)((flags & H5C__PIN_ENTRY_FLAG) != 0);
unpin_flag_set = (hbool_t)((flags & H5C__UNPIN_ENTRY_FLAG) != 0);
- HDassert(!(pin_flag_set && unpin_flag_set));
- HDassert((!pin_flag_set) || (!(entry_ptr->is_pinned)));
- HDassert((!unpin_flag_set) || (entry_ptr->is_pinned));
+ assert(!(pin_flag_set && unpin_flag_set));
+ assert((!pin_flag_set) || (!(entry_ptr->is_pinned)));
+ assert((!unpin_flag_set) || (entry_ptr->is_pinned));
if (flags & H5C__DIRTIED_FLAG) {
hbool_t was_dirty = entry_ptr->is_dirty;
@@ -3465,29 +3464,29 @@ unprotect_entry(H5F_t *file_ptr, int32_t type, int32_t idx, unsigned int flags)
if (pin_flag_set) {
- HDassert(entry_ptr->header.is_pinned);
+ assert(entry_ptr->header.is_pinned);
entry_ptr->pinned_from_client = TRUE;
entry_ptr->is_pinned = TRUE;
}
else if (unpin_flag_set) {
- HDassert(entry_ptr->header.is_pinned == entry_ptr->header.pinned_from_cache);
+ assert(entry_ptr->header.is_pinned == entry_ptr->header.pinned_from_cache);
entry_ptr->pinned_from_client = FALSE;
entry_ptr->is_pinned = entry_ptr->pinned_from_cache;
}
}
- HDassert(((entry_ptr->header).type)->id == type);
+ assert(((entry_ptr->header).type)->id == type);
if ((flags & H5C__DIRTIED_FLAG) != 0 && ((flags & H5C__DELETED_FLAG) == 0)) {
- HDassert(entry_ptr->header.is_dirty);
- HDassert(entry_ptr->is_dirty);
+ assert(entry_ptr->header.is_dirty);
+ assert(entry_ptr->is_dirty);
}
- HDassert(entry_ptr->header.is_protected == entry_ptr->is_protected);
- HDassert(entry_ptr->header.is_read_only == entry_ptr->is_read_only);
- HDassert(entry_ptr->header.ro_ref_count == entry_ptr->ro_ref_count);
+ assert(entry_ptr->header.is_protected == entry_ptr->is_protected);
+ assert(entry_ptr->header.is_read_only == entry_ptr->is_read_only);
+ assert(entry_ptr->header.ro_ref_count == entry_ptr->ro_ref_count);
}
} /* unprotect_entry() */
@@ -3522,8 +3521,8 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
if (pass) {
cache_ptr = file_ptr->shared->cache;
- HDassert(cache_ptr != NULL);
- HDassert(lag >= 10);
+ assert(cache_ptr != NULL);
+ assert(lag >= 10);
if (reset_stats)
H5C_stats__reset(cache_ptr);
@@ -3548,8 +3547,7 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
insert_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
- HDassert((!cache_ptr->slist_enabled) ||
- (cache_ptr->slist_size == cache_ptr->dirty_index_size));
+ assert((!cache_ptr->slist_enabled) || (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
tmp_idx--;
@@ -3560,8 +3558,7 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
protect_entry(file_ptr, type, tmp_idx);
- HDassert((!cache_ptr->slist_enabled) ||
- (cache_ptr->slist_size == cache_ptr->dirty_index_size));
+ assert((!cache_ptr->slist_enabled) || (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
tmp_idx--;
@@ -3572,8 +3569,7 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
- HDassert((!cache_ptr->slist_enabled) ||
- (cache_ptr->slist_size == cache_ptr->dirty_index_size));
+ assert((!cache_ptr->slist_enabled) || (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
/* (don't decrement tmp_idx) */
@@ -3584,8 +3580,7 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
move_entry(cache_ptr, type, tmp_idx, move_to_main_addr);
- HDassert((!cache_ptr->slist_enabled) ||
- (cache_ptr->slist_size == cache_ptr->dirty_index_size));
+ assert((!cache_ptr->slist_enabled) || (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
tmp_idx--;
@@ -3596,8 +3591,7 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
protect_entry(file_ptr, type, tmp_idx);
- HDassert((!cache_ptr->slist_enabled) ||
- (cache_ptr->slist_size == cache_ptr->dirty_index_size));
+ assert((!cache_ptr->slist_enabled) || (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
tmp_idx -= 2;
@@ -3608,8 +3602,7 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
- HDassert((!cache_ptr->slist_enabled) ||
- (cache_ptr->slist_size == cache_ptr->dirty_index_size));
+ assert((!cache_ptr->slist_enabled) || (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
if (do_mult_ro_protects) {
@@ -3621,8 +3614,8 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
protect_entry_ro(file_ptr, type, tmp_idx);
- HDassert((!cache_ptr->slist_enabled) ||
- (cache_ptr->slist_size == cache_ptr->dirty_index_size));
+ assert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
tmp_idx--;
@@ -3633,8 +3626,8 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
protect_entry_ro(file_ptr, type, tmp_idx);
- HDassert((!cache_ptr->slist_enabled) ||
- (cache_ptr->slist_size == cache_ptr->dirty_index_size));
+ assert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
tmp_idx--;
@@ -3645,8 +3638,8 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
protect_entry_ro(file_ptr, type, tmp_idx);
- HDassert((!cache_ptr->slist_enabled) ||
- (cache_ptr->slist_size == cache_ptr->dirty_index_size));
+ assert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
/* (don't decrement tmp_idx) */
@@ -3657,8 +3650,8 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
- HDassert((!cache_ptr->slist_enabled) ||
- (cache_ptr->slist_size == cache_ptr->dirty_index_size));
+ assert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
tmp_idx--;
@@ -3669,8 +3662,8 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
- HDassert((!cache_ptr->slist_enabled) ||
- (cache_ptr->slist_size == cache_ptr->dirty_index_size));
+ assert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
tmp_idx--;
@@ -3681,8 +3674,8 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
- HDassert((!cache_ptr->slist_enabled) ||
- (cache_ptr->slist_size == cache_ptr->dirty_index_size));
+ assert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
} /* if ( do_mult_ro_protects ) */
@@ -3692,8 +3685,7 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
protect_entry(file_ptr, type, idx);
- HDassert((!cache_ptr->slist_enabled) ||
- (cache_ptr->slist_size == cache_ptr->dirty_index_size));
+ assert((!cache_ptr->slist_enabled) || (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
tmp_idx = idx - lag + 2;
@@ -3704,8 +3696,7 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
- HDassert((!cache_ptr->slist_enabled) ||
- (cache_ptr->slist_size == cache_ptr->dirty_index_size));
+ assert((!cache_ptr->slist_enabled) || (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
tmp_idx--;
@@ -3716,8 +3707,7 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
protect_entry(file_ptr, type, tmp_idx);
- HDassert((!cache_ptr->slist_enabled) ||
- (cache_ptr->slist_size == cache_ptr->dirty_index_size));
+ assert((!cache_ptr->slist_enabled) || (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
if (do_destroys) {
@@ -3730,8 +3720,8 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
- HDassert((!cache_ptr->slist_enabled) ||
- (cache_ptr->slist_size == cache_ptr->dirty_index_size));
+ assert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_size == cache_ptr->dirty_index_size));
break;
case 1:
@@ -3741,8 +3731,8 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
- HDassert((!cache_ptr->slist_enabled) ||
- (cache_ptr->slist_size == cache_ptr->dirty_index_size));
+ assert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
else {
if (verbose)
@@ -3751,8 +3741,8 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
unprotect_entry(file_ptr, type, tmp_idx,
(dirty_unprotects ? H5C__DIRTIED_FLAG : H5C__NO_FLAGS_SET));
- HDassert((!cache_ptr->slist_enabled) ||
- (cache_ptr->slist_size == cache_ptr->dirty_index_size));
+ assert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end else */
break;
@@ -3762,8 +3752,8 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
unprotect_entry(file_ptr, type, tmp_idx, H5C__DELETED_FLAG);
- HDassert((!cache_ptr->slist_enabled) ||
- (cache_ptr->slist_size == cache_ptr->dirty_index_size));
+ assert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_size == cache_ptr->dirty_index_size));
break;
case 3:
@@ -3773,8 +3763,8 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
unprotect_entry(file_ptr, type, tmp_idx, H5C__DELETED_FLAG);
- HDassert((!cache_ptr->slist_enabled) ||
- (cache_ptr->slist_size == cache_ptr->dirty_index_size));
+ assert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
else {
if (verbose)
@@ -3784,13 +3774,13 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
(dirty_destroys ? H5C__DIRTIED_FLAG : H5C__NO_FLAGS_SET) |
H5C__DELETED_FLAG);
- HDassert((!cache_ptr->slist_enabled) ||
- (cache_ptr->slist_size == cache_ptr->dirty_index_size));
+ assert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end else */
break;
default:
- HDassert(0); /* this can't happen... */
+ assert(0); /* this can't happen... */
break;
} /* end switch */
} /* end if */
@@ -3804,8 +3794,8 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
unprotect_entry(file_ptr, type, tmp_idx,
(dirty_unprotects ? H5C__DIRTIED_FLAG : H5C__NO_FLAGS_SET));
- HDassert((!cache_ptr->slist_enabled) ||
- (cache_ptr->slist_size == cache_ptr->dirty_index_size));
+ assert((!cache_ptr->slist_enabled) ||
+ (cache_ptr->slist_size == cache_ptr->dirty_index_size));
} /* end if */
} /* end elseif */
@@ -3856,10 +3846,10 @@ hl_row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose, h
cache_ptr = file_ptr->shared->cache;
- HDassert(cache_ptr != NULL);
- HDassert(lag > 5);
- HDassert(max_index >= 200);
- HDassert(max_index <= MAX_ENTRIES);
+ assert(cache_ptr != NULL);
+ assert(lag > 5);
+ assert(max_index >= 200);
+ assert(max_index <= MAX_ENTRIES);
if (reset_stats) {
@@ -3948,8 +3938,8 @@ row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
cache_ptr = file_ptr->shared->cache;
- HDassert(cache_ptr != NULL);
- HDassert(lag >= 10);
+ assert(cache_ptr != NULL);
+ assert(lag >= 10);
if (reset_stats) {
@@ -4143,7 +4133,7 @@ row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
break;
default:
- HDassert(0); /* this can't happen... */
+ assert(0); /* this can't happen... */
break;
}
}
@@ -4208,10 +4198,10 @@ hl_row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose,
cache_ptr = file_ptr->shared->cache;
- HDassert(cache_ptr != NULL);
- HDassert(lag > 5);
- HDassert(max_index >= 200);
- HDassert(max_index <= MAX_ENTRIES);
+ assert(cache_ptr != NULL);
+ assert(lag > 5);
+ assert(max_index >= 200);
+ assert(max_index <= MAX_ENTRIES);
if (reset_stats) {
@@ -4303,7 +4293,7 @@ col_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
for (i = 0; i < NUMBER_OF_ENTRY_TYPES; i++)
local_max_index[i] = MIN(max_index, max_indices[i]);
- HDassert(lag > 5);
+ assert(lag > 5);
if (reset_stats) {
@@ -4393,10 +4383,10 @@ hl_col_major_scan_forward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose, h
cache_ptr = file_ptr->shared->cache;
- HDassert(cache_ptr != NULL);
- HDassert(lag > 5);
- HDassert(max_index >= 500);
- HDassert(max_index <= MAX_ENTRIES);
+ assert(cache_ptr != NULL);
+ assert(lag > 5);
+ assert(max_index >= 500);
+ assert(max_index <= MAX_ENTRIES);
if (reset_stats) {
@@ -4496,12 +4486,12 @@ col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
cache_ptr = file_ptr->shared->cache;
- HDassert(cache_ptr != NULL);
+ assert(cache_ptr != NULL);
for (i = 0; i < NUMBER_OF_ENTRY_TYPES; i++)
local_max_index[i] = MIN(max_index, max_indices[i]);
- HDassert(lag > 5);
+ assert(lag > 5);
if (reset_stats) {
@@ -4600,10 +4590,10 @@ hl_col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose,
cache_ptr = file_ptr->shared->cache;
- HDassert(cache_ptr != NULL);
- HDassert(lag > 5);
- HDassert(max_index >= 500);
- HDassert(max_index <= MAX_ENTRIES);
+ assert(cache_ptr != NULL);
+ assert(lag > 5);
+ assert(max_index >= 500);
+ assert(max_index <= MAX_ENTRIES);
local_max_index = MIN(max_index, MAX_ENTRIES);
@@ -4687,10 +4677,10 @@ hl_col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose,
void
create_flush_dependency(int32_t par_type, int32_t par_idx, int32_t chd_type, int32_t chd_idx)
{
- HDassert((0 <= par_type) && (par_type < NUMBER_OF_ENTRY_TYPES));
- HDassert((0 <= par_idx) && (par_idx <= max_indices[par_type]));
- HDassert((0 <= chd_type) && (chd_type < NUMBER_OF_ENTRY_TYPES));
- HDassert((0 <= chd_idx) && (chd_idx <= max_indices[chd_type]));
+ assert((0 <= par_type) && (par_type < NUMBER_OF_ENTRY_TYPES));
+ assert((0 <= par_idx) && (par_idx <= max_indices[par_type]));
+ assert((0 <= chd_type) && (chd_type < NUMBER_OF_ENTRY_TYPES));
+ assert((0 <= chd_idx) && (chd_idx <= max_indices[chd_type]));
if (pass) {
test_entry_t *par_base_addr; /* Base entry of parent's entry array */
@@ -4706,19 +4696,19 @@ create_flush_dependency(int32_t par_type, int32_t par_idx, int32_t chd_type, int
par_is_pinned = par_entry_ptr->header.is_pinned;
/* Sanity check parent entry */
- HDassert(par_entry_ptr->index == par_idx);
- HDassert(par_entry_ptr->type == par_type);
- HDassert(par_entry_ptr->header.is_protected);
- HDassert(par_entry_ptr == par_entry_ptr->self);
+ assert(par_entry_ptr->index == par_idx);
+ assert(par_entry_ptr->type == par_type);
+ assert(par_entry_ptr->header.is_protected);
+ assert(par_entry_ptr == par_entry_ptr->self);
/* Get parent entry */
chd_base_addr = entries[chd_type];
chd_entry_ptr = &(chd_base_addr[chd_idx]);
/* Sanity check child entry */
- HDassert(chd_entry_ptr->index == chd_idx);
- HDassert(chd_entry_ptr->type == chd_type);
- HDassert(chd_entry_ptr == chd_entry_ptr->self);
+ assert(chd_entry_ptr->index == chd_idx);
+ assert(chd_entry_ptr->type == chd_type);
+ assert(chd_entry_ptr == chd_entry_ptr->self);
result = H5C_create_flush_dependency(par_entry_ptr, chd_entry_ptr);
@@ -4730,13 +4720,13 @@ create_flush_dependency(int32_t par_type, int32_t par_idx, int32_t chd_type, int
} /* end if */
/* Update information about entries */
- HDassert(chd_entry_ptr->flush_dep_npar < MAX_FLUSH_DEP_PARS);
+ assert(chd_entry_ptr->flush_dep_npar < MAX_FLUSH_DEP_PARS);
chd_entry_ptr->flush_dep_par_type[chd_entry_ptr->flush_dep_npar] = par_type;
chd_entry_ptr->flush_dep_par_idx[chd_entry_ptr->flush_dep_npar] = par_idx;
chd_entry_ptr->flush_dep_npar++;
par_entry_ptr->flush_dep_nchd++;
if (chd_entry_ptr->is_dirty || chd_entry_ptr->flush_dep_ndirty_chd > 0) {
- HDassert(par_entry_ptr->flush_dep_ndirty_chd < par_entry_ptr->flush_dep_nchd);
+ assert(par_entry_ptr->flush_dep_ndirty_chd < par_entry_ptr->flush_dep_nchd);
par_entry_ptr->flush_dep_ndirty_chd++;
} /* end if */
par_entry_ptr->pinned_from_cache = TRUE;
@@ -4763,10 +4753,10 @@ create_flush_dependency(int32_t par_type, int32_t par_idx, int32_t chd_type, int
void
destroy_flush_dependency(int32_t par_type, int32_t par_idx, int32_t chd_type, int32_t chd_idx)
{
- HDassert((0 <= par_type) && (par_type < NUMBER_OF_ENTRY_TYPES));
- HDassert((0 <= par_idx) && (par_idx <= max_indices[par_type]));
- HDassert((0 <= chd_type) && (chd_type < NUMBER_OF_ENTRY_TYPES));
- HDassert((0 <= chd_idx) && (chd_idx <= max_indices[chd_type]));
+ assert((0 <= par_type) && (par_type < NUMBER_OF_ENTRY_TYPES));
+ assert((0 <= par_idx) && (par_idx <= max_indices[par_type]));
+ assert((0 <= chd_type) && (chd_type < NUMBER_OF_ENTRY_TYPES));
+ assert((0 <= chd_idx) && (chd_idx <= max_indices[chd_type]));
if (pass) {
test_entry_t *par_base_addr; /* Base entry of parent's entry array */
@@ -4780,20 +4770,20 @@ destroy_flush_dependency(int32_t par_type, int32_t par_idx, int32_t chd_type, in
par_entry_ptr = &(par_base_addr[par_idx]);
/* Sanity check parent entry */
- HDassert(par_entry_ptr->is_pinned);
- HDassert(par_entry_ptr->pinned_from_cache);
- HDassert(par_entry_ptr->flush_dep_nchd > 0);
- HDassert(par_entry_ptr == par_entry_ptr->self);
+ assert(par_entry_ptr->is_pinned);
+ assert(par_entry_ptr->pinned_from_cache);
+ assert(par_entry_ptr->flush_dep_nchd > 0);
+ assert(par_entry_ptr == par_entry_ptr->self);
/* Get parent entry */
chd_base_addr = entries[chd_type];
chd_entry_ptr = &(chd_base_addr[chd_idx]);
/* Sanity check child entry */
- HDassert(chd_entry_ptr->index == chd_idx);
- HDassert(chd_entry_ptr->type == chd_type);
- HDassert(chd_entry_ptr->flush_dep_npar > 0);
- HDassert(chd_entry_ptr == chd_entry_ptr->self);
+ assert(chd_entry_ptr->index == chd_idx);
+ assert(chd_entry_ptr->type == chd_type);
+ assert(chd_entry_ptr->flush_dep_npar > 0);
+ assert(chd_entry_ptr == chd_entry_ptr->self);
if (H5C_destroy_flush_dependency(par_entry_ptr, chd_entry_ptr) < 0) {
pass = FALSE;
@@ -4805,7 +4795,7 @@ destroy_flush_dependency(int32_t par_type, int32_t par_idx, int32_t chd_type, in
if (chd_entry_ptr->flush_dep_par_type[i] == par_type &&
chd_entry_ptr->flush_dep_par_idx[i] == par_idx)
break;
- HDassert(i < chd_entry_ptr->flush_dep_npar);
+ assert(i < chd_entry_ptr->flush_dep_npar);
if (i < chd_entry_ptr->flush_dep_npar - 1)
HDmemmove(&chd_entry_ptr->flush_dep_par_type[i], &chd_entry_ptr->flush_dep_par_type[i + 1],
(chd_entry_ptr->flush_dep_npar - i - 1) * sizeof(chd_entry_ptr->flush_dep_par_type[0]));
@@ -4819,7 +4809,7 @@ destroy_flush_dependency(int32_t par_type, int32_t par_idx, int32_t chd_type, in
par_entry_ptr->is_pinned = par_entry_ptr->pinned_from_client;
} /* end if */
if (chd_entry_ptr->is_dirty || chd_entry_ptr->flush_dep_ndirty_chd > 0) {
- HDassert(par_entry_ptr->flush_dep_ndirty_chd > 0);
+ assert(par_entry_ptr->flush_dep_ndirty_chd > 0);
par_entry_ptr->flush_dep_ndirty_chd--;
if (!par_entry_ptr->is_dirty && par_entry_ptr->flush_dep_ndirty_chd == 0)
mark_flush_dep_clean(par_entry_ptr);
@@ -4846,7 +4836,7 @@ static void
mark_flush_dep_dirty(test_entry_t *entry_ptr)
{
/* Sanity checks */
- HDassert(entry_ptr);
+ assert(entry_ptr);
/* Iterate over the parent entries */
if (entry_ptr->flush_dep_npar) {
@@ -4860,7 +4850,7 @@ mark_flush_dep_dirty(test_entry_t *entry_ptr)
par_entry_ptr = &(par_base_addr[entry_ptr->flush_dep_par_idx[u]]);
/* Sanity check */
- HDassert(par_entry_ptr->flush_dep_ndirty_chd < par_entry_ptr->flush_dep_nchd);
+ assert(par_entry_ptr->flush_dep_ndirty_chd < par_entry_ptr->flush_dep_nchd);
/* Adjust the parent's number of dirty children */
par_entry_ptr->flush_dep_ndirty_chd++;
@@ -4887,8 +4877,8 @@ static void
mark_flush_dep_clean(test_entry_t *entry_ptr)
{
/* Sanity checks */
- HDassert(entry_ptr);
- HDassert(!entry_ptr->is_dirty && entry_ptr->flush_dep_ndirty_chd == 0);
+ assert(entry_ptr);
+ assert(!entry_ptr->is_dirty && entry_ptr->flush_dep_ndirty_chd == 0);
/* Iterate over the parent entries */
if (entry_ptr->flush_dep_npar) {
@@ -4902,7 +4892,7 @@ mark_flush_dep_clean(test_entry_t *entry_ptr)
par_entry_ptr = &(par_base_addr[entry_ptr->flush_dep_par_idx[u]]);
/* Sanity check */
- HDassert(par_entry_ptr->flush_dep_ndirty_chd > 0);
+ assert(par_entry_ptr->flush_dep_ndirty_chd > 0);
/* Adjust the parent's number of dirty children */
par_entry_ptr->flush_dep_ndirty_chd--;
@@ -5327,7 +5317,7 @@ dump_LRU(H5F_t * file_ptr)
H5C_cache_entry_t * entry_ptr = NULL;
H5C_t *cache_ptr = file_ptr->shared->cache;
- HDassert(cache_ptr);
+ assert(cache_ptr);
entry_ptr = cache_ptr->LRU_head_ptr;