summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/H5Omessage.c24
-rw-r--r--src/H5Tcommit.c4
2 files changed, 16 insertions, 12 deletions
diff --git a/src/H5Omessage.c b/src/H5Omessage.c
index c7979d4..79631fe 100644
--- a/src/H5Omessage.c
+++ b/src/H5Omessage.c
@@ -215,11 +215,13 @@ H5O_msg_append(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned type_id,
HDassert(oh_flags_ptr);
/* Should this message be written as a SOHM? */
- if((shared_mesg = H5SM_try_share(f, dxpl_id, type_id, mesg)) > 0)
- /* Mark the message as shared */
- mesg_flags |= H5O_MSG_FLAG_SHARED;
- else if(shared_mesg < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "error determining if message should be shared")
+ if(!(mesg_flags & H5O_MSG_FLAG_DONTSHARE)) {
+ if((shared_mesg = H5SM_try_share(f, dxpl_id, type_id, mesg)) > 0)
+ /* Mark the message as shared */
+ mesg_flags |= H5O_MSG_FLAG_SHARED;
+ else if(shared_mesg < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "error determining if message should be shared")
+ } /* end if */
/* Append new message to object header */
if(H5O_msg_append_real(f, dxpl_id, oh, type, mesg_flags, update_flags, mesg, oh_flags_ptr) < 0)
@@ -335,11 +337,13 @@ H5O_msg_write(H5O_loc_t *loc, unsigned type_id, unsigned overwrite,
HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "no write intent on file")
/* Should this message be written as a SOHM? */
- if((shared_mesg = H5SM_try_share(loc->file, dxpl_id, type_id, mesg)) > 0)
- /* Mark the message as shared */
- mesg_flags |= H5O_MSG_FLAG_SHARED;
- else if(shared_mesg < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, FAIL, "error while trying to share message")
+ if(!(mesg_flags & H5O_MSG_FLAG_DONTSHARE)) {
+ if((shared_mesg = H5SM_try_share(loc->file, dxpl_id, type_id, mesg)) > 0)
+ /* Mark the message as shared */
+ mesg_flags |= H5O_MSG_FLAG_SHARED;
+ else if(shared_mesg < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, FAIL, "error while trying to share message")
+ } /* end if */
/* Protect the object header */
if(NULL == (oh = H5AC_protect(loc->file, dxpl_id, H5AC_OHDR, loc->addr, NULL, NULL, H5AC_WRITE)))
diff --git a/src/H5Tcommit.c b/src/H5Tcommit.c
index 6ed7856..d8fbe3b 100644
--- a/src/H5Tcommit.c
+++ b/src/H5Tcommit.c
@@ -304,7 +304,7 @@ H5T_commit(H5F_t *file, H5T_t *type, hid_t dxpl_id, hid_t tcpl_id, hid_t UNUSED
/* Mark datatype as being on memory now. Since this datatype may still be used in memory
* after committed to disk, change its size back as in memory. */
- if(H5T_set_loc(type, NULL, H5T_LOC_MEMORY)<0)
+ if(H5T_set_loc(type, NULL, H5T_LOC_MEMORY) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "cannot mark datatype in memory")
done:
@@ -783,7 +783,7 @@ H5T_open_oid(H5G_loc_t *loc, hid_t dxpl_id)
H5T_t *dt = NULL;
H5T_t *ret_value;
- FUNC_ENTER_NOAPI(H5T_open_oid, NULL)
+ FUNC_ENTER_NOAPI_NOINIT(H5T_open_oid)
HDassert(loc);