summaryrefslogtreecommitdiffstats
path: root/src/H5HGdbg.c
diff options
context:
space:
mode:
authorBill Wendling <wendling@ncsa.uiuc.edu>2003-09-10 17:05:19 (GMT)
committerBill Wendling <wendling@ncsa.uiuc.edu>2003-09-10 17:05:19 (GMT)
commit6d928cf05ef860086825665cbfff18c6d1c15b3c (patch)
tree1236f11f1935fefcd8d6ec04631e5313dba3baaa /src/H5HGdbg.c
parent14f7f3e53d97c3f31a129145e7ea7e9cd55008dc (diff)
downloadhdf5-6d928cf05ef860086825665cbfff18c6d1c15b3c.zip
hdf5-6d928cf05ef860086825665cbfff18c6d1c15b3c.tar.gz
hdf5-6d928cf05ef860086825665cbfff18c6d1c15b3c.tar.bz2
[svn-r7456] Purpose:
Removal of H5AC_find() Description: The H5AC_find() function is mostly redundant and with the new Flexible Parallel HDF5 stuff, we need to do locking on metadata returned from the H5AC_find() anyway. So, all of the locking stuff will be placed in the H5AC_{un}protect() functions. The H5AC_find() is no longer needed. Solution: Replaced all H5AC_finds with H5AC_protects and H5AC_unprotects. Platforms tested: Linux (Fortran & C++) Solaris (Fortran) Irix (Parallel & Fortran) Misc. update:
Diffstat (limited to 'src/H5HGdbg.c')
-rw-r--r--src/H5HGdbg.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/H5HGdbg.c b/src/H5HGdbg.c
index 128ba93..c8afd85 100644
--- a/src/H5HGdbg.c
+++ b/src/H5HGdbg.c
@@ -73,8 +73,9 @@ H5HG_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
assert(indent >= 0);
assert(fwidth >= 0);
- if (NULL == (h = H5AC_find(f, dxpl_id, H5AC_GHEAP, addr, NULL, NULL)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL, "unable to load global heap collection");
+ if (NULL == (h = H5AC_protect(f, dxpl_id, H5AC_GHEAP, addr, NULL, NULL)))
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL, "unable to load global heap collection");
+
fprintf(stream, "%*sGlobal Heap Collection...\n", indent, "");
fprintf(stream, "%*s%-*s %d\n", indent, "", fwidth,
"Dirty:",
@@ -129,8 +130,12 @@ H5HG_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
}
}
}
-
+
+ if (H5AC_unprotect(f, dxpl_id, H5AC_GHEAP, addr, h, FALSE) != SUCCEED)
+ HGOTO_ERROR(H5E_HEAP, H5E_PROTECT, FAIL, "unable to release object header");
+
+ h = NULL;
+
done:
FUNC_LEAVE_NOAPI(ret_value);
}
-