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