ns-allinone-2.35/queue/fq.cc
int FQ::update()
{
	int nactive = 0;
	for (int i = 0; i <= maxflow_; ++i) {
		Queue* q = fs_[i].q_;
		if (q != 0) {
			if (fs_[i].hol_ == 0) {
				Packet* p = q->deque();
				if (p != 0) {
					fs_[i].hol_ = p;
					++nactive;
				}
			} else
				++nactive;
		}
	}
	return (nactive);
}
/*XXX this is quite inefficient.*/
XXX this is quite inefficient.
XXX this is quite inefficient .
int FQ::update()
{
	int nactive = 0;
	for (int i = 0; i <= maxflow_; ++i) {
		Queue* q = fs_[i].q_;
		if (q != 0) {
			if (fs_[i].hol_ == 0) {
				Packet* p = q->deque();
				if (p != 0) {
					fs_[i].hol_ = p;
					++nactive;
				}
			} else
				++nactive;
		}
	}
	return (nactive);
}
int FQ :: update ( ) { int nactive = 0 ; for ( int i = 0 ; i <= maxflow_ ; ++ i ) { Queue * q = fs_ [ i ] . q_ ; if ( q != 0 ) { if ( fs_ [ i ] . hol_ == 0 ) { Packet * p = q -> deque ( ) ; if ( p != 0 ) { fs_ [ i ] . hol_ = p ; ++ nactive ; } } else ++ nactive ; } } return ( nactive ) ; }
XXX this is quite inefficient.
XXX this is quite inefficient .