cpu: fix bug when TrafficGen deschedules event
Committed by: Nilay Vaish <nilay@cs.wisc.edu>
This commit is contained in:
parent
b77ca57f8c
commit
32cc2ea8b9
1 changed files with 5 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue