diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2007-12-06 19:24:30 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2007-12-06 19:24:30 (GMT) |
commit | 74c005fdb21644607cd93b3c2dd9098d9cc7e7c5 (patch) | |
tree | e1c2dc64d2fbf66c17e9c67a8cd41b1a81e83ffe /src/H5Omessage.c | |
parent | 110a7d4869b546f5b73ba726f749870e7cd04674 (diff) | |
download | hdf5-74c005fdb21644607cd93b3c2dd9098d9cc7e7c5.zip hdf5-74c005fdb21644607cd93b3c2dd9098d9cc7e7c5.tar.gz hdf5-74c005fdb21644607cd93b3c2dd9098d9cc7e7c5.tar.bz2 |
[svn-r14326] Description:
- Keep skip list for tracking chunks with dataset (instead of creating/
destroying it for each I/O operation) and just delete the skip list
nodes.
- Avoid computations for normalizing selection offset when offset not set.
- Avoid updating object modification time twice during dataset creation.
- Avoid updating dataset layout message (and object modification time)
until dataset is closed.
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
Mac OS X/32 10.4.10 (amazon) in debug 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.c | 57 |
1 files changed, 52 insertions, 5 deletions
diff --git a/src/H5Omessage.c b/src/H5Omessage.c index 799f267..3130066 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. |