diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2010-04-22 22:07:35 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2010-04-22 22:07:35 (GMT) |
commit | 40c757d48b5fcdf0c217ae6392fb111b1a4acc91 (patch) | |
tree | 47e0f8d65be066d01c93ea7701d0632768aa8673 /src/H5O.c | |
parent | 683d60460a94869225094b4efc824258c5b0dcd3 (diff) | |
download | hdf5-40c757d48b5fcdf0c217ae6392fb111b1a4acc91.zip hdf5-40c757d48b5fcdf0c217ae6392fb111b1a4acc91.tar.gz hdf5-40c757d48b5fcdf0c217ae6392fb111b1a4acc91.tar.bz2 |
[svn-r18619] Description:
Bring r18618 from trunk to 1.8 branch:
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
(h5committested on trunk)
Diffstat (limited to 'src/H5O.c')
-rw-r--r-- | src/H5O.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -1970,10 +1970,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; @@ -1986,7 +1986,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 */ @@ -2093,8 +2093,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) @@ -2102,7 +2102,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; |