Lines Matching refs:uc

691 	struct cl_cache *uc;  in svc_dg_enablecache()  local
709 uc = malloc(sizeof (struct cl_cache)); in svc_dg_enablecache()
710 if (uc == NULL) { in svc_dg_enablecache()
716 uc->uc_size = size; in svc_dg_enablecache()
717 uc->uc_nextvictim = 0; in svc_dg_enablecache()
718 uc->uc_entries = calloc(size * SPARSENESS, sizeof (cache_ptr)); in svc_dg_enablecache()
719 if (uc->uc_entries == NULL) { in svc_dg_enablecache()
721 free(uc); in svc_dg_enablecache()
725 uc->uc_fifo = calloc(size, sizeof (cache_ptr)); in svc_dg_enablecache()
726 if (uc->uc_fifo == NULL) { in svc_dg_enablecache()
728 free(uc->uc_entries); in svc_dg_enablecache()
729 free(uc); in svc_dg_enablecache()
733 su->su_cache = (char *)uc; in svc_dg_enablecache()
758 struct cl_cache *uc; in cache_set() local
776 uc = (struct cl_cache *)get_svc_dg_data(parent)->su_cache; in cache_set()
783 victim = uc->uc_fifo[uc->uc_nextvictim]; in cache_set()
787 for (vicp = &uc->uc_entries[loc]; in cache_set()
824 su->su_xid, uc->uc_prog, uc->uc_vers, uc->uc_proc, uaddr); in cache_set()
845 victim->cache_proc = uc->uc_proc; in cache_set()
846 victim->cache_vers = uc->uc_vers; in cache_set()
847 victim->cache_prog = uc->uc_prog; in cache_set()
854 victim->cache_next = uc->uc_entries[loc]; in cache_set()
855 uc->uc_entries[loc] = victim; in cache_set()
856 uc->uc_fifo[uc->uc_nextvictim++] = victim; in cache_set()
857 uc->uc_nextvictim %= uc->uc_size; in cache_set()
873 struct cl_cache *uc; in cache_get() local
888 uc = (struct cl_cache *)get_svc_dg_data(parent)->su_cache; in cache_get()
893 for (ent = uc->uc_entries[loc]; ent != NULL; ent = ent->cache_next) { in cache_get()
923 uc->uc_proc = msg->rm_call.cb_proc; in cache_get()
924 uc->uc_vers = msg->rm_call.cb_vers; in cache_get()
925 uc->uc_prog = msg->rm_call.cb_prog; in cache_get()