summaryrefslogtreecommitdiffstats
path: root/src/H5AC.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1997-09-19 16:36:59 (GMT)
committerRobb Matzke <matzke@llnl.gov>1997-09-19 16:36:59 (GMT)
commit25d866e9b433142c38fa6c4c8d3cad5e00d46163 (patch)
tree8e68bab9cde1dd8f8e63b18d4b294093a1df9608 /src/H5AC.c
parent055daa52f0fe51423880551cd21b4b8c8d945130 (diff)
downloadhdf5-25d866e9b433142c38fa6c4c8d3cad5e00d46163.zip
hdf5-25d866e9b433142c38fa6c4c8d3cad5e00d46163.tar.gz
hdf5-25d866e9b433142c38fa6c4c8d3cad5e00d46163.tar.bz2
[svn-r100] Interim checkin for purify. Also contains H5G shadow stuff, changes
to int64 encode/decode to fix purify on 32-bit systems, changes to H5O_modify, changes to H5D.c to use H5F_open/close(), etc. Documentation will be mailed shortly...
Diffstat (limited to 'src/H5AC.c')
-rw-r--r--src/H5AC.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/H5AC.c b/src/H5AC.c
index 478923c..9dc49ed 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -173,7 +173,7 @@ H5AC_dest (hdf5_file_t *f)
*/
void *
H5AC_find_f (hdf5_file_t *f, const H5AC_class_t *type, haddr_t addr,
- const void *udata)
+ void *udata)
{
unsigned idx;
herr_t status;
@@ -298,9 +298,11 @@ H5AC_compare (const void *_a, const void *_b)
* Function: H5AC_flush
*
* Purpose: Flushes (and destroys if DESTROY is non-zero) the specified
- * entry from the cache. If the entry type is CACHE_FREE then
- * all types of entries are flushed. If the ADDR is zero then
- * all entries of the specified type are flushed.
+ * entry from the cache. If the entry TYPE is CACHE_FREE and
+ * ADDR is zero then all types of entries are flushed. If TYPE
+ * is CACHE_FREE and ADDR is non-zero, then whatever is cached
+ * at ADDR is flushed. Otherwise the thing at ADDR is flushed
+ * if it is the correct type.
*
* If there are protected objects they will not be flushed.
* However, an attempt will be made to flush all non-protected
@@ -334,7 +336,7 @@ H5AC_flush (hdf5_file_t *f, const H5AC_class_t *type, haddr_t addr,
assert (f->cache);
i = H5AC_HASH (f, addr);
- if (!type || 0==addr) {
+ if (0==addr) {
#ifdef SORT_BY_ADDR
/*
@@ -360,8 +362,7 @@ H5AC_flush (hdf5_file_t *f, const H5AC_class_t *type, haddr_t addr,
slot = f->cache->slot + i;
if (NULL==slot->type) continue;
#endif
- if ((!type || type==slot->type) &&
- (0==addr || addr==slot->addr)) {
+ if (!type || type==slot->type) {
flush = slot->type->flush;
status = (flush)(f, destroy, slot->addr, slot->thing);
if (status<0) {
@@ -373,7 +374,8 @@ H5AC_flush (hdf5_file_t *f, const H5AC_class_t *type, haddr_t addr,
}
map = H5MM_xfree (map);
- } else if (f->cache->slot[i].type==type && f->cache->slot[i].addr==addr) {
+ } else if ((!type || f->cache->slot[i].type==type) &&
+ f->cache->slot[i].addr==addr) {
/*
* Flush just this entry.
*/
@@ -583,7 +585,7 @@ H5AC_rename (hdf5_file_t *f, const H5AC_class_t *type,
*/
void *
H5AC_protect (hdf5_file_t *f, const H5AC_class_t *type, haddr_t addr,
- const void *udata)
+ void *udata)
{
int idx;
void *thing = NULL;