summaryrefslogtreecommitdiffstats
path: root/src/H5O.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-04-22 21:59:31 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-04-22 21:59:31 (GMT)
commitd94581e19b6029d7839e41f882b6b453a87e249e (patch)
treee2af0b046bf32b9f00a4b8b6b63eec9102ce7917 /src/H5O.c
parentedf124f40bc52044ba7f020225029d05190ffd39 (diff)
downloadhdf5-d94581e19b6029d7839e41f882b6b453a87e249e.zip
hdf5-d94581e19b6029d7839e41f882b6b453a87e249e.tar.gz
hdf5-d94581e19b6029d7839e41f882b6b453a87e249e.tar.bz2
[svn-r18618] Description:
Add new internal object header routines to query the header chunk that a message is in, and to lock/unlock a message into a chunk (so it doesn't get moved into another chunk during allocation/free events). Also, move dataspace message to beginning of object header messages added to a dataset's object header, so it can be locked into chunk #0 (when performing SWMR operations). 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 Linux/64-amd64 2.6 (amani) 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.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/H5O.c')
-rw-r--r--src/H5O.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/H5O.c b/src/H5O.c
index df3d0bb..a2b592b 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -1971,10 +1971,10 @@ H5O_touch_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh, hbool_t force)
/* Check version, to determine how to store time information */
if(oh->version == H5O_VERSION_1) {
- unsigned idx; /* Index of modification time message to update */
+ int idx; /* Index of modification time message to update */
/* Look for existing message */
- for(idx = 0; idx < oh->nmesgs; idx++)
+ for(idx = 0; idx < (int)oh->nmesgs; idx++)
if(H5O_MSG_MTIME == oh->mesg[idx].type || H5O_MSG_MTIME_NEW == oh->mesg[idx].type)
break;
@@ -1987,7 +1987,7 @@ H5O_touch_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh, hbool_t force)
HGOTO_DONE(SUCCEED); /*nothing to do*/
/* Allocate space for the modification time message */
- if(UFAIL == (idx = H5O_msg_alloc(f, dxpl_id, oh, H5O_MSG_MTIME_NEW, &mesg_flags, &now)))
+ if((idx = H5O_msg_alloc(f, dxpl_id, oh, H5O_MSG_MTIME_NEW, &mesg_flags, &now)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to allocate space for modification time message")
/* Set the message's flags if appropriate */
@@ -2094,8 +2094,8 @@ done:
herr_t
H5O_bogus_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned mesg_flags)
{
- unsigned idx; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ int idx; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5O_bogus_oh, FAIL)
@@ -2103,7 +2103,7 @@ H5O_bogus_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned mesg_flags)
HDassert(oh);
/* Look for existing message */
- for(idx = 0; idx < oh->nmesgs; idx++)
+ for(idx = 0; idx < (int)oh->nmesgs; idx++)
if(H5O_MSG_BOGUS == oh->mesg[idx].type)
break;