summaryrefslogtreecommitdiffstats
path: root/src/H5Bcache.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2008-06-06 20:25:35 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2008-06-06 20:25:35 (GMT)
commit791ab755ac81dc50adabdfe269107722da90f659 (patch)
tree0ff85448b4b81ad38b205e613d4f0eb4e255b83d /src/H5Bcache.c
parent44db7da08789c0a2c4b82d74f70fbe6b1831eefd (diff)
downloadhdf5-791ab755ac81dc50adabdfe269107722da90f659.zip
hdf5-791ab755ac81dc50adabdfe269107722da90f659.tar.gz
hdf5-791ab755ac81dc50adabdfe269107722da90f659.tar.bz2
[svn-r15171] Description:
Convert the symbol table node metadata cache client to use the new journaling cache callbacks. Also added a 'H5F_t *' parameter to the 'serialize' callback for the journaling cache, which makes the client's job much easier. Various minor coding cleanups, etc. also. Tested on: FreeBSD/32 6.2 (duty) in debug mode FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Mac OS X/32 10.5.3 (amazon) in debug mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
Diffstat (limited to 'src/H5Bcache.c')
-rw-r--r--src/H5Bcache.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/H5Bcache.c b/src/H5Bcache.c
index f18dee2..2ecfcf3 100644
--- a/src/H5Bcache.c
+++ b/src/H5Bcache.c
@@ -56,9 +56,8 @@
/* Metadata cache callbacks */
static void *H5B_deserialize(haddr_t addr, size_t len, const void *image,
const void *udata, hbool_t *dirty);
-static herr_t H5B_serialize(haddr_t addr, size_t len, void *image,
- void *thing, unsigned *flags, haddr_t *new_addr,
- size_t *new_len, void **new_image);
+static herr_t H5B_serialize(const H5F_t *f, haddr_t addr, size_t len, void *image,
+ void *thing, unsigned *flags, haddr_t *new_addr, size_t *new_len, void **new_image);
static herr_t H5B_free_icr(haddr_t addr, size_t len, void *thing);
@@ -66,7 +65,7 @@ static herr_t H5B_free_icr(haddr_t addr, size_t len, void *thing);
/* Package Variables */
/*********************/
-/* H5B inherits cache-like properties from H5AC */
+/* H5B inherits cache-like properties from H5AC2 */
const H5AC2_class_t H5AC2_BT[1] = {{
H5AC2_BT_ID,
"v1 B-tree",
@@ -203,8 +202,8 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5B_serialize(haddr_t UNUSED addr, size_t UNUSED len, void *image, void *_thing,
- unsigned *flags, haddr_t UNUSED *new_addr, size_t UNUSED *new_len,
+H5B_serialize(const H5F_t *f, haddr_t UNUSED addr, size_t UNUSED len, void *image,
+ void *_thing, unsigned *flags, haddr_t UNUSED *new_addr, size_t UNUSED *new_len,
void UNUSED **new_image)
{
H5B_t *bt = (H5B_t *)_thing; /* Pointer to the B-tree node */
@@ -240,8 +239,8 @@ H5B_serialize(haddr_t UNUSED addr, size_t UNUSED len, void *image, void *_thing,
UINT16ENCODE(p, bt->nchildren);
/* sibling pointers */
- H5F_addr_encode_len(&p, bt->left, shared->sizeof_addr);
- H5F_addr_encode_len(&p, bt->right, shared->sizeof_addr);
+ H5F_addr_encode(f, &p, bt->left);
+ H5F_addr_encode(f, &p, bt->right);
/* child keys and pointers */
native = bt->native;
@@ -253,7 +252,7 @@ H5B_serialize(haddr_t UNUSED addr, size_t UNUSED len, void *image, void *_thing,
native += shared->type->sizeof_nkey;
/* encode the child address */
- H5F_addr_encode_len(&p, bt->child[u], shared->sizeof_addr);
+ H5F_addr_encode(f, &p, bt->child[u]);
} /* end for */
if(bt->nchildren > 0) {
/* Encode the final key */