summaryrefslogtreecommitdiffstats
path: root/src/H5Dint.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/H5Dint.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/H5Dint.c')
-rw-r--r--src/H5Dint.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/H5Dint.c b/src/H5Dint.c
index 00bc347..36ad640 100644
--- a/src/H5Dint.c
+++ b/src/H5Dint.c
@@ -844,8 +844,8 @@ H5D_update_oh_info(H5F_t *file, hid_t dxpl_id, H5D_t *dset)
HDassert(file == dset->oloc.file);
/* Get a pointer to the object header itself */
- if((oh = H5O_protect(oloc, dxpl_id)) == NULL)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTPROTECT, FAIL, "unable to protect dataset object header")
+ if(NULL == (oh = H5O_pin(oloc, dxpl_id)))
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTPIN, FAIL, "unable to pin dataset object header")
/* Write new fill value message */
if(H5O_msg_append_oh(file, dxpl_id, oh, H5O_FILL_NEW_ID, H5O_MSG_FLAG_CONSTANT, 0, fill_prop) < 0)
@@ -981,8 +981,8 @@ H5D_update_oh_info(H5F_t *file, hid_t dxpl_id, H5D_t *dset)
done:
/* Release pointer to object header itself */
if(oloc != NULL && oh != NULL)
- if(H5O_unprotect(oloc, oh) < 0)
- HDONE_ERROR(H5E_DATASET, H5E_CANTUNPROTECT, FAIL, "unable to unprotect dataset object header")
+ if(H5O_unpin(oloc, oh) < 0)
+ HDONE_ERROR(H5E_DATASET, H5E_CANTUNPIN, FAIL, "unable to unpin dataset object header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D_update_oh_info() */
@@ -2410,8 +2410,8 @@ H5D_flush_real(H5D_t *dataset, hid_t dxpl_id, unsigned flags)
unsigned update_flags = H5O_UPDATE_TIME; /* Modification time flag */
/* Get a pointer to the dataset's object header */
- if((oh = H5O_protect(&dataset->oloc, dxpl_id)) == NULL)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTPROTECT, FAIL, "unable to protect dataset object header")
+ if(NULL == (oh = H5O_pin(&dataset->oloc, dxpl_id)))
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTPIN, FAIL, "unable to pin dataset object header")
/* Update the layout on disk, if it's been changed */
if(dataset->shared->layout_dirty) {
@@ -2479,8 +2479,8 @@ H5D_flush_real(H5D_t *dataset, hid_t dxpl_id, unsigned flags)
done:
/* Release pointer to object header */
if(oh != NULL)
- if(H5O_unprotect(&(dataset->oloc), oh) < 0)
- HDONE_ERROR(H5E_DATASET, H5E_CANTUNPROTECT, FAIL, "unable to unprotect dataset object header")
+ if(H5O_unpin(&(dataset->oloc), oh) < 0)
+ HDONE_ERROR(H5E_DATASET, H5E_CANTUNPIN, FAIL, "unable to unpin dataset object header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D_flush_real() */