diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2009-06-04 15:31:50 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2009-06-04 15:31:50 (GMT) |
commit | f4f0c14939c625594989e714cbe74dad46afbee3 (patch) | |
tree | 0626fed6469476a49eee9fc42aa34aac3926e36d /src/H5Gobj.c | |
parent | af7d1c4cd4e088d7e068cc2374983019eb262152 (diff) | |
download | hdf5-f4f0c14939c625594989e714cbe74dad46afbee3.zip hdf5-f4f0c14939c625594989e714cbe74dad46afbee3.tar.gz hdf5-f4f0c14939c625594989e714cbe74dad46afbee3.tar.bz2 |
[svn-r17004] Description:
Bring r17002 from trunk to 1.8 branch:
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:
Mac OS X/32 10.5.7 (amazon) w/debug & prod
h5committest already run for trunk version of change
Diffstat (limited to 'src/H5Gobj.c')
-rw-r--r-- | src/H5Gobj.c | 12 |
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(<able) < 0) |