diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2010-05-05 13:39:56 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2010-05-05 13:39:56 (GMT) |
commit | 74c8b68acab0fc2408740e7a38a2ab2bcdf58f57 (patch) | |
tree | d0d2da7ac1ea824f0ef78e757ace31a85bc4b6aa /src/H5HFdbg.c | |
parent | 4c0421ba76a7615cc02f43b8f3778f5d6a1f4d68 (diff) | |
download | hdf5-74c8b68acab0fc2408740e7a38a2ab2bcdf58f57.zip hdf5-74c8b68acab0fc2408740e7a38a2ab2bcdf58f57.tar.gz hdf5-74c8b68acab0fc2408740e7a38a2ab2bcdf58f57.tar.bz2 |
[svn-r18702] Description:
Bring r18672 from metadata journaling "merging" branch to trunk:
Mostly changes to move to only using one 'user data' parameter for
calls to H5AC_protect(), along with some minor reformatting code cleanups.
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 (amani) 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-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
Diffstat (limited to 'src/H5HFdbg.c')
-rw-r--r-- | src/H5HFdbg.c | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/src/H5HFdbg.c b/src/H5HFdbg.c index 3931eb0..e2ee20c 100644 --- a/src/H5HFdbg.c +++ b/src/H5HFdbg.c @@ -188,6 +188,7 @@ herr_t H5HF_hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int fwidth) { H5HF_hdr_t *hdr = NULL; /* Fractal heap header info */ + H5HF_hdr_cache_ud_t cache_udata; /* User-data for callback */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(H5HF_hdr_debug, FAIL) @@ -201,10 +202,14 @@ H5HF_hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, HDassert(indent >= 0); HDassert(fwidth >= 0); + /* Set up user data for protect call */ + cache_udata.f = f; + cache_udata.dxpl_id = dxpl_id; + /* * Load the fractal heap header. */ - if(NULL == (hdr = (H5HF_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_FHEAP_HDR, addr, NULL, NULL, H5AC_READ))) + if(NULL == (hdr = (H5HF_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_FHEAP_HDR, addr, &cache_udata, H5AC_READ))) HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL, "unable to load fractal heap header") /* Print opening message */ @@ -394,6 +399,7 @@ H5HF_dblock_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, { H5HF_hdr_t *hdr = NULL; /* Fractal heap header info */ H5HF_direct_t *dblock = NULL; /* Fractal heap direct block info */ + H5HF_hdr_cache_ud_t cache_udata; /* User-data for callback */ size_t blk_prefix_size; /* Size of prefix for block */ size_t amount_free; /* Amount of free space in block */ uint8_t *marker = NULL; /* Track free space for block */ @@ -412,10 +418,14 @@ H5HF_dblock_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, HDassert(H5F_addr_defined(hdr_addr)); HDassert(block_size > 0); + /* Set up user data for protect call */ + cache_udata.f = f; + cache_udata.dxpl_id = dxpl_id; + /* * Load the fractal heap header. */ - if(NULL == (hdr = (H5HF_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_FHEAP_HDR, hdr_addr, NULL, NULL, H5AC_READ))) + if(NULL == (hdr = (H5HF_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_FHEAP_HDR, hdr_addr, &cache_udata, H5AC_READ))) HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL, "unable to load fractal heap header") /* @@ -523,6 +533,7 @@ H5HF_iblock_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, { H5HF_hdr_t *hdr = NULL; /* Fractal heap header info */ H5HF_indirect_t *iblock = NULL; /* Fractal heap direct block info */ + H5HF_hdr_cache_ud_t cache_udata; /* User-data for callback */ hbool_t did_protect; /* Whether we protected the indirect block or not */ char temp_str[64]; /* Temporary string, for formatting */ size_t u, v; /* Local index variable */ @@ -541,10 +552,14 @@ H5HF_iblock_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, HDassert(H5F_addr_defined(hdr_addr)); HDassert(nrows > 0); + /* Set up user data for protect call */ + cache_udata.f = f; + cache_udata.dxpl_id = dxpl_id; + /* * Load the fractal heap header. */ - if(NULL == (hdr = (H5HF_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_FHEAP_HDR, hdr_addr, NULL, NULL, H5AC_READ))) + if(NULL == (hdr = (H5HF_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_FHEAP_HDR, hdr_addr, &cache_udata, H5AC_READ))) HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL, "unable to load fractal heap header") /* @@ -712,6 +727,7 @@ H5HF_sects_debug(H5F_t *f, hid_t dxpl_id, haddr_t fh_addr, FILE *stream, int indent, int fwidth) { H5HF_hdr_t *hdr = NULL; /* Fractal heap header info */ + H5HF_hdr_cache_ud_t cache_udata; /* User-data for callback */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(H5HF_sects_debug, FAIL) @@ -725,10 +741,14 @@ H5HF_sects_debug(H5F_t *f, hid_t dxpl_id, haddr_t fh_addr, HDassert(indent >= 0); HDassert(fwidth >= 0); + /* Set up user data for protect call */ + cache_udata.f = f; + cache_udata.dxpl_id = dxpl_id; + /* * Load the fractal heap header. */ - if(NULL == (hdr = (H5HF_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_FHEAP_HDR, fh_addr, NULL, NULL, H5AC_READ))) + if(NULL == (hdr = (H5HF_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_FHEAP_HDR, fh_addr, &cache_udata, H5AC_READ))) HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL, "unable to load fractal heap header") /* Initialize the free space information for the heap */ |