projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b77ca57
)
cpu: fix bug when TrafficGen deschedules event
author
Xiangyu Dong
<rioshering@gmail.com>
Thu, 30 Jan 2014 04:35:04 +0000
(22:35 -0600)
committer
Xiangyu Dong
<rioshering@gmail.com>
Thu, 30 Jan 2014 04:35:04 +0000
(22:35 -0600)
Committed by: Nilay Vaish <nilay@cs.wisc.edu>
src/cpu/testers/traffic_gen/traffic_gen.cc
patch
|
blob
|
history
diff --git
a/src/cpu/testers/traffic_gen/traffic_gen.cc
b/src/cpu/testers/traffic_gen/traffic_gen.cc
index 0f006e67e8d4bf560cfd1ee11d18ce3351c81b8d..b7f1ecd4ee0c604d978fed0104d9b9281d185f2c 100644
(file)
--- a/
src/cpu/testers/traffic_gen/traffic_gen.cc
+++ b/
src/cpu/testers/traffic_gen/traffic_gen.cc
@@
-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;