summaryrefslogtreecommitdiffstats
path: root/src/H5HFdbg.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-05-05 17:18:50 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-05-05 17:18:50 (GMT)
commitca7fc8e96a70b06b08e1db21040056ae17a51906 (patch)
tree3d665b7a3119174158fc91a05fd8055f6ca7074b /src/H5HFdbg.c
parentb24e2d4dd861b67a61fcf56be5975bcd4d37203b (diff)
downloadhdf5-ca7fc8e96a70b06b08e1db21040056ae17a51906.zip
hdf5-ca7fc8e96a70b06b08e1db21040056ae17a51906.tar.gz
hdf5-ca7fc8e96a70b06b08e1db21040056ae17a51906.tar.bz2
[svn-r18708] Description:
Bring r18638:18704 from trunk to revise_chunks branch. Tested on: Mac OS X/32 10.6.3 (amazon) w/debug & production (h5committest not required on this branch)
Diffstat (limited to 'src/H5HFdbg.c')
-rw-r--r--src/H5HFdbg.c28
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 */