cache_t
static cache_t *imc;
imc = (cache_t *)calloc(sizeof (cache_t), 1);
static cache_t *cache_create();
static int cache_insert(cache_t *, struct mnttab *);
cache_lookup(cache_t *cache, char *rsrc)
static int cache_sync(rcm_handle_t *, cache_t **);
static hashentry_t *cache_lookup(cache_t *, char *);
static void free_cache(cache_t **);
static cache_t *mnt_cache;
static cache_t *
cache_t *cache;
if ((cache = (cache_t *)calloc(1, sizeof (cache_t))) == NULL) {
free_cache(cache_t **cachep)
cache_sync(rcm_handle_t *hd, cache_t **cachep)
cache_t *new_cache;
cache_t *old_cache;
cache_insert(cache_t *cache, struct mnttab *mt)
cache_t *thiscache, *hintcache;
thiscache = (cache_t *)morecore(thisrequest * HUNKSIZE);
if (thiscache == (cache_t *)-1) {
static void create_cache(cache_t *, size_t bufsize, uint_t hunks);
static void reinit_cache(cache_t *);
cache_t *thiscache;
cache_t *thiscache;
cache_t *cacheptr;
cacheptr = (cache_t *)*(uintptr_t *)mem;
cacheptr = (cache_t *)*(uintptr_t *)mem;
cache_t *cacheptr;
cacheptr = (cache_t *)*(uintptr_t *)mem;
create_cache(cache_t *cp, size_t size, uint_t chunksize)
cp->mt_freelist = ((caddr_t)cp + sizeof (cache_t));
cp->mt_span = chunksize * HUNKSIZE - sizeof (cache_t);
cache_t *thiscache;
reinit_cache(cache_t *thiscache)
cache_t *mt_cache;
cache_t *mt_hint;
cache_t *cache = NULL;
if ((cache = (cache_t *)calloc(1, sizeof (*cache))) == NULL)
cache_free(cache_t *item)
cache_t *cache; /* printer/job cache */
cap->link[Prev] = (cache_t *)chp->aged;
static cache_t *
cache_t *cap, *cxp;
cache_t *cpp = (cache_t *)chp;
while ((cap = cpp->link[Prev]) != (cache_t *)chp) {
static cache_t *
set_cache(cache_t **ccp, head_t *chp, int noreclaim)
cache_t *cap;
(cap = (cache_t *)bkmem_alloc(chp->size))) {
cap->link[Prev] = (cache_t *)chp;
cache_t ic_hdr; /* .. Standard header */
cmp_icache(cache_t *p)
static cache_t *ic_hash[IC_MAX_HDRS];
cache_t *icp;
cache_t dc_hdr; /* .. Standard header */
cmp_dcache(cache_t *p) /* Cache Search predicate: */
static cache_t *dc_hash[DC_MAX_HDRS];
cache_t bc_hdr; /* .. Standard header */
cmp_bcache(cache_t *p) /* Cache Search predicate: */
static cache_t *bc_hash[BC_MAX_HDRS];
cache_t *bcp;
cache_t *aged[2]; /* .. LRU list */
int (*cmp)(cache_t *); /* .. Ptr to comparison function */
{{(cache_t *)&h, (cache_t *)&h}, f, sizeof (t), n}
static cache_t *
get_cache(cache_t *cap, head_t *chp)