ns-allinone-2.35/queue/cbq.cc
int
CBQueue::eligible_formal(CBQClass *cl, double now)
{
	int level;
	CBQClass *p;

	// check from leaf level to (cl->level - 1)
	for (level = LEAF_LEVEL; level < cl->level_; level++) {
		p = levels_[level];
		while (p != NULL) {
			if (!p->satisfied(now))
				return (0);
			p = p->level_peer_;
		}
	}
	return (1);
}
/*
 * rule #2 for formal link-sharing
 *	class must have no unsatisfied classes below it
 */
rule #2 for formal link-sharing
class must have no unsatisfied classes below it
rule #2 for formal link - sharing class must have no unsatisfied classes below it
int
CBQueue::eligible_formal(CBQClass *cl, double now)
{
	int level;
	CBQClass *p;
	for (level = LEAF_LEVEL; level < cl->level_; level++) {
		p = levels_[level];
		while (p != NULL) {
			if (!p->satisfied(now))
				return (0);
			p = p->level_peer_;
		}
	}
	return (1);
}
int CBQueue :: eligible_formal ( CBQClass * cl , double now ) { int level ; CBQClass * p ; for ( level = LEAF_LEVEL ; level < cl -> level_ ; level ++ ) { p = levels_ [ level ] ; while ( p != NULL ) { if ( ! p -> satisfied ( now ) ) return ( 0 ) ; p = p -> level_peer_ ; } } return ( 1 ) ; }
rule #2 for formal link-sharing
      class must have no unsatisfied classes below it
rule #2 for formal link - sharing class must have no unsatisfied classes below it
// check from leaf level to (cl->level - 1)