summaryrefslogtreecommitdiffstats
path: root/src/H5Gobj.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-06-04 15:13:15 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-06-04 15:13:15 (GMT)
commitcdc17466372df564ed2b9d603b278803000c027c (patch)
treed106fb19fa3580aa9c3047b845149e068e4911da /src/H5Gobj.c
parentfc2899346417fed3727f28115d30d9fd62d6691d (diff)
downloadhdf5-cdc17466372df564ed2b9d603b278803000c027c.zip
hdf5-cdc17466372df564ed2b9d603b278803000c027c.tar.gz
hdf5-cdc17466372df564ed2b9d603b278803000c027c.tar.bz2
[svn-r17002] Description:
Rename H5O_protect/H5O_unprotect to be H5O_pin/H5O_unpin, since that's what that are actually doing. Add counter of the number of times the object header is pinned, to allow H5O_pin/H5O_unpin to be called reentrantly. 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/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.5.7 (amazon) in debug mode Mac OS X/32 10.5.7 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'src/H5Gobj.c')
-rw-r--r--src/H5Gobj.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/H5Gobj.c b/src/H5Gobj.c
index 08a9268..a11dc13 100644
--- a/src/H5Gobj.c
+++ b/src/H5Gobj.c
@@ -806,8 +806,8 @@ H5G_obj_remove_update_linfo(H5O_loc_t *oloc, H5O_linfo_t *linfo, hid_t dxpl_id)
HGOTO_ERROR(H5E_SYM, H5E_CANTNEXT, FAIL, "error iterating over links")
/* Get a pointer to the object header itself */
- if((oh = H5O_protect(oloc, dxpl_id)) == NULL)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to protect dataset object header")
+ if(NULL == (oh = H5O_pin(oloc, dxpl_id)))
+ HGOTO_ERROR(H5E_SYM, H5E_CANTPIN, FAIL, "unable to pin group object header")
/* Inspect links in table for ones that can't be converted back
* into link message form (currently only links which can't fit
@@ -825,8 +825,8 @@ H5G_obj_remove_update_linfo(H5O_loc_t *oloc, H5O_linfo_t *linfo, hid_t dxpl_id)
for(u = 0; u < linfo->nlinks; u++)
if(H5O_msg_append_oh(oloc->file, dxpl_id, oh, H5O_LINK_ID, 0, H5O_UPDATE_TIME, &(ltable.lnks[u])) < 0) {
/* Release object header */
- if(H5O_unprotect(oloc, oh) < 0)
- HDONE_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to unprotect dataset object header")
+ if(H5O_unpin(oloc, oh) < 0)
+ HDONE_ERROR(H5E_SYM, H5E_CANTUNPIN, FAIL, "unable to unpin group object header")
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create message")
} /* end if */
@@ -837,8 +837,8 @@ H5G_obj_remove_update_linfo(H5O_loc_t *oloc, H5O_linfo_t *linfo, hid_t dxpl_id)
} /* end if */
/* Release object header */
- if(H5O_unprotect(oloc, oh) < 0)
- HDONE_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to unprotect dataset object header")
+ if(H5O_unpin(oloc, oh) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTUNPIN, FAIL, "unable to unpin group object header")
/* Free link table information */
if(H5G_link_release_table(&ltable) < 0)