diff options
author | Tushar Krishna <tushar@csail.mit.edu> | 2010-03-21 21:22:21 -0700 |
---|---|---|
committer | Tushar Krishna <tushar@csail.mit.edu> | 2010-03-21 21:22:21 -0700 |
commit | 7c20d5511a7c22b360529f2f8452b7d4d5a9785d (patch) | |
tree | 2b70ee38429ab0f95021a29c32a68249486c541a /src/mem/ruby/eventqueue/RubyEventQueue.cc | |
parent | 103f5a2c94bcf84146d8b373890679a2d8816ae7 (diff) | |
download | gem5-7c20d5511a7c22b360529f2f8452b7d4d5a9785d.tar.xz |
ruby: Fix multiple wakeups in Ruby Eventqueue
Fix bug in Ruby Event queue to avoid multiple wakeups of same consumer in
same cycle
Diffstat (limited to 'src/mem/ruby/eventqueue/RubyEventQueue.cc')
-rw-r--r-- | src/mem/ruby/eventqueue/RubyEventQueue.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mem/ruby/eventqueue/RubyEventQueue.cc b/src/mem/ruby/eventqueue/RubyEventQueue.cc index c497f239a..3cfb52ff1 100644 --- a/src/mem/ruby/eventqueue/RubyEventQueue.cc +++ b/src/mem/ruby/eventqueue/RubyEventQueue.cc @@ -56,12 +56,12 @@ void RubyEventQueue::scheduleEventAbsolute(Consumer* consumer, Time timeAbs) { // Check to see if this is a redundant wakeup ASSERT(consumer != NULL); - if (consumer->getLastScheduledWakeup() != timeAbs) { + if (!consumer->alreadyScheduled(timeAbs)) { // This wakeup is not redundant - RubyEventQueueNode *thisNode = new RubyEventQueueNode(consumer); + RubyEventQueueNode *thisNode = new RubyEventQueueNode(consumer, this); assert(timeAbs > getTime()); schedule(thisNode, (timeAbs * m_clock)); - consumer->setLastScheduledWakeup(timeAbs * m_clock); + consumer->insertScheduledWakeupTime(timeAbs); } } |