summaryrefslogtreecommitdiffstats
path: root/src/H5EAiblock.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5EAiblock.c')
-rw-r--r--src/H5EAiblock.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/H5EAiblock.c b/src/H5EAiblock.c
index 3c2894a..364b443 100644
--- a/src/H5EAiblock.c
+++ b/src/H5EAiblock.c
@@ -279,7 +279,7 @@ END_FUNC(PKG) /* end H5EA__iblock_create() */
*/
BEGIN_FUNC(PKG, ERR,
H5EA_iblock_t *, NULL, NULL,
-H5EA__iblock_protect(H5EA_hdr_t *hdr, hid_t dxpl_id, H5AC_protect_t rw))
+H5EA__iblock_protect(H5EA_hdr_t *hdr, hid_t dxpl_id, unsigned flags))
#ifdef QAK
HDfprintf(stderr, "%s: Called\n", FUNC);
@@ -288,8 +288,11 @@ HDfprintf(stderr, "%s: Called\n", FUNC);
/* Sanity check */
HDassert(hdr);
+ /* only the H5AC__READ_ONLY_FLAG may be set */
+ HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
+
/* Protect the index block */
- if(NULL == (ret_value = (H5EA_iblock_t *)H5AC_protect(hdr->f, dxpl_id, H5AC_EARRAY_IBLOCK, hdr->idx_blk_addr, hdr, rw)))
+ if(NULL == (ret_value = (H5EA_iblock_t *)H5AC_protect(hdr->f, dxpl_id, H5AC_EARRAY_IBLOCK, hdr->idx_blk_addr, hdr, flags)))
H5E_THROW(H5E_CANTPROTECT, "unable to protect extensible array index block, address = %llu", (unsigned long long)hdr->idx_blk_addr)
CATCH
@@ -361,7 +364,7 @@ HDfprintf(stderr, "%s: Called\n", FUNC);
HDassert(H5F_addr_defined(hdr->idx_blk_addr));
/* Protect index block */
- if(NULL == (iblock = H5EA__iblock_protect(hdr, dxpl_id, H5AC_WRITE)))
+ if(NULL == (iblock = H5EA__iblock_protect(hdr, dxpl_id, H5AC__NO_FLAGS_SET)))
H5E_THROW(H5E_CANTPROTECT, "unable to protect extensible array index block, address = %llu", (unsigned long long)hdr->idx_blk_addr)
/* Check for index block having data block pointers */
@@ -436,7 +439,6 @@ H5EA__iblock_dest(H5EA_iblock_t *iblock))
/* Sanity check */
HDassert(iblock);
- HDassert(iblock->rc == 0);
/* Check if shared header field has been initialized */
if(iblock->hdr) {