cpu: fix bug when TrafficGen deschedules event

Committed by: Nilay Vaish <nilay@cs.wisc.edu>
This commit is contained in:
Xiangyu Dong 2014-01-29 22:35:04 -06:00
parent b77ca57f8c
commit 32cc2ea8b9

View file

@ -119,6 +119,11 @@ TrafficGen::initState()
unsigned int
TrafficGen::drain(DrainManager *dm)
{
if (!updateEvent.scheduled()) {
// no event has been scheduled yet (e.g. switched from atomic mode)
return 0;
}
if (retryPkt == NULL) {
// shut things down
nextPacketTick = MaxTick;