Lines Matching refs:victim
755 cache_ptr victim; in cache_set() local
783 victim = uc->uc_fifo[uc->uc_nextvictim]; in cache_set()
784 if (victim != NULL) { in cache_set()
786 loc = CACHE_LOC(parent, victim->cache_xid); in cache_set()
788 *vicp != NULL && *vicp != victim; in cache_set()
796 *vicp = victim->cache_next; /* remove from cache */ in cache_set()
797 newbuf = victim->cache_reply; in cache_set()
799 victim = malloc(sizeof (struct cache_node)); in cache_set()
800 if (victim == NULL) { in cache_set()
808 free(victim); in cache_set()
832 free(victim); in cache_set()
838 victim->cache_replylen = replylen; in cache_set()
839 victim->cache_reply = rpc_buffer(xprt); in cache_set()
844 victim->cache_xid = su->su_xid; 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()
848 victim->cache_addr = xprt->xp_rtaddr; in cache_set()
849 victim->cache_addr.buf = newbuf2; in cache_set()
850 (void) memcpy(victim->cache_addr.buf, xprt->xp_rtaddr.buf, in cache_set()
853 loc = CACHE_LOC(parent, victim->cache_xid); 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()