diff options
author | Robb Matzke <matzke@llnl.gov> | 1997-09-19 16:36:59 (GMT) |
---|---|---|
committer | Robb Matzke <matzke@llnl.gov> | 1997-09-19 16:36:59 (GMT) |
commit | 25d866e9b433142c38fa6c4c8d3cad5e00d46163 (patch) | |
tree | 8e68bab9cde1dd8f8e63b18d4b294093a1df9608 /src/H5AC.c | |
parent | 055daa52f0fe51423880551cd21b4b8c8d945130 (diff) | |
download | hdf5-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.c | 20 |
1 files changed, 11 insertions, 9 deletions
@@ -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; |