summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-10-12 03:00:46 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-10-12 03:00:46 (GMT)
commit03d4b2aa0ccad8fc985c492e74c4773290f4157c (patch)
tree76d89af743b19cbb528fd1c1a76cd3b667e52e9a
parent8e8aa93d98d3786fa2347f44a7f17c8238714616 (diff)
downloadhdf5-03d4b2aa0ccad8fc985c492e74c4773290f4157c.zip
hdf5-03d4b2aa0ccad8fc985c492e74c4773290f4157c.tar.gz
hdf5-03d4b2aa0ccad8fc985c492e74c4773290f4157c.tar.bz2
[svn-r9403] Purpose:
Code cleanup Description: Further diff reductions against development branch, in preparation for merge of new metadata cache code. Solution: Change 'dirty' field in metadata cache info struct (H5AC_info_t) to match development branch 'is_dirty' name. Platforms tested: FreeBSD 4.10 (sleipnir) w/parallel Solaris 2.7 (arabica) Linux 2.4 (verbena) w/FORTRAN
-rw-r--r--src/H5AC.c40
-rw-r--r--src/H5ACprivate.h2
-rw-r--r--src/H5B.c52
-rw-r--r--src/H5Gnode.c30
-rw-r--r--src/H5HG.c22
-rw-r--r--src/H5HGdbg.c2
-rw-r--r--src/H5HL.c16
-rw-r--r--src/H5HLdbg.c2
-rw-r--r--src/H5O.c24
9 files changed, 95 insertions, 95 deletions
diff --git a/src/H5AC.c b/src/H5AC.c
index 51c029a..4fe9e73 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -606,9 +606,9 @@ H5AC_flush(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr, unsi
H5AC_dest_func_t dest;
/* Various sanity checks */
- assert((*dinfo)->dirty);
+ assert((*dinfo)->is_dirty);
assert((*info)!=NULL);
- assert((*info)->dirty==0);
+ assert((*info)->is_dirty==0);
#ifdef H5AC_DEBUG
type_id=(*info)->type->id; /* Remember this for later */
@@ -672,7 +672,7 @@ H5AC_flush(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr, unsi
flush = (*info)->type->flush;
/* Only block for all the processes on the first piece of metadata */
- if(first_flush && (*info)->dirty) {
+ if(first_flush && (*info)->is_dirty) {
status = (flush)(f, dxpl_id, destroy, (*info)->addr, (*info));
first_flush=0;
} /* end if */
@@ -730,9 +730,9 @@ H5AC_flush(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr, unsi
H5AC_dest_func_t dest;
/* Various sanity checks */
- assert((*dinfo)->dirty);
+ assert((*dinfo)->is_dirty);
assert((*info)!=NULL);
- assert((*info)->dirty==0);
+ assert((*info)->is_dirty==0);
#ifdef H5AC_DEBUG
type_id=(*info)->type->id; /* Remember this for later */
@@ -877,9 +877,9 @@ H5AC_set(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr, void *
H5AC_dest_func_t dest;
/* Various sanity checks */
- assert((*dinfo)->dirty);
+ assert((*dinfo)->is_dirty);
assert((*info)!=NULL);
- assert((*info)->dirty==0);
+ assert((*info)->is_dirty==0);
#ifdef H5AC_DEBUG
type_id=(*info)->type->id; /* Remember this for later */
@@ -907,9 +907,9 @@ H5AC_set(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr, void *
assert(xfer_mode==H5FD_MPIO_INDEPENDENT);
/* Make certain there will be no write of dirty metadata */
- if((*info) && (*info)->dirty) {
+ if((*info) && (*info)->is_dirty) {
/* Sanity check new item */
- assert(((H5AC_info_t*)thing)->dirty==0);
+ assert(((H5AC_info_t*)thing)->is_dirty==0);
/* 'Hold' the current metadata for later */
(*dinfo)=(*info);
@@ -1050,9 +1050,9 @@ H5AC_rename(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t old_addr,
H5AC_dest_func_t dest;
/* Various sanity checks */
- assert((*new_dinfo)->dirty);
+ assert((*new_dinfo)->is_dirty);
assert((*new_info)!=NULL);
- assert((*new_info)->dirty==0);
+ assert((*new_info)->is_dirty==0);
#ifdef H5AC_DEBUG
type_id=(*new_info)->type->id; /* Remember this for later */
@@ -1080,9 +1080,9 @@ H5AC_rename(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t old_addr,
assert(xfer_mode==H5FD_MPIO_INDEPENDENT);
/* Make certain there will be no write of dirty metadata */
- if((*new_info) && (*new_info)->dirty) {
+ if((*new_info) && (*new_info)->is_dirty) {
/* Sanity check that we won't put two pieces of dirty metadata in same cache location */
- assert((*old_info)->dirty==0);
+ assert((*old_info)->is_dirty==0);
/* 'Hold' the current metadata for later */
(*new_dinfo)=(*new_info);
@@ -1134,7 +1134,7 @@ H5AC_rename(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t old_addr,
/* Check for 'held' metadata in old location & restore it, if so */
if(*old_dinfo) {
/* Sanity check */
- assert((*old_dinfo)->dirty);
+ assert((*old_dinfo)->is_dirty);
#ifdef H5AC_DEBUG
type_id=(*old_info)->type->id; /* Remember this for later */
@@ -1250,9 +1250,9 @@ H5AC_protect(H5F_t *f,
/* Check for 'held' metadata in location & handle it */
if(*dinfo) {
/* Sanity checks */
- assert((*dinfo)->dirty);
+ assert((*dinfo)->is_dirty);
assert((*info));
- assert((*info)->dirty==0);
+ assert((*info)->is_dirty==0);
assert((*dinfo)->addr!=(*info)->addr);
/* Is 'held' metadata the metadata we are looking for? */
@@ -1489,9 +1489,9 @@ H5AC_unprotect(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr,
H5AC_dest_func_t dest;
/* Various sanity checks */
- assert((*dinfo)->dirty);
+ assert((*dinfo)->is_dirty);
assert((*info)!=NULL);
- assert((*info)->dirty==0);
+ assert((*info)->is_dirty==0);
#ifdef H5AC_DEBUG
type_id=(*info)->type->id; /* Remember this for later */
@@ -1519,9 +1519,9 @@ H5AC_unprotect(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr,
assert(xfer_mode==H5FD_MPIO_INDEPENDENT);
/* Make certain there will be no write of dirty metadata */
- if((*info) && (*info)->dirty) {
+ if((*info) && (*info)->is_dirty) {
/* Sanity check new item */
- assert(((H5AC_info_t*)thing)->dirty==0);
+ assert(((H5AC_info_t*)thing)->is_dirty==0);
/* 'Hold' the current metadata for later */
(*dinfo)=(*info);
diff --git a/src/H5ACprivate.h b/src/H5ACprivate.h
index 7491f18..c1a44e7 100644
--- a/src/H5ACprivate.h
+++ b/src/H5ACprivate.h
@@ -97,7 +97,7 @@ typedef struct H5AC_class_t {
typedef struct H5AC_info_t {
const H5AC_class_t *type; /*type of object stored here */
haddr_t addr; /*file address for object */
- hbool_t dirty; /* 'Dirty' flag for cached object */
+ hbool_t is_dirty; /* 'Dirty' flag for cached object */
} H5AC_info_t;
typedef H5AC_info_t *H5AC_info_ptr_t; /* Typedef for free lists */
diff --git a/src/H5B.c b/src/H5B.c
index d327858..0a9a1f2 100644
--- a/src/H5B.c
+++ b/src/H5B.c
@@ -225,7 +225,7 @@ H5B_create(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, void *udata,
if (NULL==(bt = H5FL_MALLOC(H5B_t)))
HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for B-tree root node")
HDmemset(&bt->cache_info,0,sizeof(H5AC_info_t));
- bt->cache_info.dirty = TRUE;
+ bt->cache_info.is_dirty = TRUE;
bt->level = 0;
bt->left = HADDR_UNDEF;
bt->right = HADDR_UNDEF;
@@ -488,7 +488,7 @@ H5B_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B_t *bt)
assert(shared->type);
assert(shared->type->encode);
- if (bt->cache_info.dirty) {
+ if (bt->cache_info.is_dirty) {
if (H5B_serialize(f, bt) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTFLUSH, FAIL, "unable to serialize B-tree")
@@ -500,7 +500,7 @@ H5B_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B_t *bt)
if (H5F_block_write(f, H5FD_MEM_BTREE, addr, shared->sizeof_rnode, dxpl_id, shared->page) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTFLUSH, FAIL, "unable to save B-tree node to disk")
- bt->cache_info.dirty = FALSE;
+ bt->cache_info.is_dirty = FALSE;
} /* end if */
if (destroy)
@@ -573,7 +573,7 @@ H5B_clear(H5B_t *bt)
assert(bt);
/* Reset the dirty flag. */
- bt->cache_info.dirty = FALSE;
+ bt->cache_info.is_dirty = FALSE;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5B_clear() */
@@ -825,7 +825,7 @@ H5B_split(H5F_t *f, hid_t dxpl_id, H5B_t *old_bt, haddr_t old_addr,
/*
* Truncate the old node.
*/
- old_bt->cache_info.dirty = TRUE;
+ old_bt->cache_info.is_dirty = TRUE;
old_bt->nchildren = nleft;
/*
@@ -838,7 +838,7 @@ H5B_split(H5F_t *f, hid_t dxpl_id, H5B_t *old_bt, haddr_t old_addr,
if (NULL == (tmp_bt = H5AC_protect(f, dxpl_id, H5AC_BT, old_bt->right, shared->type, udata, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load right sibling")
- tmp_bt->cache_info.dirty = TRUE;
+ tmp_bt->cache_info.is_dirty = TRUE;
tmp_bt->left = *new_addr_p;
if (H5AC_unprotect(f, dxpl_id, H5AC_BT, old_bt->right, tmp_bt, FALSE) != SUCCEED)
@@ -961,7 +961,7 @@ H5B_insert(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr,
if (NULL == (bt = H5AC_protect(f, dxpl_id, H5AC_BT, child, type, udata, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load new child")
- bt->cache_info.dirty = TRUE;
+ bt->cache_info.is_dirty = TRUE;
bt->left = old_root;
if (H5AC_unprotect(f, dxpl_id, H5AC_BT, child, bt, FALSE) != SUCCEED)
@@ -979,7 +979,7 @@ H5B_insert(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr,
/* Make certain the old root info is marked as dirty before moving it, */
/* so it is certain to be written out at the new location */
- bt->cache_info.dirty = TRUE;
+ bt->cache_info.is_dirty = TRUE;
/* Make a copy of the old root information */
if (NULL == (new_bt = H5B_copy(bt))) {
@@ -1001,7 +1001,7 @@ H5B_insert(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr,
HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to move B-tree root node")
/* clear the old root info at the old address (we already copied it) */
- new_bt->cache_info.dirty = TRUE;
+ new_bt->cache_info.is_dirty = TRUE;
new_bt->left = HADDR_UNDEF;
new_bt->right = HADDR_UNDEF;
@@ -1062,7 +1062,7 @@ H5B_insert_child(H5B_t *bt, unsigned idx, haddr_t child,
HDassert(shared);
assert(bt->nchildren<shared->two_k);
- bt->cache_info.dirty = TRUE;
+ bt->cache_info.is_dirty = TRUE;
/* Check for inserting right-most key into node (common when just appending
* records to an unlimited dimension chunked dataset)
@@ -1215,7 +1215,7 @@ H5B_insert_helper(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type
H5B_NKEY(bt,shared,1), bt->child + 0/*out*/) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, H5B_INS_ERROR, "unable to create leaf node")
bt->nchildren = 1;
- bt->cache_info.dirty = TRUE;
+ bt->cache_info.is_dirty = TRUE;
idx = 0;
if (type->follow_min) {
@@ -1329,14 +1329,14 @@ H5B_insert_helper(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type
* Update the left and right keys of the current node.
*/
if (*lt_key_changed) {
- bt->cache_info.dirty = TRUE;
+ bt->cache_info.is_dirty = TRUE;
if (idx > 0)
*lt_key_changed = FALSE;
else
HDmemcpy(lt_key, H5B_NKEY(bt,shared,idx), type->sizeof_nkey);
}
if (*rt_key_changed) {
- bt->cache_info.dirty = TRUE;
+ bt->cache_info.is_dirty = TRUE;
if (idx+1 < bt->nchildren)
*rt_key_changed = FALSE;
else
@@ -1347,7 +1347,7 @@ H5B_insert_helper(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type
* The insertion simply changed the address for the child.
*/
bt->child[idx] = child_addr;
- bt->cache_info.dirty = TRUE;
+ bt->cache_info.is_dirty = TRUE;
ret_value = H5B_INS_NOOP;
} else if (H5B_INS_LEFT == my_ins || H5B_INS_RIGHT == my_ins) {
@@ -1641,7 +1641,7 @@ H5B_remove_helper(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type
* our right key and indicate that it changed.
*/
if (*lt_key_changed) {
- bt->cache_info.dirty = TRUE;
+ bt->cache_info.is_dirty = TRUE;
if (idx>0) {
/* Don't propagate change out of this B-tree node */
*lt_key_changed = FALSE;
@@ -1650,7 +1650,7 @@ H5B_remove_helper(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type
}
}
if (*rt_key_changed) {
- bt->cache_info.dirty = TRUE;
+ bt->cache_info.is_dirty = TRUE;
if (idx+1<bt->nchildren) {
/* Don't propagate change out of this B-tree node */
*rt_key_changed = FALSE;
@@ -1668,7 +1668,7 @@ H5B_remove_helper(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type
/* Make certain the native key for the right sibling is set up */
HDmemcpy(H5B_NKEY(sibling,shared,0), H5B_NKEY(bt,shared,idx+1), type->sizeof_nkey);
- sibling->cache_info.dirty = TRUE;
+ sibling->cache_info.is_dirty = TRUE;
if (H5AC_unprotect(f, dxpl_id, H5AC_BT, bt->right, sibling, FALSE) != SUCCEED)
HGOTO_ERROR(H5E_BTREE, H5E_PROTECT, H5B_INS_ERROR, "unable to release node from tree")
@@ -1690,7 +1690,7 @@ H5B_remove_helper(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type
* keys and the subtree pointer. Free this node (unless it's the
* root node) and return H5B_INS_REMOVE.
*/
- bt->cache_info.dirty = TRUE;
+ bt->cache_info.is_dirty = TRUE;
bt->nchildren = 0;
if (level>0) {
if (H5F_addr_defined(bt->left)) {
@@ -1698,7 +1698,7 @@ H5B_remove_helper(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type
HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, H5B_INS_ERROR, "unable to load node from tree")
sibling->right = bt->right;
- sibling->cache_info.dirty = TRUE;
+ sibling->cache_info.is_dirty = TRUE;
if (H5AC_unprotect(f, dxpl_id, H5AC_BT, bt->left, sibling, FALSE) != SUCCEED)
HGOTO_ERROR(H5E_BTREE, H5E_PROTECT, H5B_INS_ERROR, "unable to release node from tree")
@@ -1713,7 +1713,7 @@ H5B_remove_helper(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type
HDmemcpy(H5B_NKEY(sibling,shared,0), H5B_NKEY(bt,shared,0), type->sizeof_nkey);
sibling->left = bt->left;
- sibling->cache_info.dirty = TRUE;
+ sibling->cache_info.is_dirty = TRUE;
if (H5AC_unprotect(f, dxpl_id, H5AC_BT, bt->right, sibling, FALSE) != SUCCEED)
HGOTO_ERROR(H5E_BTREE, H5E_PROTECT, H5B_INS_ERROR, "unable to release node from tree")
@@ -1739,7 +1739,7 @@ H5B_remove_helper(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type
* key into lt_key and notify the caller that the left key has
* changed. Return H5B_INS_NOOP.
*/
- bt->cache_info.dirty = TRUE;
+ bt->cache_info.is_dirty = TRUE;
bt->nchildren -= 1;
HDmemmove(bt->native,
@@ -1759,7 +1759,7 @@ H5B_remove_helper(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type
* freed). We copy the new right-most key into rt_key and notify the
* caller that the right key has changed. Return H5B_INS_NOOP.
*/
- bt->cache_info.dirty = TRUE;
+ bt->cache_info.is_dirty = TRUE;
bt->nchildren -= 1;
HDmemcpy(rt_key, H5B_NKEY(bt,shared,bt->nchildren), type->sizeof_nkey);
*rt_key_changed = TRUE;
@@ -1774,7 +1774,7 @@ H5B_remove_helper(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type
HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, H5B_INS_ERROR, "unable to unlink node from tree")
HDmemcpy(H5B_NKEY(sibling,shared,0), H5B_NKEY(bt,shared,bt->nchildren), type->sizeof_nkey);
- sibling->cache_info.dirty = TRUE;
+ sibling->cache_info.is_dirty = TRUE;
if (H5AC_unprotect(f, dxpl_id, H5AC_BT, bt->right, sibling, FALSE) != SUCCEED)
HGOTO_ERROR(H5E_BTREE, H5E_PROTECT, H5B_INS_ERROR, "unable to release node from tree")
@@ -1793,7 +1793,7 @@ H5B_remove_helper(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type
* the right are shifted left by one place. The subtree has already
* been freed). Return H5B_INS_NOOP.
*/
- bt->cache_info.dirty = TRUE;
+ bt->cache_info.is_dirty = TRUE;
bt->nchildren -= 1;
HDmemmove(bt->native + idx * type->sizeof_nkey,
@@ -1869,7 +1869,7 @@ H5B_remove(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr, void
if (0==bt->nchildren && 0!=bt->level) {
bt->level = 0;
- bt->cache_info.dirty = TRUE;
+ bt->cache_info.is_dirty = TRUE;
}
if (H5AC_unprotect(f, dxpl_id, H5AC_BT, addr, bt, FALSE) != SUCCEED)
@@ -2139,7 +2139,7 @@ H5B_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int f
shared->sizeof_rkey);
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
"Dirty flag:",
- bt->cache_info.dirty ? "True" : "False");
+ bt->cache_info.is_dirty ? "True" : "False");
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
"Level:",
bt->level);
diff --git a/src/H5Gnode.c b/src/H5Gnode.c
index 710de18..d07e34e 100644
--- a/src/H5Gnode.c
+++ b/src/H5Gnode.c
@@ -491,7 +491,7 @@ H5G_node_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5G_node_
for (i=0; i<sym->nsyms; i++) {
if (sym->entry[i].dirty) {
/* Set the node's dirty flag */
- sym->cache_info.dirty = TRUE;
+ sym->cache_info.is_dirty = TRUE;
/* Reset the entry's dirty flag */
sym->entry[i].dirty=FALSE;
@@ -501,7 +501,7 @@ H5G_node_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5G_node_
/*
* Write the symbol node to disk.
*/
- if (sym->cache_info.dirty) {
+ if (sym->cache_info.is_dirty) {
size = H5G_node_size(f);
/* Allocate temporary buffer */
@@ -516,7 +516,7 @@ H5G_node_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5G_node_
H5FL_BLK_FREE(symbol_node,buf);
/* Reset the node's dirty flag */
- sym->cache_info.dirty = FALSE;
+ sym->cache_info.is_dirty = FALSE;
}
/*
@@ -612,7 +612,7 @@ H5G_node_dest(H5F_t UNUSED *f, H5G_node_t *sym)
assert(sym);
/* Verify that node is clean */
- assert (sym->cache_info.dirty==0);
+ assert (sym->cache_info.is_dirty==FALSE);
if(sym->entry)
sym->entry = H5FL_SEQ_FREE(H5G_entry_t,sym->entry);
@@ -653,7 +653,7 @@ H5G_node_clear(H5G_node_t *sym)
/* Look for dirty entries and reset the dirty flag. */
for (i=0; i<sym->nsyms; i++)
sym->entry[i].dirty=FALSE;
- sym->cache_info.dirty = FALSE;
+ sym->cache_info.is_dirty = FALSE;
FUNC_LEAVE_NOAPI(SUCCEED);
} /* end H5G_node_clear() */
@@ -703,7 +703,7 @@ H5G_node_create(H5F_t *f, hid_t dxpl_id, H5B_ins_t UNUSED op, void *_lt_key,
size = H5G_node_size(f);
if (HADDR_UNDEF==(*addr_p=H5MF_alloc(f, H5FD_MEM_BTREE, dxpl_id, size)))
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to allocate file space");
- sym->cache_info.dirty = TRUE;
+ sym->cache_info.is_dirty = TRUE;
sym->entry = H5FL_SEQ_CALLOC(H5G_entry_t,(2*H5F_SYM_LEAF_K(f)));
if (NULL==sym->entry)
HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed");
@@ -1098,13 +1098,13 @@ H5G_node_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, void UNUSED *_lt_key,
HDmemcpy(snrt->entry, sn->entry + H5F_SYM_LEAF_K(f),
H5F_SYM_LEAF_K(f) * sizeof(H5G_entry_t));
snrt->nsyms = H5F_SYM_LEAF_K(f);
- snrt->cache_info.dirty = TRUE;
+ snrt->cache_info.is_dirty = TRUE;
/* The left node */
HDmemset(sn->entry + H5F_SYM_LEAF_K(f), 0,
H5F_SYM_LEAF_K(f) * sizeof(H5G_entry_t));
sn->nsyms = H5F_SYM_LEAF_K(f);
- sn->cache_info.dirty = TRUE;
+ sn->cache_info.is_dirty = TRUE;
/* The middle key */
md_key->offset = sn->entry[sn->nsyms - 1].name_off;
@@ -1125,7 +1125,7 @@ H5G_node_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, void UNUSED *_lt_key,
} else {
/* Where to insert the new entry? */
ret_value = H5B_INS_NOOP;
- sn->cache_info.dirty = TRUE;
+ sn->cache_info.is_dirty = TRUE;
insert_into = sn;
if (idx == sn->nsyms) {
rt_key->offset = offset;
@@ -1311,7 +1311,7 @@ H5G_node_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key/*in,out*/,
*rt_key = *lt_key;
*rt_key_changed = TRUE;
sn->nsyms = 0;
- sn->cache_info.dirty = TRUE;
+ sn->cache_info.is_dirty = TRUE;
if (H5MF_xfree(f, H5FD_MEM_BTREE, dxpl_id, addr, (hsize_t)H5G_node_size(f))<0
|| H5AC_unprotect(f, dxpl_id, H5AC_SNODE, addr, sn, TRUE)<0) {
sn = NULL;
@@ -1327,7 +1327,7 @@ H5G_node_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key/*in,out*/,
* change.
*/
sn->nsyms -= 1;
- sn->cache_info.dirty = TRUE;
+ sn->cache_info.is_dirty = TRUE;
HDmemmove(sn->entry+idx, sn->entry+idx+1,
(sn->nsyms-idx)*sizeof(H5G_entry_t));
ret_value = H5B_INS_NOOP;
@@ -1339,7 +1339,7 @@ H5G_node_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key/*in,out*/,
* should be changed to reflect the new right-most entry.
*/
sn->nsyms -= 1;
- sn->cache_info.dirty = TRUE;
+ sn->cache_info.is_dirty = TRUE;
rt_key->offset = sn->entry[sn->nsyms-1].name_off;
*rt_key_changed = TRUE;
ret_value = H5B_INS_NOOP;
@@ -1350,7 +1350,7 @@ H5G_node_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key/*in,out*/,
* node.
*/
sn->nsyms -= 1;
- sn->cache_info.dirty = TRUE;
+ sn->cache_info.is_dirty = TRUE;
HDmemmove(sn->entry+idx, sn->entry+idx+1,
(sn->nsyms-idx)*sizeof(H5G_entry_t));
ret_value = H5B_INS_NOOP;
@@ -1377,7 +1377,7 @@ H5G_node_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key/*in,out*/,
*rt_key = *lt_key;
*rt_key_changed = TRUE;
sn->nsyms = 0;
- sn->cache_info.dirty = TRUE;
+ sn->cache_info.is_dirty = TRUE;
if (H5MF_xfree(f, H5FD_MEM_BTREE, dxpl_id, addr, (hsize_t)H5G_node_size(f))<0
|| H5AC_unprotect(f, dxpl_id, H5AC_SNODE, addr, sn, TRUE)<0) {
sn = NULL;
@@ -1851,7 +1851,7 @@ H5G_node_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream, int indent,
fprintf(stream, "%*sSymbol Table Node...\n", indent, "");
fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
"Dirty:",
- sn->cache_info.dirty ? "Yes" : "No");
+ sn->cache_info.is_dirty ? "Yes" : "No");
fprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
"Size of Node (in bytes):", (unsigned)H5G_node_size(f));
fprintf(stream, "%*s%-*s %d of %d\n", indent, "", fwidth,
diff --git a/src/H5HG.c b/src/H5HG.c
index 31bc709..5e29a00 100644
--- a/src/H5HG.c
+++ b/src/H5HG.c
@@ -216,7 +216,7 @@ H5HG_create (H5F_t *f, hid_t dxpl_id, size_t size)
"memory allocation failed");
heap->addr = addr;
heap->size = size;
- heap->cache_info.dirty = TRUE;
+ heap->cache_info.is_dirty = TRUE;
if (NULL==(heap->chunk = H5FL_BLK_MALLOC (heap_chunk,size)))
HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, HADDR_UNDEF, \
"memory allocation failed");
@@ -519,10 +519,10 @@ H5HG_flush (H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5HG_heap_t
assert (H5F_addr_eq (addr, heap->addr));
assert (heap);
- if (heap->cache_info.dirty) {
+ if (heap->cache_info.is_dirty) {
if (H5F_block_write (f, H5FD_MEM_GHEAP, addr, heap->size, dxpl_id, heap->chunk)<0)
HGOTO_ERROR (H5E_HEAP, H5E_WRITEERROR, FAIL, "unable to write global heap collection to file");
- heap->cache_info.dirty = 0;
+ heap->cache_info.is_dirty = FALSE;
}
if (destroy) {
@@ -560,7 +560,7 @@ H5HG_dest (H5F_t *f, H5HG_heap_t *heap)
assert (heap);
/* Verify that node is clean */
- assert (heap->cache_info.dirty==0);
+ assert (heap->cache_info.is_dirty==FALSE);
for (i=0; i<f->shared->ncwfs; i++) {
if (f->shared->cwfs[i]==heap) {
@@ -600,7 +600,7 @@ H5HG_clear(H5HG_heap_t *heap)
assert (heap);
/* Mark heap as clean */
- heap->cache_info.dirty = 0;
+ heap->cache_info.is_dirty = FALSE;
FUNC_LEAVE_NOAPI(SUCCEED);
} /* H5HG_clear() */
@@ -714,7 +714,7 @@ H5HG_alloc (H5F_t *f, H5HG_heap_t *heap, size_t size)
}
/* Mark the heap as dirty */
- heap->cache_info.dirty = 1;
+ heap->cache_info.is_dirty = TRUE;
/* Set the return value */
ret_value=idx;
@@ -808,7 +808,7 @@ HDmemset(new_chunk+heap->size,0,need);
assert(H5HG_ISALIGNED(heap->obj[0].size));
/* Mark the heap as dirty */
- heap->cache_info.dirty = 1;
+ heap->cache_info.is_dirty = TRUE;
done:
FUNC_LEAVE_NOAPI(ret_value);
@@ -979,7 +979,7 @@ H5HG_insert (H5F_t *f, hid_t dxpl_id, size_t size, void *obj, H5HG_t *hobj/*out*
need-(H5HG_SIZEOF_OBJHDR(f)+size));
#endif /* OLD_WAY */
} /* end if */
- heap->cache_info.dirty = TRUE;
+ heap->cache_info.is_dirty = TRUE;
/* Return value */
hobj->addr = heap->addr;
@@ -1113,7 +1113,7 @@ H5HG_link (H5F_t *f, hid_t dxpl_id, const H5HG_t *hobj, int adjust)
if (heap->obj[hobj->idx].nrefs+adjust>H5HG_MAXLINK)
HGOTO_ERROR (H5E_HEAP, H5E_BADVALUE, FAIL, "new link count would be out of range");
heap->obj[hobj->idx].nrefs += adjust;
- heap->cache_info.dirty = TRUE;
+ heap->cache_info.is_dirty = TRUE;
} /* end if */
/* Set return value */
@@ -1192,14 +1192,14 @@ H5HG_remove (H5F_t *f, hid_t dxpl_id, H5HG_t *hobj)
H5F_ENCODE_LENGTH (f, p, heap->obj[0].size);
}
HDmemset (heap->obj+hobj->idx, 0, sizeof(H5HG_obj_t));
- heap->cache_info.dirty = 1;
+ heap->cache_info.is_dirty = TRUE;
if (heap->obj[0].size+H5HG_SIZEOF_HDR(f)==heap->size) {
/*
* The collection is empty. Remove it from the CWFS list and return it
* to the file free list.
*/
- heap->cache_info.dirty = FALSE;
+ heap->cache_info.is_dirty = FALSE;
H5_CHECK_OVERFLOW(heap->size,size_t,hsize_t);
H5MF_xfree(f, H5FD_MEM_GHEAP, dxpl_id, heap->addr, (hsize_t)heap->size);
deleted=TRUE; /* Indicate that the object was deleted, for the unprotect call */
diff --git a/src/H5HGdbg.c b/src/H5HGdbg.c
index a16dabb..bb01709 100644
--- a/src/H5HGdbg.c
+++ b/src/H5HGdbg.c
@@ -79,7 +79,7 @@ H5HG_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
fprintf(stream, "%*sGlobal Heap Collection...\n", indent, "");
fprintf(stream, "%*s%-*s %d\n", indent, "", fwidth,
"Dirty:",
- (int)(h->cache_info.dirty));
+ (int)(h->cache_info.is_dirty));
fprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
"Total collection size in file:",
(unsigned long)(h->size));
diff --git a/src/H5HL.c b/src/H5HL.c
index 44976a8..8082b7f 100644
--- a/src/H5HL.c
+++ b/src/H5HL.c
@@ -173,7 +173,7 @@ H5HL_create(H5F_t *f, hid_t dxpl_id, size_t size_hint, haddr_t *addr_p/*out*/)
}
/* add to cache */
- heap->cache_info.dirty = 1;
+ heap->cache_info.is_dirty = TRUE;
if (H5AC_set(f, dxpl_id, H5AC_LHEAP, *addr_p, heap) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "unable to cache heap");
@@ -560,7 +560,7 @@ H5HL_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5HL_t *heap)
assert(H5F_addr_defined(addr));
assert(heap);
- if (heap->cache_info.dirty) {
+ if (heap->cache_info.is_dirty) {
haddr_t hdr_end_addr;
size_t sizeof_hdr = H5HL_SIZEOF_HDR(f); /* cache H5HL header size for file */
@@ -589,7 +589,7 @@ H5HL_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5HL_t *heap)
HGOTO_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL, "unable to write heap data to file")
}
- heap->cache_info.dirty = FALSE;
+ heap->cache_info.is_dirty = FALSE;
}
/* Should we destroy the memory version? */
@@ -629,7 +629,7 @@ H5HL_dest(H5F_t UNUSED *f, H5HL_t *heap)
assert(heap);
/* Verify that node is clean */
- assert (heap->cache_info.dirty==FALSE);
+ assert (heap->cache_info.is_dirty==FALSE);
if(heap->chunk)
heap->chunk = H5FL_BLK_FREE(heap_chunk,heap->chunk);
@@ -668,7 +668,7 @@ H5HL_clear(H5HL_t *heap)
assert(heap);
/* Mark heap as clean */
- heap->cache_info.dirty = FALSE;
+ heap->cache_info.is_dirty = FALSE;
FUNC_LEAVE_NOAPI(SUCCEED);
} /* end H5HL_clear() */
@@ -930,7 +930,7 @@ H5HL_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, size_t buf_size, const void *
if (NULL == (heap = H5AC_protect(f, dxpl_id, H5AC_LHEAP, addr, NULL, NULL, H5AC_WRITE)))
HGOTO_ERROR(H5E_HEAP, H5E_PROTECT, (size_t)(-1), "unable to load heap");
- heap->cache_info.dirty=TRUE;
+ heap->cache_info.is_dirty=TRUE;
/* Cache this for later */
sizeof_hdr= H5HL_SIZEOF_HDR(f);
@@ -1116,7 +1116,7 @@ H5HL_write(H5F_t *f, hid_t dxpl_id, haddr_t addr, size_t offset, size_t size, co
assert(offset < heap->mem_alloc);
assert(offset + size <= heap->mem_alloc);
- heap->cache_info.dirty=TRUE;
+ heap->cache_info.is_dirty=TRUE;
HDmemcpy(heap->chunk + H5HL_SIZEOF_HDR(f) + offset, buf, size);
done:
@@ -1182,7 +1182,7 @@ H5HL_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, size_t offset, size_t size)
assert(offset + size <= heap->mem_alloc);
fl = heap->freelist;
- heap->cache_info.dirty=TRUE;
+ heap->cache_info.is_dirty=TRUE;
/*
* Check if this chunk can be prepended or appended to an already
diff --git a/src/H5HLdbg.c b/src/H5HLdbg.c
index ee5f360..8a81b9f 100644
--- a/src/H5HLdbg.c
+++ b/src/H5HLdbg.c
@@ -77,7 +77,7 @@ H5HL_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream, int indent, int
fprintf(stream, "%*sLocal Heap...\n", indent, "");
fprintf(stream, "%*s%-*s %d\n", indent, "", fwidth,
"Dirty:",
- (int) (h->cache_info.dirty));
+ (int) (h->cache_info.is_dirty));
fprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
"Header size (in bytes):",
(unsigned long) H5HL_SIZEOF_HDR(f));
diff --git a/src/H5O.c b/src/H5O.c
index 807ed06..c49768c 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -281,7 +281,7 @@ H5O_init(H5F_t *f, hid_t dxpl_id, size_t size_hint, H5G_entry_t *ent/*out*/, had
if (NULL == (oh = H5FL_MALLOC(H5O_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed");
- oh->cache_info.dirty = TRUE;
+ oh->cache_info.is_dirty = TRUE;
oh->version = H5O_VERSION;
oh->nlink = 0;
@@ -658,7 +658,7 @@ H5O_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5O_t *oh)
assert(oh);
/* flush */
- if (oh->cache_info.dirty) {
+ if (oh->cache_info.is_dirty) {
p = buf;
/* encode version */
@@ -782,7 +782,7 @@ H5O_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5O_t *oh)
oh->chunk[u].dirty = FALSE;
} /* end if */
} /* end for */
- oh->cache_info.dirty = FALSE;
+ oh->cache_info.is_dirty = FALSE;
}
if (destroy) {
@@ -821,7 +821,7 @@ H5O_dest(H5F_t UNUSED *f, H5O_t *oh)
assert(oh);
/* Verify that node is clean */
- assert (oh->cache_info.dirty==FALSE);
+ assert (oh->cache_info.is_dirty==FALSE);
/* destroy chunks */
for (i = 0; i < oh->nchunks; i++) {
@@ -885,7 +885,7 @@ H5O_clear(H5O_t *oh)
oh->mesg[u].dirty=FALSE;
/* Mark whole header as clean */
- oh->cache_info.dirty=FALSE;
+ oh->cache_info.is_dirty=FALSE;
FUNC_LEAVE_NOAPI(SUCCEED);
} /* end H5O_clear() */
@@ -1183,7 +1183,7 @@ H5O_link(const H5G_entry_t *ent, int adjust, hid_t dxpl_id)
if (oh->nlink + adjust < 0)
HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "link count would be negative");
oh->nlink += adjust;
- oh->cache_info.dirty = TRUE;
+ oh->cache_info.is_dirty = TRUE;
/* Check if the object should be deleted */
if(oh->nlink==0) {
@@ -1214,7 +1214,7 @@ H5O_link(const H5G_entry_t *ent, int adjust, hid_t dxpl_id)
} /* end if */
oh->nlink += adjust;
- oh->cache_info.dirty = TRUE;
+ oh->cache_info.is_dirty = TRUE;
}
/* Set return value */
@@ -2154,7 +2154,7 @@ H5O_write_mesg(H5O_t *oh, unsigned idx, const H5O_class_t *type,
idx_msg->flags = flags;
idx_msg->dirty = TRUE;
- oh->cache_info.dirty = TRUE;
+ oh->cache_info.is_dirty = TRUE;
done:
FUNC_LEAVE_NOAPI(ret_value);
@@ -2221,7 +2221,7 @@ H5O_touch_oh(H5F_t *f, H5O_t *oh, hbool_t force)
}
*((time_t*)(oh->mesg[idx].native)) = now;
oh->mesg[idx].dirty = TRUE;
- oh->cache_info.dirty = TRUE;
+ oh->cache_info.is_dirty = TRUE;
done:
FUNC_LEAVE_NOAPI(ret_value);
@@ -2511,7 +2511,7 @@ H5O_remove_real(H5G_entry_t *ent, const H5O_class_t *type, int sequence, hid_t d
else
curr_msg->native = H5O_free_real(type, curr_msg->native);
curr_msg->dirty = TRUE;
- oh->cache_info.dirty = TRUE;
+ oh->cache_info.is_dirty = TRUE;
H5O_touch_oh(ent->file, oh, FALSE);
}
}
@@ -2991,7 +2991,7 @@ H5O_alloc(H5F_t *f, H5O_t *oh, const H5O_class_t *type, size_t size)
msg->dirty = TRUE;
msg->native = NULL;
- oh->cache_info.dirty = TRUE;
+ oh->cache_info.is_dirty = TRUE;
/* Set return value */
ret_value=idx;
@@ -3458,7 +3458,7 @@ H5O_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int f
HDfprintf(stream, "%*s%-*s %d\n", indent, "", fwidth,
"Dirty:",
- (int) (oh->cache_info.dirty));
+ (int) (oh->cache_info.is_dirty));
HDfprintf(stream, "%*s%-*s %d\n", indent, "", fwidth,
"Version:",
(int) (oh->version));