diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2010-04-10 02:33:28 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2010-04-10 02:33:28 (GMT) |
commit | 0e673fe2b97bfa6aecd475581a5456ba0b8caaa8 (patch) | |
tree | 9cbfb6c76ba4eec3765dfb86e9caa83bf4d5ea31 /src/H5Gobj.c | |
parent | d4e99c418f4acd61b4c2d9f9404c1d17ba40d465 (diff) | |
download | hdf5-0e673fe2b97bfa6aecd475581a5456ba0b8caaa8.zip hdf5-0e673fe2b97bfa6aecd475581a5456ba0b8caaa8.tar.gz hdf5-0e673fe2b97bfa6aecd475581a5456ba0b8caaa8.tar.bz2 |
[svn-r18542] Description:
Bring new object header pin/unpin & protect/unprotect routines and
split-out object header chunk proxy changes from metadata_journaling branch to
"merging" branch, along with some other minor tweaks to clean up compiler
warnings, etc.
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
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
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/H5Gobj.c')
-rw-r--r-- | src/H5Gobj.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/H5Gobj.c b/src/H5Gobj.c index e652957..70f1c34 100644 --- a/src/H5Gobj.c +++ b/src/H5Gobj.c @@ -888,9 +888,17 @@ 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) + if((oh = H5O_protect(oloc, dxpl_id, H5AC_WRITE)) == NULL) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to protect group object header") + /* Pin the object header */ + if(H5O_pin(oh) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTPIN, FAIL, "unable to pin group object header") + + /* Unprotect the object header */ + if(H5O_unprotect(oloc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTUNPROTECT, FAIL, "unable to unprotect 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 * into an object header message) @@ -907,8 +915,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(oh) < 0) - HDONE_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to unprotect group object header") + if(H5O_unpin(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 */ @@ -919,8 +927,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(oh) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to unprotect group object header") + if(H5O_unpin(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) |