ns-allinone-2.35/ns-2.35/common/scheduler.cc
void 
ListScheduler::cancel(Event* e)
{
	Event** p;
	if (e->uid_ <= 0)	// event not in queue
		return;
	for (p = &queue_; *p != e; p = &(*p)->next_)
		if (*p == 0)
			abort();

	*p = (*p)->next_;
	e->uid_ = - e->uid_;
}
/*
 * Cancel an event.  It is an error to call this routine
 * when the event is not actually in the queue.  The caller
 * must free the event if necessary; this routine only removes
 * it from the scheduler queue.
 */
Cancel an event.  It is an error to call this routine
when the event is not actually in the queue.  The caller
must free the event if necessary; this routine only removes
it from the scheduler queue.
Cancel an event . It is an error to call this routine when the event is not actually in the queue . The caller must free the event if necessary ; this routine only removes it from the scheduler queue .
void 
ListScheduler::cancel(Event* e)
{
	Event** p;
	if (e->uid_ <= 0)	
		return;
	for (p = &queue_; *p != e; p = &(*p)->next_)
		if (*p == 0)
			abort();
	*p = (*p)->next_;
	e->uid_ = - e->uid_;
}
void ListScheduler :: cancel ( Event * e ) { Event * * p ; if ( e -> uid_ <= 0 ) return ; for ( p = & queue_ ; * p != e ; p = & ( * p ) -> next_ ) if ( * p == 0 ) abort ( ) ; * p = ( * p ) -> next_ ; e -> uid_ = - e -> uid_ ; }
Cancel an event.
Cancel an event .
// event not in queue