summaryrefslogtreecommitdiffstats
path: root/test/cache_common.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-07-27 20:43:30 (GMT)
committerGitHub <noreply@github.com>2023-07-27 20:43:30 (GMT)
commit1e91d96fa02466ffe451319bdac1005f84dc7993 (patch)
tree4de04ef502c313dfd766497b20235188761146c0 /test/cache_common.c
parent95e5349089b95dfb95f0f8ce2d6db1bc04ba6c82 (diff)
downloadhdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.zip
hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.tar.gz
hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.tar.bz2
Brings over most of the HD prefix removal (#3293)
Diffstat (limited to 'test/cache_common.c')
-rw-r--r--test/cache_common.c1143
1 files changed, 566 insertions, 577 deletions
diff --git a/test/cache_common.c b/test/cache_common.c
index e647abf..aaf42f1 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,48 +686,48 @@ 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)) {
if ((*((const char *)image)) != (char)(idx & 0xFF)) {
- HDfprintf(stdout, "type = %d, idx = %d, addr = 0x%lx.\n", type, idx, (long)addr);
- HDfprintf(stdout, "*image = 0x%x\n", (int)(*((const char *)image)));
- HDfprintf(stdout, "expected *image = 0x%x\n", (int)(idx & 0xFF));
+ fprintf(stdout, "type = %d, idx = %d, addr = 0x%lx.\n", type, idx, (long)addr);
+ fprintf(stdout, "*image = 0x%x\n", (int)(*((const char *)image)));
+ fprintf(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)) {
- HDfprintf(stdout, "type = %d, idx = %d, addr = 0x%lx.\n", type, idx, (long)addr);
- HDfprintf(stdout, "*image = 0x%" PRIx8 " 0x%" PRIx8 " 0x%" PRIx8 "\n",
- (*((const uint8_t *)image)), (*(((const uint8_t *)image) + 1)),
- (*(((const uint8_t *)image) + 2)));
- HDfprintf(stdout, "expected *image = 0x%02" PRIx32 "%02" PRIx32 "\n", (uint32_t)idx & 0xFF,
- (((uint32_t)idx & 0xFF00) >> 8));
+ fprintf(stdout, "type = %d, idx = %d, addr = 0x%lx.\n", type, idx, (long)addr);
+ fprintf(stdout, "*image = 0x%" PRIx8 " 0x%" PRIx8 " 0x%" PRIx8 "\n",
+ (*((const uint8_t *)image)), (*(((const uint8_t *)image) + 1)),
+ (*(((const uint8_t *)image) + 2)));
+ fprintf(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);
+ memset(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,21 +1327,21 @@ 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->cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert((entry->header.destroy_in_progress) || (entry->header.addr == entry->addr));
- HDassert(entry->header.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
- 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->cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert((entry->header.destroy_in_progress) || (entry->header.addr == entry->addr));
+ assert(entry->header.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
+ 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;
@@ -1353,21 +1353,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 */
@@ -1480,23 +1480,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;
@@ -1542,10 +1542,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]);
@@ -1553,15 +1553,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;
@@ -1605,16 +1605,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)) {
@@ -1626,9 +1626,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)) {
@@ -1672,20 +1672,20 @@ 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(cache_ptr->magic == H5C__H5C_T_MAGIC);
- 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(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ 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) {
@@ -1694,7 +1694,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;
@@ -1705,9 +1705,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;
@@ -1730,16 +1730,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 */
@@ -1749,7 +1749,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;
@@ -1769,12 +1769,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;
@@ -1809,24 +1809,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);
@@ -1851,70 +1851,69 @@ create_entry_arrays(void)
{
/* pico entries */
- if (NULL == (pico_entries = (test_entry_t *)HDcalloc(NUM_PICO_ENTRIES, sizeof(test_entry_t))))
+ if (NULL == (pico_entries = (test_entry_t *)calloc(NUM_PICO_ENTRIES, sizeof(test_entry_t))))
goto error;
- if (NULL == (orig_pico_entries = (test_entry_t *)HDcalloc(NUM_PICO_ENTRIES, sizeof(test_entry_t))))
+ if (NULL == (orig_pico_entries = (test_entry_t *)calloc(NUM_PICO_ENTRIES, sizeof(test_entry_t))))
goto error;
/* nano entries */
- if (NULL == (nano_entries = (test_entry_t *)HDcalloc(NUM_NANO_ENTRIES, sizeof(test_entry_t))))
+ if (NULL == (nano_entries = (test_entry_t *)calloc(NUM_NANO_ENTRIES, sizeof(test_entry_t))))
goto error;
- if (NULL == (orig_nano_entries = (test_entry_t *)HDcalloc(NUM_NANO_ENTRIES, sizeof(test_entry_t))))
+ if (NULL == (orig_nano_entries = (test_entry_t *)calloc(NUM_NANO_ENTRIES, sizeof(test_entry_t))))
goto error;
/* micro entries */
- if (NULL == (micro_entries = (test_entry_t *)HDcalloc(NUM_MICRO_ENTRIES, sizeof(test_entry_t))))
+ if (NULL == (micro_entries = (test_entry_t *)calloc(NUM_MICRO_ENTRIES, sizeof(test_entry_t))))
goto error;
- if (NULL == (orig_micro_entries = (test_entry_t *)HDcalloc(NUM_MICRO_ENTRIES, sizeof(test_entry_t))))
+ if (NULL == (orig_micro_entries = (test_entry_t *)calloc(NUM_MICRO_ENTRIES, sizeof(test_entry_t))))
goto error;
/* tiny entries */
- if (NULL == (tiny_entries = (test_entry_t *)HDcalloc(NUM_TINY_ENTRIES, sizeof(test_entry_t))))
+ if (NULL == (tiny_entries = (test_entry_t *)calloc(NUM_TINY_ENTRIES, sizeof(test_entry_t))))
goto error;
- if (NULL == (orig_tiny_entries = (test_entry_t *)HDcalloc(NUM_TINY_ENTRIES, sizeof(test_entry_t))))
+ if (NULL == (orig_tiny_entries = (test_entry_t *)calloc(NUM_TINY_ENTRIES, sizeof(test_entry_t))))
goto error;
/* small entries */
- if (NULL == (small_entries = (test_entry_t *)HDcalloc(NUM_SMALL_ENTRIES, sizeof(test_entry_t))))
+ if (NULL == (small_entries = (test_entry_t *)calloc(NUM_SMALL_ENTRIES, sizeof(test_entry_t))))
goto error;
- if (NULL == (orig_small_entries = (test_entry_t *)HDcalloc(NUM_SMALL_ENTRIES, sizeof(test_entry_t))))
+ if (NULL == (orig_small_entries = (test_entry_t *)calloc(NUM_SMALL_ENTRIES, sizeof(test_entry_t))))
goto error;
/* medium entries */
- if (NULL == (medium_entries = (test_entry_t *)HDcalloc(NUM_MEDIUM_ENTRIES, sizeof(test_entry_t))))
+ if (NULL == (medium_entries = (test_entry_t *)calloc(NUM_MEDIUM_ENTRIES, sizeof(test_entry_t))))
goto error;
- if (NULL == (orig_medium_entries = (test_entry_t *)HDcalloc(NUM_MEDIUM_ENTRIES, sizeof(test_entry_t))))
+ if (NULL == (orig_medium_entries = (test_entry_t *)calloc(NUM_MEDIUM_ENTRIES, sizeof(test_entry_t))))
goto error;
/* large entries */
- if (NULL == (large_entries = (test_entry_t *)HDcalloc(NUM_LARGE_ENTRIES, sizeof(test_entry_t))))
+ if (NULL == (large_entries = (test_entry_t *)calloc(NUM_LARGE_ENTRIES, sizeof(test_entry_t))))
goto error;
- if (NULL == (orig_large_entries = (test_entry_t *)HDcalloc(NUM_LARGE_ENTRIES, sizeof(test_entry_t))))
+ if (NULL == (orig_large_entries = (test_entry_t *)calloc(NUM_LARGE_ENTRIES, sizeof(test_entry_t))))
goto error;
/* huge entries */
- if (NULL == (huge_entries = (test_entry_t *)HDcalloc(NUM_HUGE_ENTRIES, sizeof(test_entry_t))))
+ if (NULL == (huge_entries = (test_entry_t *)calloc(NUM_HUGE_ENTRIES, sizeof(test_entry_t))))
goto error;
- if (NULL == (orig_huge_entries = (test_entry_t *)HDcalloc(NUM_HUGE_ENTRIES, sizeof(test_entry_t))))
+ if (NULL == (orig_huge_entries = (test_entry_t *)calloc(NUM_HUGE_ENTRIES, sizeof(test_entry_t))))
goto error;
/* monster entries */
- if (NULL == (monster_entries = (test_entry_t *)HDcalloc(NUM_MONSTER_ENTRIES, sizeof(test_entry_t))))
+ if (NULL == (monster_entries = (test_entry_t *)calloc(NUM_MONSTER_ENTRIES, sizeof(test_entry_t))))
goto error;
- if (NULL == (orig_monster_entries = (test_entry_t *)HDcalloc(NUM_MONSTER_ENTRIES, sizeof(test_entry_t))))
+ if (NULL == (orig_monster_entries = (test_entry_t *)calloc(NUM_MONSTER_ENTRIES, sizeof(test_entry_t))))
goto error;
/* variable entries */
- if (NULL == (variable_entries = (test_entry_t *)HDcalloc(NUM_VARIABLE_ENTRIES, sizeof(test_entry_t))))
+ if (NULL == (variable_entries = (test_entry_t *)calloc(NUM_VARIABLE_ENTRIES, sizeof(test_entry_t))))
goto error;
- if (NULL ==
- (orig_variable_entries = (test_entry_t *)HDcalloc(NUM_VARIABLE_ENTRIES, sizeof(test_entry_t))))
+ if (NULL == (orig_variable_entries = (test_entry_t *)calloc(NUM_VARIABLE_ENTRIES, sizeof(test_entry_t))))
goto error;
/* notify entries */
- if (NULL == (notify_entries = (test_entry_t *)HDcalloc(NUM_NOTIFY_ENTRIES, sizeof(test_entry_t))))
+ if (NULL == (notify_entries = (test_entry_t *)calloc(NUM_NOTIFY_ENTRIES, sizeof(test_entry_t))))
goto error;
- if (NULL == (orig_notify_entries = (test_entry_t *)HDcalloc(NUM_NOTIFY_ENTRIES, sizeof(test_entry_t))))
+ if (NULL == (orig_notify_entries = (test_entry_t *)calloc(NUM_NOTIFY_ENTRIES, sizeof(test_entry_t))))
goto error;
entries[0] = pico_entries;
@@ -1967,48 +1966,48 @@ free_entry_arrays(void)
{
/* pico entries */
- HDfree(pico_entries);
- HDfree(orig_pico_entries);
+ free(pico_entries);
+ free(orig_pico_entries);
/* nano entries */
- HDfree(nano_entries);
- HDfree(orig_nano_entries);
+ free(nano_entries);
+ free(orig_nano_entries);
/* micro entries */
- HDfree(micro_entries);
- HDfree(orig_micro_entries);
+ free(micro_entries);
+ free(orig_micro_entries);
/* tiny entries */
- HDfree(tiny_entries);
- HDfree(orig_tiny_entries);
+ free(tiny_entries);
+ free(orig_tiny_entries);
/* small entries */
- HDfree(small_entries);
- HDfree(orig_small_entries);
+ free(small_entries);
+ free(orig_small_entries);
/* medium entries */
- HDfree(medium_entries);
- HDfree(orig_medium_entries);
+ free(medium_entries);
+ free(orig_medium_entries);
/* large entries */
- HDfree(large_entries);
- HDfree(orig_large_entries);
+ free(large_entries);
+ free(orig_large_entries);
/* huge entries */
- HDfree(huge_entries);
- HDfree(orig_huge_entries);
+ free(huge_entries);
+ free(orig_huge_entries);
/* monster entries */
- HDfree(monster_entries);
- HDfree(orig_monster_entries);
+ free(monster_entries);
+ free(orig_monster_entries);
/* variable entries */
- HDfree(variable_entries);
- HDfree(orig_variable_entries);
+ free(variable_entries);
+ free(orig_variable_entries);
/* notify entries */
- HDfree(notify_entries);
- HDfree(orig_notify_entries);
+ free(notify_entries);
+ free(orig_notify_entries);
} /* free_entry_arrays() */
@@ -2047,8 +2046,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;
@@ -2136,7 +2135,7 @@ reset_entries(void)
} /* end for */
/* Make copy of entries in base_addr for later */
- HDmemcpy(orig_base_addr, base_addr, (size_t)(max_index + 1) * sizeof(*base_addr));
+ memcpy(orig_base_addr, base_addr, (size_t)(max_index + 1) * sizeof(*base_addr));
} /* end for */
/* Indicate that we've made a copy for later */
@@ -2149,7 +2148,7 @@ reset_entries(void)
orig_base_addr = orig_entries[i];
/* Make copy of entries in base_addr for later */
- HDmemcpy(base_addr, orig_base_addr, (size_t)(max_index + 1) * sizeof(*base_addr));
+ memcpy(base_addr, orig_base_addr, (size_t)(max_index + 1) * sizeof(*base_addr));
} /* end for */
} /* end else */
@@ -2181,17 +2180,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)) {
@@ -2203,10 +2202,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)) {
@@ -2231,7 +2230,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);
}
}
}
@@ -2278,7 +2277,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)) {
@@ -2645,10 +2644,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)) {
@@ -2691,23 +2690,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);
@@ -2748,7 +2747,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;
@@ -2772,9 +2771,9 @@ flush_cache(H5F_t *file_ptr, hbool_t destroy_entries, hbool_t dump_stats, hbool_
if (verbose) {
- HDfprintf(stdout, "%s: unexpected il/is/cis/dis = %lld/%lld/%lld/%lld.\n", __func__,
- (long long)(cache_ptr->index_len), (long long)(cache_ptr->index_size),
- (long long)(cache_ptr->clean_index_size), (long long)(cache_ptr->dirty_index_size));
+ fprintf(stdout, "%s: unexpected il/is/cis/dis = %lld/%lld/%lld/%lld.\n", __func__,
+ (long long)(cache_ptr->index_len), (long long)(cache_ptr->index_size),
+ (long long)(cache_ptr->clean_index_size), (long long)(cache_ptr->dirty_index_size));
}
pass = FALSE;
failure_mssg = "non zero index len/sizes after H5C_flush_cache() with invalidate.";
@@ -2806,8 +2805,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) {
@@ -2841,8 +2840,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) {
@@ -2882,20 +2881,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);
@@ -2915,37 +2914,37 @@ insert_entry(H5F_t *file_ptr, int32_t type, int32_t idx, unsigned int flags)
#if 0 /* This is useful debugging code. Lets keep it around. */
- HDfprintf(stdout, "result = %d\n", (int)result);
- HDfprintf(stdout, "entry_ptr->header.is_protected = %d\n",
+ fprintf(stdout, "result = %d\n", (int)result);
+ fprintf(stdout, "entry_ptr->header.is_protected = %d\n",
(int)(entry_ptr->header.is_protected));
- HDfprintf(stdout,
+ fprintf(stdout,
"entry_ptr->header.type != types[type] = %d\n",
(int)(entry_ptr->header.type != types[type]));
- HDfprintf(stdout,
+ fprintf(stdout,
"entry_ptr->size != entry_ptr->header.size = %d\n",
(int)(entry_ptr->size != entry_ptr->header.size));
- HDfprintf(stdout,
+ fprintf(stdout,
"entry_ptr->addr != entry_ptr->header.addr = %d\n",
(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() */
@@ -2975,16 +2974,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;
@@ -3004,7 +3003,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() */
@@ -3036,25 +3035,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;
@@ -3064,7 +3063,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;
@@ -3099,10 +3098,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() */
@@ -3133,18 +3132,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 */
@@ -3163,22 +3162,22 @@ protect_entry(H5F_t *file_ptr, int32_t type, int32_t idx)
* again.
* - JRM
*/
- HDfprintf(stdout, "( cache_entry_ptr != (void *)entry_ptr ) = %d\n",
+ fprintf(stdout, "( cache_entry_ptr != (void *)entry_ptr ) = %d\n",
(int)( cache_entry_ptr != (void *)entry_ptr ));
- HDfprintf(stdout, "cache_entry_ptr = 0x%lx, entry_ptr = 0x%lx\n",
+ fprintf(stdout, "cache_entry_ptr = 0x%lx, entry_ptr = 0x%lx\n",
(long)cache_entry_ptr, (long)entry_ptr);
- HDfprintf(stdout, "entry_ptr->header.is_protected = %d\n",
+ fprintf(stdout, "entry_ptr->header.is_protected = %d\n",
(int)(entry_ptr->header.is_protected));
- HDfprintf(stdout,
+ fprintf(stdout,
"( entry_ptr->header.type != types[type] ) = %d\n",
(int)( entry_ptr->header.type != types[type] ));
- HDfprintf(stdout,
+ fprintf(stdout,
"entry_ptr->size = %d, entry_ptr->header.size = %d\n",
(int)(entry_ptr->size), (int)(entry_ptr->header.size));
- HDfprintf(stdout,
+ fprintf(stdout,
"entry_ptr->addr = %d, entry_ptr->header.addr = %d\n",
(int)(entry_ptr->addr), (int)(entry_ptr->header.addr));
- HDfprintf(stdout,
+ fprintf(stdout,
"entry_ptr->verify_ct = %d, entry_ptr->max_verify_ct = %d\n",
entry_ptr->verify_ct, entry_ptr->max_verify_ct);
H5Eprint2(H5E_DEFAULT, stdout);
@@ -3189,7 +3188,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;
@@ -3200,7 +3199,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() */
@@ -3233,18 +3232,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);
@@ -3259,7 +3257,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;
@@ -3268,7 +3266,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() */
@@ -3291,8 +3289,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;
@@ -3302,11 +3300,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);
@@ -3352,19 +3350,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);
@@ -3381,7 +3379,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() */
@@ -3411,24 +3409,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;
@@ -3468,29 +3466,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() */
@@ -3521,12 +3519,12 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
int32_t local_max_index;
if (verbose)
- HDfprintf(stdout, "%s(): entering.\n", __func__);
+ fprintf(stdout, "%s(): entering.\n", __func__);
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);
@@ -3540,79 +3538,73 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
int32_t tmp_idx;
if (verbose)
- HDfprintf(stdout, "%d:%d: ", type, idx);
+ fprintf(stdout, "%d:%d: ", type, idx);
tmp_idx = idx + lag;
if (pass && do_inserts && (tmp_idx >= 0) && (tmp_idx <= local_max_index) &&
((tmp_idx % 2) == 0) && !entry_in_cache(cache_ptr, type, tmp_idx)) {
if (verbose)
- HDfprintf(stdout, "1(i, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "1(i, %d, %d) ", type, tmp_idx);
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--;
if (pass && (tmp_idx >= 0) && (tmp_idx <= local_max_index) && (tmp_idx % 3) == 0) {
if (verbose)
- HDfprintf(stdout, "2(p, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "2(p, %d, %d) ", type, tmp_idx);
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--;
if (pass && (tmp_idx >= 0) && (tmp_idx <= local_max_index) && (tmp_idx % 3) == 0) {
if (verbose)
- HDfprintf(stdout, "3(u, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "3(u, %d, %d) ", type, tmp_idx);
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) */
if (pass && do_moves && (tmp_idx >= 0) && (tmp_idx <= local_max_index) && (tmp_idx % 3) == 0) {
if (verbose)
- HDfprintf(stdout, "4(r, %d, %d, %d) ", type, tmp_idx, (int)move_to_main_addr);
+ fprintf(stdout, "4(r, %d, %d, %d) ", type, tmp_idx, (int)move_to_main_addr);
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--;
if (pass && (tmp_idx >= 0) && (tmp_idx <= local_max_index) && (tmp_idx % 5) == 0) {
if (verbose)
- HDfprintf(stdout, "5(p, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "5(p, %d, %d) ", type, tmp_idx);
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;
if (pass && (tmp_idx >= 0) && (tmp_idx <= local_max_index) && (tmp_idx % 5) == 0) {
if (verbose)
- HDfprintf(stdout, "6(u, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "6(u, %d, %d) ", type, tmp_idx);
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) {
@@ -3620,107 +3612,104 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
if (pass && (tmp_idx >= 0) && (tmp_idx < local_max_index) && (tmp_idx % 9) == 0) {
if (verbose)
- HDfprintf(stdout, "7(p-ro, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "7(p-ro, %d, %d) ", type, tmp_idx);
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--;
if (pass && (tmp_idx >= 0) && (tmp_idx < local_max_index) && (tmp_idx % 11) == 0) {
if (verbose)
- HDfprintf(stdout, "8(p-ro, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "8(p-ro, %d, %d) ", type, tmp_idx);
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--;
if (pass && (tmp_idx >= 0) && (tmp_idx < local_max_index) && (tmp_idx % 13) == 0) {
if (verbose)
- HDfprintf(stdout, "9(p-ro, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "9(p-ro, %d, %d) ", type, tmp_idx);
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) */
if (pass && (tmp_idx >= 0) && (tmp_idx < local_max_index) && (tmp_idx % 9) == 0) {
if (verbose)
- HDfprintf(stdout, "10(u-ro, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "10(u-ro, %d, %d) ", type, tmp_idx);
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--;
if (pass && (tmp_idx >= 0) && (tmp_idx < local_max_index) && (tmp_idx % 11) == 0) {
if (verbose)
- HDfprintf(stdout, "11(u-ro, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "11(u-ro, %d, %d) ", type, tmp_idx);
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--;
if (pass && (tmp_idx >= 0) && (tmp_idx < local_max_index) && (tmp_idx % 13) == 0) {
if (verbose)
- HDfprintf(stdout, "12(u-ro, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "12(u-ro, %d, %d) ", type, tmp_idx);
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 ) */
if (pass && (idx >= 0) && (idx <= local_max_index)) {
if (verbose)
- HDfprintf(stdout, "13(p, %d, %d) ", type, idx);
+ fprintf(stdout, "13(p, %d, %d) ", type, idx);
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;
if (pass && (tmp_idx >= 0) && (tmp_idx <= local_max_index) && (tmp_idx % 7) == 0) {
if (verbose)
- HDfprintf(stdout, "14(u, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "14(u, %d, %d) ", type, tmp_idx);
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--;
if (pass && (tmp_idx >= 0) && (tmp_idx <= local_max_index) && (tmp_idx % 7) == 0) {
if (verbose)
- HDfprintf(stdout, "15(p, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "15(p, %d, %d) ", type, tmp_idx);
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) {
@@ -3729,71 +3718,71 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
switch (tmp_idx % 4) {
case 0: /* we just did an insert */
if (verbose)
- HDfprintf(stdout, "16(u, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "16(u, %d, %d) ", type, tmp_idx);
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:
if ((entries[type])[tmp_idx].is_dirty) {
if (verbose)
- HDfprintf(stdout, "17(u, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "17(u, %d, %d) ", type, tmp_idx);
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)
- HDfprintf(stdout, "18(u, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "18(u, %d, %d) ", type, tmp_idx);
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;
case 2: /* we just did an insert */
if (verbose)
- HDfprintf(stdout, "19(u-del, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "19(u-del, %d, %d) ", type, tmp_idx);
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:
if ((entries[type])[tmp_idx].is_dirty) {
if (verbose)
- HDfprintf(stdout, "20(u-del, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "20(u-del, %d, %d) ", type, tmp_idx);
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)
- HDfprintf(stdout, "21(u-del, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "21(u-del, %d, %d) ", type, tmp_idx);
unprotect_entry(file_ptr, type, tmp_idx,
(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 */
@@ -3802,18 +3791,18 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
tmp_idx = idx - lag;
if (pass && (tmp_idx >= 0) && (tmp_idx <= local_max_index)) {
if (verbose)
- HDfprintf(stdout, "22(u, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "22(u, %d, %d) ", type, tmp_idx);
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 */
if (verbose)
- HDfprintf(stdout, "\n");
+ fprintf(stdout, "\n");
idx++;
} /* end while */
@@ -3853,16 +3842,16 @@ hl_row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose, h
int32_t local_max_index;
if (verbose)
- HDfprintf(stdout, "%s(): entering.\n", __func__);
+ fprintf(stdout, "%s(): entering.\n", __func__);
if (pass) {
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) {
@@ -3880,7 +3869,7 @@ hl_row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose, h
(((idx + lag) % 2) == 0) && (!entry_in_cache(cache_ptr, type, (idx + lag)))) {
if (verbose)
- HDfprintf(stdout, "(i, %d, %d) ", type, (idx + lag));
+ fprintf(stdout, "(i, %d, %d) ", type, (idx + lag));
insert_entry(file_ptr, type, (idx + lag), H5C__NO_FLAGS_SET);
}
@@ -3891,12 +3880,12 @@ hl_row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose, h
if ((pass) && (i >= 0) && (i <= local_max_index)) {
if (verbose)
- HDfprintf(stdout, "(p, %d, %d) ", type, i);
+ fprintf(stdout, "(p, %d, %d) ", type, i);
protect_entry(file_ptr, type, i);
if (verbose)
- HDfprintf(stdout, "(u, %d, %d) ", type, i);
+ fprintf(stdout, "(u, %d, %d) ", type, i);
unprotect_entry(file_ptr, type, i, H5C__NO_FLAGS_SET);
}
@@ -3904,7 +3893,7 @@ hl_row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose, h
}
if (verbose)
- HDfprintf(stdout, "\n");
+ fprintf(stdout, "\n");
idx++;
}
@@ -3945,14 +3934,14 @@ row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
int32_t local_max_index;
if (verbose)
- HDfprintf(stdout, "%s(): Entering.\n", __func__);
+ fprintf(stdout, "%s(): Entering.\n", __func__);
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) {
@@ -3973,7 +3962,7 @@ row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
((tmp_idx % 2) == 1) && (!entry_in_cache(cache_ptr, type, tmp_idx))) {
if (verbose)
- HDfprintf(stdout, "(i, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "(i, %d, %d) ", type, tmp_idx);
insert_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
}
@@ -3982,7 +3971,7 @@ row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
if ((pass) && (tmp_idx >= 0) && (tmp_idx <= local_max_index) && ((tmp_idx % 3) == 0)) {
if (verbose)
- HDfprintf(stdout, "(p, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "(p, %d, %d) ", type, tmp_idx);
protect_entry(file_ptr, type, tmp_idx);
}
@@ -3991,7 +3980,7 @@ row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
if ((pass) && (tmp_idx >= 0) && (tmp_idx <= local_max_index) && ((tmp_idx % 3) == 0)) {
if (verbose)
- HDfprintf(stdout, "(u, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "(u, %d, %d) ", type, tmp_idx);
unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
}
@@ -4001,7 +3990,7 @@ row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
((tmp_idx % 3) == 0)) {
if (verbose)
- HDfprintf(stdout, "(r, %d, %d, %d) ", type, tmp_idx, (int)move_to_main_addr);
+ fprintf(stdout, "(r, %d, %d, %d) ", type, tmp_idx, (int)move_to_main_addr);
move_entry(cache_ptr, type, tmp_idx, move_to_main_addr);
}
@@ -4010,7 +3999,7 @@ row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
if ((pass) && (tmp_idx >= 0) && (tmp_idx <= local_max_index) && ((tmp_idx % 5) == 0)) {
if (verbose)
- HDfprintf(stdout, "(p, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "(p, %d, %d) ", type, tmp_idx);
protect_entry(file_ptr, type, (idx - lag + 3));
}
@@ -4019,7 +4008,7 @@ row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
if ((pass) && (tmp_idx >= 0) && (tmp_idx <= local_max_index) && ((tmp_idx % 5) == 0)) {
if (verbose)
- HDfprintf(stdout, "(u, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "(u, %d, %d) ", type, tmp_idx);
unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
}
@@ -4029,7 +4018,7 @@ row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
if ((pass) && (tmp_idx >= 0) && (tmp_idx < local_max_index) && (tmp_idx % 9 == 0)) {
if (verbose)
- HDfprintf(stdout, "(p-ro, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "(p-ro, %d, %d) ", type, tmp_idx);
protect_entry_ro(file_ptr, type, tmp_idx);
}
@@ -4038,7 +4027,7 @@ row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
if ((pass) && (tmp_idx >= 0) && (tmp_idx < local_max_index) && (tmp_idx % 11 == 0)) {
if (verbose)
- HDfprintf(stdout, "(p-ro, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "(p-ro, %d, %d) ", type, tmp_idx);
protect_entry_ro(file_ptr, type, tmp_idx);
}
@@ -4047,7 +4036,7 @@ row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
if ((pass) && (tmp_idx >= 0) && (tmp_idx < local_max_index) && (tmp_idx % 13 == 0)) {
if (verbose)
- HDfprintf(stdout, "(p-ro, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "(p-ro, %d, %d) ", type, tmp_idx);
protect_entry_ro(file_ptr, type, tmp_idx);
}
@@ -4056,7 +4045,7 @@ row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
if ((pass) && (tmp_idx >= 0) && (tmp_idx < local_max_index) && (tmp_idx % 9 == 0)) {
if (verbose)
- HDfprintf(stdout, "(u-ro, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "(u-ro, %d, %d) ", type, tmp_idx);
unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
}
@@ -4065,7 +4054,7 @@ row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
if ((pass) && (tmp_idx >= 0) && (tmp_idx < local_max_index) && (tmp_idx % 11 == 0)) {
if (verbose)
- HDfprintf(stdout, "(u-ro, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "(u-ro, %d, %d) ", type, tmp_idx);
unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
}
@@ -4074,7 +4063,7 @@ row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
if ((pass) && (tmp_idx >= 0) && (tmp_idx < local_max_index) && (tmp_idx % 13 == 0)) {
if (verbose)
- HDfprintf(stdout, "(u-ro, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "(u-ro, %d, %d) ", type, tmp_idx);
unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
}
@@ -4083,7 +4072,7 @@ row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
if ((pass) && (idx >= 0) && (idx <= local_max_index)) {
if (verbose)
- HDfprintf(stdout, "(p, %d, %d) ", type, idx);
+ fprintf(stdout, "(p, %d, %d) ", type, idx);
protect_entry(file_ptr, type, idx);
}
@@ -4092,7 +4081,7 @@ row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
if ((pass) && (tmp_idx >= 0) && (tmp_idx <= local_max_index) && ((tmp_idx % 7) == 0)) {
if (verbose)
- HDfprintf(stdout, "(u, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "(u, %d, %d) ", type, tmp_idx);
unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET);
}
@@ -4101,7 +4090,7 @@ row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
if ((pass) && (tmp_idx >= 0) && (tmp_idx <= local_max_index) && ((tmp_idx % 7) == 0)) {
if (verbose)
- HDfprintf(stdout, "(p, %d, %d) ", type, tmp_idx);
+ fprintf(stdout, "(p, %d, %d) ", type, tmp_idx);
protect_entry(file_ptr, type, tmp_idx);
}
@@ -4146,7 +4135,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;
}
}
@@ -4156,7 +4145,7 @@ row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
if ((pass) && ((idx + lag) >= 0) && ((idx + lag) <= local_max_index)) {
if (verbose)
- HDfprintf(stdout, "(u, %d, %d) ", type, (idx + lag));
+ fprintf(stdout, "(u, %d, %d) ", type, (idx + lag));
unprotect_entry(file_ptr, type, idx + lag,
(dirty_unprotects ? H5C__DIRTIED_FLAG : H5C__NO_FLAGS_SET));
@@ -4164,7 +4153,7 @@ row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
}
if (verbose)
- HDfprintf(stdout, "\n");
+ fprintf(stdout, "\n");
idx--;
}
@@ -4205,16 +4194,16 @@ hl_row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose,
int32_t local_max_index;
if (verbose)
- HDfprintf(stdout, "%s(): entering.\n", __func__);
+ fprintf(stdout, "%s(): entering.\n", __func__);
if (pass) {
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) {
@@ -4232,7 +4221,7 @@ hl_row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose,
(((idx + lag) % 2) == 0) && (!entry_in_cache(cache_ptr, type, (idx + lag)))) {
if (verbose)
- HDfprintf(stdout, "(i, %d, %d) ", type, (idx + lag));
+ fprintf(stdout, "(i, %d, %d) ", type, (idx + lag));
insert_entry(file_ptr, type, (idx + lag), H5C__NO_FLAGS_SET);
}
@@ -4243,12 +4232,12 @@ hl_row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose,
if ((pass) && (i >= 0) && (i <= local_max_index)) {
if (verbose)
- HDfprintf(stdout, "(p, %d, %d) ", type, i);
+ fprintf(stdout, "(p, %d, %d) ", type, i);
protect_entry(file_ptr, type, i);
if (verbose)
- HDfprintf(stdout, "(u, %d, %d) ", type, i);
+ fprintf(stdout, "(u, %d, %d) ", type, i);
unprotect_entry(file_ptr, type, i, H5C__NO_FLAGS_SET);
}
@@ -4256,7 +4245,7 @@ hl_row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose,
}
if (verbose)
- HDfprintf(stdout, "\n");
+ fprintf(stdout, "\n");
idx--;
}
@@ -4296,7 +4285,7 @@ col_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
int32_t local_max_index[NUMBER_OF_ENTRY_TYPES];
if (verbose)
- HDfprintf(stdout, "%s: entering.\n", __func__);
+ fprintf(stdout, "%s: entering.\n", __func__);
if (pass) {
int i;
@@ -4306,7 +4295,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) {
@@ -4324,7 +4313,7 @@ col_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
(((idx + lag) % 3) == 0) && (!entry_in_cache(cache_ptr, type, (idx + lag)))) {
if (verbose)
- HDfprintf(stdout, "(i, %d, %d) ", type, (idx + lag));
+ fprintf(stdout, "(i, %d, %d) ", type, (idx + lag));
insert_entry(file_ptr, type, (idx + lag), H5C__NO_FLAGS_SET);
}
@@ -4332,7 +4321,7 @@ col_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
if ((pass) && (idx >= 0) && (idx <= local_max_index[type])) {
if (verbose)
- HDfprintf(stdout, "(p, %d, %d) ", type, idx);
+ fprintf(stdout, "(p, %d, %d) ", type, idx);
protect_entry(file_ptr, type, idx);
}
@@ -4340,14 +4329,14 @@ col_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
if ((pass) && ((idx - lag) >= 0) && ((idx - lag) <= local_max_index[type])) {
if (verbose)
- HDfprintf(stdout, "(u, %d, %d) ", type, (idx - lag));
+ fprintf(stdout, "(u, %d, %d) ", type, (idx - lag));
unprotect_entry(file_ptr, type, idx - lag,
(dirty_unprotects ? H5C__DIRTIED_FLAG : H5C__NO_FLAGS_SET));
}
if (verbose)
- HDfprintf(stdout, "\n");
+ fprintf(stdout, "\n");
type++;
}
@@ -4390,16 +4379,16 @@ hl_col_major_scan_forward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose, h
int32_t local_max_index;
if (verbose)
- HDfprintf(stdout, "%s: entering.\n", __func__);
+ fprintf(stdout, "%s: entering.\n", __func__);
if (pass) {
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) {
@@ -4424,7 +4413,7 @@ hl_col_major_scan_forward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose, h
(!entry_in_cache(cache_ptr, type, i))) {
if (verbose)
- HDfprintf(stdout, "(i, %d, %d) ", type, i);
+ fprintf(stdout, "(i, %d, %d) ", type, i);
insert_entry(file_ptr, type, i, H5C__NO_FLAGS_SET);
}
@@ -4432,7 +4421,7 @@ hl_col_major_scan_forward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose, h
if ((pass) && (i >= 0) && (i <= local_max_index)) {
if (verbose)
- HDfprintf(stdout, "(p, %d, %d) ", type, i);
+ fprintf(stdout, "(p, %d, %d) ", type, i);
protect_entry(file_ptr, type, i);
}
@@ -4440,14 +4429,14 @@ hl_col_major_scan_forward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose, h
if ((pass) && (i >= 0) && (i <= local_max_index)) {
if (verbose)
- HDfprintf(stdout, "(u, %d, %d) ", type, i);
+ fprintf(stdout, "(u, %d, %d) ", type, i);
unprotect_entry(file_ptr, type, i,
(dirty_unprotects ? H5C__DIRTIED_FLAG : H5C__NO_FLAGS_SET));
}
if (verbose)
- HDfprintf(stdout, "\n");
+ fprintf(stdout, "\n");
type++;
}
@@ -4492,19 +4481,19 @@ col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
int32_t local_max_index[NUMBER_OF_ENTRY_TYPES] = {0};
if (verbose)
- HDfprintf(stdout, "%s: entering.\n", __func__);
+ fprintf(stdout, "%s: entering.\n", __func__);
if (pass) {
int i;
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) {
@@ -4515,7 +4504,7 @@ col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
idx = local_max_index[NUMBER_OF_ENTRY_TYPES - 1] + lag;
if (verbose) /* 1 */
- HDfprintf(stdout, "%s: point %d.\n", __func__, mile_stone++);
+ fprintf(stdout, "%s: point %d.\n", __func__, mile_stone++);
while ((pass) && ((idx + lag) >= 0)) {
type = NUMBER_OF_ENTRY_TYPES - 1;
@@ -4525,7 +4514,7 @@ col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
(((idx - lag) % 3) == 0) && (!entry_in_cache(cache_ptr, type, (idx - lag)))) {
if (verbose)
- HDfprintf(stdout, "(i, %d, %d) ", type, (idx - lag));
+ fprintf(stdout, "(i, %d, %d) ", type, (idx - lag));
insert_entry(file_ptr, type, (idx - lag), H5C__NO_FLAGS_SET);
}
@@ -4533,7 +4522,7 @@ col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
if ((pass) && (idx >= 0) && (idx <= local_max_index[type])) {
if (verbose)
- HDfprintf(stdout, "(p, %d, %d) ", type, idx);
+ fprintf(stdout, "(p, %d, %d) ", type, idx);
protect_entry(file_ptr, type, idx);
}
@@ -4541,14 +4530,14 @@ col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
if ((pass) && ((idx + lag) >= 0) && ((idx + lag) <= local_max_index[type])) {
if (verbose)
- HDfprintf(stdout, "(u, %d, %d) ", type, (idx + lag));
+ fprintf(stdout, "(u, %d, %d) ", type, (idx + lag));
unprotect_entry(file_ptr, type, idx + lag,
(dirty_unprotects ? H5C__DIRTIED_FLAG : H5C__NO_FLAGS_SET));
}
if (verbose)
- HDfprintf(stdout, "\n");
+ fprintf(stdout, "\n");
type--;
}
@@ -4557,7 +4546,7 @@ col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
}
if (verbose) /* 2 */
- HDfprintf(stdout, "%s: point %d.\n", __func__, mile_stone++);
+ fprintf(stdout, "%s: point %d.\n", __func__, mile_stone++);
if ((pass) && (display_stats)) {
@@ -4565,7 +4554,7 @@ col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t
}
if (verbose)
- HDfprintf(stdout, "%s: exiting.\n", __func__);
+ fprintf(stdout, "%s: exiting.\n", __func__);
} /* col_major_scan_backward() */
@@ -4597,16 +4586,16 @@ hl_col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose,
int32_t local_max_index = -1;
if (verbose)
- HDfprintf(stdout, "%s: entering.\n", __func__);
+ fprintf(stdout, "%s: entering.\n", __func__);
if (pass) {
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);
@@ -4631,7 +4620,7 @@ hl_col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose,
(!entry_in_cache(cache_ptr, type, i))) {
if (verbose)
- HDfprintf(stdout, "(i, %d, %d) ", type, i);
+ fprintf(stdout, "(i, %d, %d) ", type, i);
insert_entry(file_ptr, type, i, H5C__NO_FLAGS_SET);
}
@@ -4639,7 +4628,7 @@ hl_col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose,
if ((pass) && (i >= 0) && (i <= local_max_index)) {
if (verbose)
- HDfprintf(stdout, "(p, %d, %d) ", type, i);
+ fprintf(stdout, "(p, %d, %d) ", type, i);
protect_entry(file_ptr, type, i);
}
@@ -4647,14 +4636,14 @@ hl_col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose,
if ((pass) && (i >= 0) && (i <= local_max_index)) {
if (verbose)
- HDfprintf(stdout, "(u, %d, %d) ", type, i);
+ fprintf(stdout, "(u, %d, %d) ", type, i);
unprotect_entry(file_ptr, type, i,
(dirty_unprotects ? H5C__DIRTIED_FLAG : H5C__NO_FLAGS_SET));
}
if (verbose)
- HDfprintf(stdout, "\n");
+ fprintf(stdout, "\n");
type++;
}
@@ -4690,10 +4679,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 */
@@ -4709,19 +4698,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);
@@ -4733,13 +4722,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;
@@ -4766,10 +4755,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 */
@@ -4783,20 +4772,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;
@@ -4808,7 +4797,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]));
@@ -4822,7 +4811,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);
@@ -4849,7 +4838,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) {
@@ -4863,7 +4852,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++;
@@ -4890,8 +4879,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) {
@@ -4905,7 +4894,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--;
@@ -5032,8 +5021,8 @@ check_and_validate_cache_hit_rate(hid_t file_id, double *hit_rate_ptr, hbool_t d
/* dump data to stdout if requested */
if ((pass) && (dump_data)) {
- HDfprintf(stdout, "cache_hits: %ld, cache_accesses: %ld, hit_rate: %lf\n", (long)cache_hits,
- (long)cache_accesses, hit_rate);
+ fprintf(stdout, "cache_hits: %ld, cache_accesses: %ld, hit_rate: %lf\n", (long)cache_hits,
+ (long)cache_accesses, hit_rate);
}
if ((pass) && (cache_accesses > min_accesses) && (hit_rate < min_hit_rate)) {
@@ -5159,8 +5148,8 @@ check_and_validate_cache_size(hid_t file_id, size_t *max_size_ptr, size_t *min_c
/* dump data to stdout if requested */
if ((pass) && (dump_data)) {
- HDfprintf(stdout, "max_sz: %ld, min_clean_sz: %ld, cur_sz: %ld, cur_ent: %ld\n", (long)max_size,
- (long)min_clean_size, (long)cur_size, (long)cur_num_entries);
+ fprintf(stdout, "max_sz: %ld, min_clean_sz: %ld, cur_sz: %ld, cur_ent: %ld\n", (long)max_size,
+ (long)min_clean_size, (long)cur_size, (long)cur_num_entries);
}
} /* check_and_validate_cache_size() */
@@ -5351,27 +5340,27 @@ dump_LRU(H5F_t * file_ptr)
H5C_cache_entry_t * entry_ptr = NULL;
H5C_t *cache_ptr = file_ptr->shared->cache;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ assert(cache_ptr);
+ assert(cache_ptr->magic == H5C__H5C_T_MAGIC);
entry_ptr = cache_ptr->LRU_head_ptr;
- HDfprintf(stdout,
+ fprintf(stdout,
"\n\nIndex len/size/clean size/dirty size = %u/%lld/%lld/%lld\n",
cache_ptr->index_len, (long long)(cache_ptr->index_size),
(long long)(cache_ptr->clean_index_size),
(long long)(cache_ptr->dirty_index_size));
- HDfprintf(stdout, "\nLRU len/size = %d/%lld.\n\n",
+ fprintf(stdout, "\nLRU len/size = %d/%lld.\n\n",
cache_ptr->LRU_list_len, (long long)(cache_ptr->LRU_list_size));
if ( entry_ptr != NULL )
{
- HDfprintf(stdout, "%s%s%s", hdr_0, hdr_1, hdr_2);
+ fprintf(stdout, "%s%s%s", hdr_0, hdr_1, hdr_2);
}
while ( entry_ptr != NULL )
{
- HDfprintf(stdout,
+ fprintf(stdout,
" %3d %d %10lld 0x%010llx %s(%d)\n",
i,
(int)(entry_ptr->is_dirty),
@@ -5385,7 +5374,7 @@ dump_LRU(H5F_t * file_ptr)
if ( cache_ptr->LRU_list_len > 0 )
{
- HDfprintf(stdout, "%s\n", hdr_2);
+ fprintf(stdout, "%s\n", hdr_2);
}
return;