diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2009-12-01 16:45:27 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2009-12-01 16:45:27 (GMT) |
commit | 71a9d507255366be01c25e458ac4c953d4481f45 (patch) | |
tree | 511f2662e8cc85010434af4a64812da147848317 /src/H5B2cache.c | |
parent | 1bc79f977be67f734a44fd237be6f05b5fb25f53 (diff) | |
download | hdf5-71a9d507255366be01c25e458ac4c953d4481f45.zip hdf5-71a9d507255366be01c25e458ac4c953d4481f45.tar.gz hdf5-71a9d507255366be01c25e458ac4c953d4481f45.tar.bz2 |
[svn-r17943] Description:
Finish refactoring v2 B-trees so that they can have client callback
context provided to the encode/decode callbacks.
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (smirom) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.2 (amazon) in debug mode
Mac OS X/32 10.6.2 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
Diffstat (limited to 'src/H5B2cache.c')
-rw-r--r-- | src/H5B2cache.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/H5B2cache.c b/src/H5B2cache.c index 6737076..15dcb26 100644 --- a/src/H5B2cache.c +++ b/src/H5B2cache.c @@ -147,7 +147,8 @@ const H5AC_class_t H5AC_BT2_LEAF[1] = {{ *------------------------------------------------------------------------- */ static H5B2_hdr_t * -H5B2_cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void UNUSED *udata1, void UNUSED *udata2) +H5B2_cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void UNUSED *udata1, + void *ctx_udata) { H5B2_create_t cparam; /* B-tree creation parameters */ H5B2_subid_t id; /* ID of B-tree class, as found in file */ @@ -237,7 +238,7 @@ H5B2_cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void UNUSED *ud /* Initialize B-tree header info */ cparam.cls = H5B2_client_class_g[id]; - if(H5B2_hdr_init(f, hdr, &cparam, depth) < 0) + if(H5B2_hdr_init(f, hdr, &cparam, ctx_udata, depth) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, NULL, "can't initialize B-tree header info") /* Set the B-tree header's address */ @@ -564,7 +565,7 @@ H5B2_cache_internal_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void *_uda native = internal->int_native; for(u = 0; u < internal->nrec; u++) { /* Decode record */ - if((udata->hdr->cls->decode)(f, p, native) < 0) + if((udata->hdr->cls->decode)(p, native, udata->hdr->cb_ctx) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTDECODE, NULL, "unable to decode B-tree record") /* Move to next record */ @@ -663,7 +664,7 @@ H5B2_cache_internal_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr native = internal->int_native; for(u = 0; u < internal->nrec; u++) { /* Encode record */ - if((internal->hdr->cls->encode)(f, p, native) < 0) + if((internal->hdr->cls->encode)(p, native, internal->hdr->cb_ctx) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTENCODE, FAIL, "unable to encode B-tree record") /* Move to next record */ @@ -916,7 +917,7 @@ H5B2_cache_leaf_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void *_nrec, v native = leaf->leaf_native; for(u = 0; u < leaf->nrec; u++) { /* Decode record */ - if((hdr->cls->decode)(f, p, native) < 0) + if((hdr->cls->decode)(p, native, hdr->cb_ctx) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTENCODE, NULL, "unable to decode B-tree record") /* Move to next record */ @@ -999,7 +1000,7 @@ H5B2_cache_leaf_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5 native = leaf->leaf_native; for(u = 0; u < leaf->nrec; u++) { /* Encode record */ - if((leaf->hdr->cls->encode)(f, p, native) < 0) + if((leaf->hdr->cls->encode)(p, native, leaf->hdr->cb_ctx) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTENCODE, FAIL, "unable to encode B-tree record") /* Move to next record */ |