summaryrefslogtreecommitdiffstats
path: root/src/H5HL.c
diff options
context:
space:
mode:
authorBill Wendling <wendling@ncsa.uiuc.edu>2003-09-10 20:06:10 (GMT)
committerBill Wendling <wendling@ncsa.uiuc.edu>2003-09-10 20:06:10 (GMT)
commit1f5e8c2e63a4f3cf34d8f187adc24133caa2d25d (patch)
treef9a33f8b46169840102c80b62a53361ee5ce71d0 /src/H5HL.c
parent6a9188f0cb0ab63e858fee73c5261bbab4376c47 (diff)
downloadhdf5-1f5e8c2e63a4f3cf34d8f187adc24133caa2d25d.zip
hdf5-1f5e8c2e63a4f3cf34d8f187adc24133caa2d25d.tar.gz
hdf5-1f5e8c2e63a4f3cf34d8f187adc24133caa2d25d.tar.bz2
[svn-r7460] Purpose:
Update Description: Added extra parameter to the H5AC_protect() function that indicates if the cache being asked for is going to be written to or just read from. Those AC_protect calls that were H5AC_find calls are now read-only. The rest are writes. Platforms tested: Linux (h5committest not needed due to size and small impact) Misc. update:
Diffstat (limited to 'src/H5HL.c')
-rw-r--r--src/H5HL.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/H5HL.c b/src/H5HL.c
index 332adf4..ea08e47 100644
--- a/src/H5HL.c
+++ b/src/H5HL.c
@@ -629,7 +629,7 @@ H5HL_read(H5F_t *f, hid_t dxpl_id, haddr_t addr, size_t offset, size_t size, voi
assert(f);
assert (H5F_addr_defined(addr));
- if (NULL == (heap = H5AC_protect(f, dxpl_id, H5AC_LHEAP, addr, NULL, NULL)))
+ if (NULL == (heap = H5AC_protect(f, dxpl_id, H5AC_LHEAP, addr, NULL, NULL, H5AC_READ)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "unable to load heap");
assert(offset < heap->mem_alloc);
@@ -696,7 +696,7 @@ H5HL_peek(H5F_t *f, hid_t dxpl_id, haddr_t addr, size_t offset)
assert(f);
assert(H5F_addr_defined(addr));
- if (NULL == (heap = H5AC_protect(f, dxpl_id, H5AC_LHEAP, addr, NULL, NULL)))
+ if (NULL == (heap = H5AC_protect(f, dxpl_id, H5AC_LHEAP, addr, NULL, NULL, H5AC_READ)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "unable to load heap");
assert(offset < heap->mem_alloc);
@@ -784,7 +784,7 @@ H5HL_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, size_t buf_size, const void *
if (0==(f->intent & H5F_ACC_RDWR))
HGOTO_ERROR (H5E_HEAP, H5E_WRITEERROR, (size_t)(-1), "no write intent on file");
- if (NULL == (heap = H5AC_protect(f, dxpl_id, H5AC_LHEAP, addr, NULL, NULL)))
+ if (NULL == (heap = H5AC_protect(f, dxpl_id, H5AC_LHEAP, addr, NULL, NULL, H5AC_WRITE)))
HGOTO_ERROR(H5E_HEAP, H5E_PROTECT, (size_t)(-1), "unable to load heap");
++heap->cache_info.dirty;
@@ -954,7 +954,7 @@ H5HL_write(H5F_t *f, hid_t dxpl_id, haddr_t addr, size_t offset, size_t size, co
if (0==(f->intent & H5F_ACC_RDWR))
HGOTO_ERROR (H5E_HEAP, H5E_WRITEERROR, FAIL, "no write intent on file");
- if (NULL == (heap = H5AC_protect(f, dxpl_id, H5AC_LHEAP, addr, NULL, NULL)))
+ if (NULL == (heap = H5AC_protect(f, dxpl_id, H5AC_LHEAP, addr, NULL, NULL, H5AC_WRITE)))
HGOTO_ERROR(H5E_HEAP, H5E_PROTECT, FAIL, "unable to load heap");
assert(offset < heap->mem_alloc);
@@ -1019,7 +1019,7 @@ H5HL_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, size_t offset, size_t size)
size = H5HL_ALIGN (size);
- if (NULL == (heap = H5AC_protect(f, dxpl_id, H5AC_LHEAP, addr, NULL, NULL)))
+ if (NULL == (heap = H5AC_protect(f, dxpl_id, H5AC_LHEAP, addr, NULL, NULL, H5AC_WRITE)))
HGOTO_ERROR(H5E_HEAP, H5E_PROTECT, FAIL, "unable to load heap");
assert(offset < heap->mem_alloc);
@@ -1144,7 +1144,7 @@ H5HL_delete(H5F_t *f, hid_t dxpl_id, haddr_t addr)
sizeof_hdr= H5HL_SIZEOF_HDR(f);
/* Get heap pointer */
- if (NULL == (heap = H5AC_protect(f, dxpl_id, H5AC_LHEAP, addr, NULL, NULL)))
+ if (NULL == (heap = H5AC_protect(f, dxpl_id, H5AC_LHEAP, addr, NULL, NULL, H5AC_WRITE)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL, "unable to load heap");
/* Check if the heap is contiguous on disk */