Lines Matching defs:victim
496 u_int uc_nextvictim; /* points to next victim in fifo list */
569 static const char cache_set_err1[] = "victim not found";
570 static const char cache_set_err2[] = "victim alloc failed";
576 cache_ptr victim;
592 victim = uc->uc_fifo[uc->uc_nextvictim];
593 if (victim != NULL) {
594 loc = CACHE_LOC(xprt, victim->cache_xid);
596 *vicp != NULL && *vicp != victim;
604 *vicp = victim->cache_next; /* remove from cache */
605 newbuf = victim->cache_reply;
607 victim = ALLOC(struct cache_node, 1);
608 if (victim == NULL) {
616 FREE(victim, struct cache_node, 1);
636 victim->cache_replylen = replylen;
637 victim->cache_reply = rpc_buffer(xprt);
641 victim->cache_xid = su->su_xid;
642 victim->cache_proc = uc->uc_proc;
643 victim->cache_vers = uc->uc_vers;
644 victim->cache_prog = uc->uc_prog;
645 victim->cache_addr = xprt->xp_rtaddr;
646 victim->cache_addr.buf = ALLOC(char, xprt->xp_rtaddr.len);
647 (void) memcpy(victim->cache_addr.buf, xprt->xp_rtaddr.buf,
649 loc = CACHE_LOC(xprt, victim->cache_xid);
650 victim->cache_next = uc->uc_entries[loc];
651 uc->uc_entries[loc] = victim;
652 uc->uc_fifo[uc->uc_nextvictim++] = victim;