summaryrefslogtreecommitdiffstats
path: root/src/H5B.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1998-10-21 15:14:15 (GMT)
committerRobb Matzke <matzke@llnl.gov>1998-10-21 15:14:15 (GMT)
commit2bfbf4f707415774e17d160e626a5e11ff8d8d61 (patch)
treeac6ba5031c7e2774442953f750e356f8f3e7ae94 /src/H5B.c
parentbf5d98d7b9018c03e947422dc6f43e76feeca2b0 (diff)
downloadhdf5-2bfbf4f707415774e17d160e626a5e11ff8d8d61.zip
hdf5-2bfbf4f707415774e17d160e626a5e11ff8d8d61.tar.gz
hdf5-2bfbf4f707415774e17d160e626a5e11ff8d8d61.tar.bz2
[svn-r773] Changes since 19981019
---------------------- ./src/H5Fistore.c Improved the hash function so it mixes bits better. This results in a few percent improvement in raw data chunk cache efficiency because there are fewer collisions. ./test/chunk.c Added #define's for chunk preemption `w0' value and number of slots in cache. ./src/H5B.c Added some more comments to H5B_insert_helper() and H5B_remove_helper() and also point to some additional documentation.
Diffstat (limited to 'src/H5B.c')
-rw-r--r--src/H5B.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/H5B.c b/src/H5B.c
index adf5710..a118054 100644
--- a/src/H5B.c
+++ b/src/H5B.c
@@ -1116,7 +1116,10 @@ H5B_insert_child(H5F_t *f, const H5B_class_t *type, H5B_t *bt,
* Return: Success: A B-tree operation. The address of the new
* node, if the node splits, is returned through
* the NEW_NODE argument. The new node is always
- * to the right of the previous node.
+ * to the right of the previous node. This
+ * function is called recursively and the return
+ * value influences the behavior of the caller.
+ * See also, declaration of H5B_ins_t.
*
* Failure: H5B_INS_ERROR
*
@@ -1583,11 +1586,17 @@ H5B_iterate (H5F_t *f, const H5B_class_t *type, const haddr_t *addr,
* sub B-tree that is being considered is located at ADDR and
* the item to remove is described by UDATA. If the removed
* item falls at the left or right end of the current level then
- * it might be necessary to adjust the left and/or right keys.
+ * it might be necessary to adjust the left and/or right keys
+ * (LT_KEY and/or RT_KEY) to to indicate that they changed by
+ * setting LT_KEY_CHANGED and/or RT_KEY_CHANGED.
*
- * Return: Success: A B-tree operation.
+ * Return: Success: A B-tree operation, see comments for
+ * H5B_ins_t declaration. This function is
+ * called recursively and the return value
+ * influences the actions of the caller. It is
+ * also called by H5B_remove().
*
- * Failure: H5B_INS_ERROR
+ * Failure: H5B_INS_ERROR, a negative value.
*
* Programmer: Robb Matzke
* Wednesday, September 16, 1998
@@ -1641,7 +1650,8 @@ H5B_remove_helper(H5F_t *f, const haddr_t *addr, const H5B_class_t *type,
}
}
if (cmp) {
- HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, H5B_INS_ERROR, "B-tree key not found");
+ HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, H5B_INS_ERROR,
+ "B-tree key not found");
}
/*
@@ -1659,7 +1669,7 @@ H5B_remove_helper(H5F_t *f, const haddr_t *addr, const H5B_class_t *type,
lt_key_changed/*out*/,
udata,
bt->key[idx+1].nkey/*out*/,
- rt_key_changed/*out*/))==H5B_INS_ERROR) {
+ rt_key_changed/*out*/))<0) {
HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, H5B_INS_ERROR,
"key not found in subtree");
}