summaryrefslogtreecommitdiffstats
path: root/src/H5Omessage.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2008-06-16 22:17:29 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2008-06-16 22:17:29 (GMT)
commitdb2c4c497abab139485dbf6797e56b1340e4577d (patch)
treef7dfb321a3643658ed24aaf776ec4c1e48bc76a3 /src/H5Omessage.c
parent55af47c47c3c0c7bc17266968f5e0e782189e819 (diff)
downloadhdf5-db2c4c497abab139485dbf6797e56b1340e4577d.zip
hdf5-db2c4c497abab139485dbf6797e56b1340e4577d.tar.gz
hdf5-db2c4c497abab139485dbf6797e56b1340e4577d.tar.bz2
[svn-r15221] Description:
Bring changes from trunk from the time the branch was created (r14280) up to the 1.8.0 release (r14525) back into the metadata journaling branch. Tested on: FreeBSD/32 6.2 (duty) in debug mode FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, 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.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
Diffstat (limited to 'src/H5Omessage.c')
-rw-r--r--src/H5Omessage.c57
1 files changed, 52 insertions, 5 deletions
diff --git a/src/H5Omessage.c b/src/H5Omessage.c
index b3d94d9..29a7e79 100644
--- a/src/H5Omessage.c
+++ b/src/H5Omessage.c
@@ -136,7 +136,7 @@ H5O_msg_create(const H5O_loc_t *loc, unsigned type_id, unsigned mesg_flags,
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "unable to load object header")
/* Go append message to object header */
- if(H5O_msg_append(loc->file, dxpl_id, oh, type_id, mesg_flags, update_flags, mesg) < 0)
+ if(H5O_msg_append_oh(loc->file, dxpl_id, oh, type_id, mesg_flags, update_flags, mesg) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "unable to append to object header")
done:
@@ -148,7 +148,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5O_msg_append
+ * Function: H5O_msg_append_oh
*
* Purpose: Simplified version of H5O_msg_create, used when creating a new
* object header message (usually during object creation) and
@@ -165,13 +165,13 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5O_msg_append(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned type_id,
+H5O_msg_append_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned type_id,
unsigned mesg_flags, unsigned update_flags, void *mesg)
{
const H5O_msg_class_t *type; /* Original H5O class type for the ID */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_msg_append, FAIL)
+ FUNC_ENTER_NOAPI(H5O_msg_append_oh, FAIL)
/* check args */
HDassert(f);
@@ -189,7 +189,7 @@ H5O_msg_append(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned type_id,
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_msg_append() */
+} /* end H5O_msg_append_oh() */
/*-------------------------------------------------------------------------
@@ -301,6 +301,53 @@ done:
/*-------------------------------------------------------------------------
+ * Function: H5O_msg_write_oh
+ *
+ * Purpose: Modifies an existing message or creates a new message.
+ *
+ * The UPDATE_FLAGS argument are flags that allow the caller
+ * to skip updating the modification time or reseting the message
+ * data. This is useful when several calls to H5O_msg_write will be
+ * made in a sequence.
+ *
+ * Return: Success: Non-negative
+ * Failure: Negative
+ *
+ * Programmer: Quincey Koziol
+ * koziol@hdfgroup.org
+ * Dec 6 2007
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5O_msg_write_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned type_id,
+ unsigned mesg_flags, unsigned update_flags, void *mesg)
+{
+ const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI(H5O_msg_write_oh, FAIL)
+
+ /* check args */
+ HDassert(f);
+ HDassert(oh);
+ HDassert(H5O_ATTR_ID != type_id); /* Attributes are modified in another routine */
+ HDassert(type_id < NELMTS(H5O_msg_class_g));
+ type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
+ HDassert(type);
+ HDassert(mesg);
+ HDassert(0 == (mesg_flags & ~H5O_MSG_FLAG_BITS));
+
+ /* Call the "real" modify routine */
+ if(H5O_msg_write_real(f, dxpl_id, oh, type, mesg_flags, update_flags, mesg) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "unable to write object header message")
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5O_msg_write_oh() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5O_msg_write_real
*
* Purpose: Modifies an existing message or creates a new message.