FreeBSD/sys/netpfil/ipfw/dn_sched_rr.c
/* Remove a queue from circular list.
 * XXX see if ti can be merge with remove_queue()
 */
Remove a queue from circular list.
XXX see if ti can be merge with remove_queue()
Remove a queue from circular list . XXX see if ti can be merge with remove_queue ()
static inline void
remove_queue_q(struct rr_queue *q, struct rr_si *si)
{
	struct rr_queue *prev;
	if (q->status != 1)
		return;
	if (q == si->head) {
		rr_remove_head(si);
		return;
	}
	for (prev = si->head; prev; prev = prev->qnext) {
		if (prev->qnext != q)
			continue;
		prev->qnext = q->qnext;
		if (q == si->tail)
			si->tail = prev;
		q->status = 0;
		break;
	}
}
static inline void remove_queue_q ( struct rr_queue * q , struct rr_si * si ) { struct rr_queue * prev ; if ( q -> status != 1 ) return ; if ( q == si -> head ) { rr_remove_head ( si ) ; return ; } for ( prev = si -> head ; prev ; prev = prev -> qnext ) { if ( prev -> qnext != q ) continue ; prev -> qnext = q -> qnext ; if ( q == si -> tail ) si -> tail = prev ; q -> status = 0 ; break ; } }
Remove a queue from circular list.
Remove a queue from circular list .