summaryrefslogtreecommitdiffstats
path: root/src/H5Oalloc.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-02-26 18:18:08 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-02-26 18:18:08 (GMT)
commite0ae782d2790610af17d11e30a5bd32a9bac7704 (patch)
tree76872927acdc98bc543184db2393bcc0dc80b40a /src/H5Oalloc.c
parent3ea2c632d50870966320bc13d716959745d1e7dd (diff)
downloadhdf5-e0ae782d2790610af17d11e30a5bd32a9bac7704.zip
hdf5-e0ae782d2790610af17d11e30a5bd32a9bac7704.tar.gz
hdf5-e0ae782d2790610af17d11e30a5bd32a9bac7704.tar.bz2
[svn-r13390] Description:
Make H5O_protect/H5O_unprotect use pinned cache entries instead of protected entries (allowing the object header routines to be semi-reentrant). Tested on: FreeBSD 6.2 (duty)
Diffstat (limited to 'src/H5Oalloc.c')
-rw-r--r--src/H5Oalloc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/H5Oalloc.c b/src/H5Oalloc.c
index 64aa0f7..555c7b0 100644
--- a/src/H5Oalloc.c
+++ b/src/H5Oalloc.c
@@ -840,7 +840,7 @@ done:
*/
unsigned
H5O_alloc(H5F_t *f, hid_t dxpl_id, H5O_t *oh, const H5O_msg_class_t *type,
- const void *mesg, unsigned * oh_flags_ptr)
+ const void *mesg)
{
size_t raw_size; /* Raw size of message */
size_t aligned_size; /* Size of message including alignment */
@@ -853,7 +853,6 @@ H5O_alloc(H5F_t *f, hid_t dxpl_id, H5O_t *oh, const H5O_msg_class_t *type,
HDassert(oh);
HDassert(type);
HDassert(mesg);
- HDassert(oh_flags_ptr);
/* Compute the size needed to store the message in the object header */
if((raw_size = (type->raw_size)(f, FALSE, mesg)) >= H5O_MESG_MAX_SIZE)
@@ -901,8 +900,9 @@ H5O_alloc(H5F_t *f, hid_t dxpl_id, H5O_t *oh, const H5O_msg_class_t *type,
if(H5O_alloc_null(oh, idx, type, NULL, aligned_size) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, UFAIL, "can't split null message")
- /* Mark the object header as modified */
- *oh_flags_ptr |= H5AC__DIRTIED_FLAG;
+ /* Mark object header as dirty in cache */
+ if(H5AC_mark_pinned_or_protected_entry_dirty(f, oh) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTMARKDIRTY, UFAIL, "unable to mark object header as dirty")
/* Set return value */
ret_value = idx;