diff options
author | Robb Matzke <matzke@llnl.gov> | 1998-01-22 16:41:32 (GMT) |
---|---|---|
committer | Robb Matzke <matzke@llnl.gov> | 1998-01-22 16:41:32 (GMT) |
commit | a0ee2c57e934c5ff2269e345238a6ee019f6c294 (patch) | |
tree | 08a553617329401737ddff6af60ccd11a13cc6a3 /src/H5ACprivate.h | |
parent | fdfb6dfd26410b931b4452f832b5a4aedec283e0 (diff) | |
download | hdf5-a0ee2c57e934c5ff2269e345238a6ee019f6c294.zip hdf5-a0ee2c57e934c5ff2269e345238a6ee019f6c294.tar.gz hdf5-a0ee2c57e934c5ff2269e345238a6ee019f6c294.tar.bz2 |
[svn-r164] Changes since 19980122
----------------------
./src/*.h
Fixed indentation where indent(1) screwed up. This isn't by
any means the final say, but it's better than it was.
./src/H5A.c
./src/H5Aprivate.h
./src/H5Apublic.h
./src/H5C.c
./src/H5D.c
./src/H5E.c
./src/H5F.c
./src/H5G.c
./src/H5M.c
./src/H5P.c
./src/H5T.c
./src/H5Tconv.c
./src/debug.c
./test/dtypes.c
./test/istore.c
./test/theap.c
./test/tohdr.c
./test/tstab.c
Removed some atom functions from the API and made them
library-scope. Also changed some names by removing the
redundant `atom' from the name and by adding a `_' after the
`H5A'.
Diffstat (limited to 'src/H5ACprivate.h')
-rw-r--r-- | src/H5ACprivate.h | 95 |
1 files changed, 47 insertions, 48 deletions
diff --git a/src/H5ACprivate.h b/src/H5ACprivate.h index 2b4abe5..ba5be6d 100644 --- a/src/H5ACprivate.h +++ b/src/H5ACprivate.h @@ -11,13 +11,14 @@ * Purpose: Constants and typedefs available to the rest of the * library. * - * Modifications: + * Modifications: * *------------------------------------------------------------------------- */ #ifndef _H5ACprivate_H #define _H5ACprivate_H -#include <H5ACpublic.h> /*public prototypes */ + +#include <H5ACpublic.h> /*public prototypes */ /* Pivate headers needed by this header */ #include <H5private.h> @@ -49,19 +50,19 @@ * by the LOAD method if the DEST argument is non-zero. */ typedef enum H5AC_subid_t { - H5AC_BT_ID = 0, /*B-tree nodes */ - H5AC_SNODE_ID = 1, /*symbol table nodes */ - H5AC_HEAP_ID = 2, /*object or name heap */ - H5AC_OHDR_ID = 3, /*object header */ - H5AC_NTYPES = 4 /*THIS MUST BE LAST! */ + H5AC_BT_ID = 0, /*B-tree nodes */ + H5AC_SNODE_ID = 1, /*symbol table nodes */ + H5AC_HEAP_ID = 2, /*object or name heap */ + H5AC_OHDR_ID = 3, /*object header */ + H5AC_NTYPES = 4 /*THIS MUST BE LAST! */ } H5AC_subid_t; typedef struct H5AC_class_t { - H5AC_subid_t id; - void *(*load) (H5F_t *, const haddr_t *addr, - const void *udata1, void *udata2); - herr_t (*flush) (H5F_t *, hbool_t dest, - const haddr_t *addr, void *thing); + H5AC_subid_t id; + void *(*load)(H5F_t *, const haddr_t *addr, + const void *udata1, void *udata2); + herr_t (*flush)(H5F_t *, hbool_t dest, + const haddr_t *addr, void *thing); } H5AC_class_t; /* @@ -69,58 +70,56 @@ typedef struct H5AC_class_t { * cache entry by hashing the object's file address. Each file has its * own cache, an array of slots. */ -#define H5AC_NSLOTS 10330 /*prime number tend to work best */ +#define H5AC_NSLOTS 10330 /*prime number tend to work best */ #define H5AC_HASH(F,ADDR_P) H5F_addr_hash(ADDR_P,(F)->shared->cache->nslots) typedef struct H5AC_prot_t { - const H5AC_class_t *type; /*type of protected thing */ - haddr_t addr; /*address of protected thing */ - void *thing; /*(possible) protected thing */ + const H5AC_class_t *type; /*type of protected thing */ + haddr_t addr; /*address of protected thing */ + void *thing; /*(possible) protected thing */ } H5AC_prot_t; typedef struct H5AC_slot_t { - const H5AC_class_t *type; /*type of object stored here */ - haddr_t addr; /*file address for object */ - void *thing; /*the thing which is cached */ + const H5AC_class_t *type; /*type of object stored here */ + haddr_t addr; /*file address for object */ + void *thing; /*the thing which is cached */ #ifdef H5AC_DEBUG - intn nprots; /*number of things protected */ - intn aprots; /*nelmts of `prot' array */ - H5AC_prot_t *prot; /*array of protected things */ + intn nprots; /*number of things protected */ + intn aprots; /*nelmts of `prot' array */ + H5AC_prot_t *prot; /*array of protected things */ #endif } H5AC_slot_t; typedef struct H5AC_t { - intn nslots; /*number of cache slots */ - H5AC_slot_t *slot; /*the cache slots */ - intn nprots; /*number of protected objects */ + intn nslots; /*number of cache slots */ + H5AC_slot_t *slot; /*the cache slots */ + intn nprots; /*number of protected objects */ struct { - uintn nhits; /*number of cache hits */ - uintn nmisses;/*number of cache misses */ - uintn ninits; /*number of cache inits */ - uintn nflushes;/*number of flushes to disk */ - } diagnostics[H5AC_NTYPES]; /*diagnostics for each type of object */ + uintn nhits; /*number of cache hits */ + uintn nmisses; /*number of cache misses */ + uintn ninits; /*number of cache inits */ + uintn nflushes; /*number of flushes to disk */ + } diagnostics[H5AC_NTYPES]; /*diagnostics for each type of object*/ } H5AC_t; /* * Library prototypes. */ -herr_t H5AC_dest(H5F_t *f); -void *H5AC_find_f(H5F_t *f, const H5AC_class_t *type, - const haddr_t *addr, const void *udata1, - void *udata2); -void *H5AC_protect(H5F_t *f, const H5AC_class_t *type, - const haddr_t *addr, const void *udata1, - void *udata2); -herr_t H5AC_unprotect(H5F_t *f, const H5AC_class_t *type, - const haddr_t *addr, void *thing); -herr_t H5AC_flush(H5F_t *f, const H5AC_class_t *type, const haddr_t *addr, - hbool_t destroy); -herr_t H5AC_create(H5F_t *f, intn size_hint); -herr_t H5AC_rename(H5F_t *f, const H5AC_class_t *type, - const haddr_t *old_addr, const haddr_t *new_addr); -herr_t H5AC_set(H5F_t *f, const H5AC_class_t *type, const haddr_t *addr, - void *thing); -herr_t H5AC_debug(H5F_t *f); +herr_t H5AC_dest (H5F_t *f); +void *H5AC_find_f (H5F_t *f, const H5AC_class_t *type, const haddr_t *addr, + const void *udata1, void *udata2); +void *H5AC_protect (H5F_t *f, const H5AC_class_t *type, const haddr_t *addr, + const void *udata1, void *udata2); +herr_t H5AC_unprotect (H5F_t *f, const H5AC_class_t *type, + const haddr_t *addr, void *thing); +herr_t H5AC_flush (H5F_t *f, const H5AC_class_t *type, const haddr_t *addr, + hbool_t destroy); +herr_t H5AC_create (H5F_t *f, intn size_hint); +herr_t H5AC_rename (H5F_t *f, const H5AC_class_t *type, + const haddr_t *old_addr, const haddr_t *new_addr); +herr_t H5AC_set (H5F_t *f, const H5AC_class_t *type, const haddr_t *addr, + void *thing); +herr_t H5AC_debug (H5F_t *f); #define H5AC_find(F,TYPE,ADDR_P,UDATA1,UDATA2) \ (((F)->shared->cache->slot[H5AC_HASH(F,ADDR_P)].type==(TYPE) && \ @@ -129,5 +128,5 @@ herr_t H5AC_debug(H5F_t *f); ((F)->shared->cache->diagnostics[(TYPE)->id].nhits++, \ (F)->shared->cache->slot[H5AC_HASH(F,ADDR_P)].thing) : \ H5AC_find_f (F, TYPE, ADDR_P, UDATA1, UDATA2)) - + #endif /* !_H5ACprivate_H */ |