diff options
Diffstat (limited to 'src/mem/ruby/common')
-rw-r--r-- | src/mem/ruby/common/Consumer.cc | 4 | ||||
-rw-r--r-- | src/mem/ruby/common/Consumer.hh | 14 |
2 files changed, 3 insertions, 15 deletions
diff --git a/src/mem/ruby/common/Consumer.cc b/src/mem/ruby/common/Consumer.cc index 59605d51b..f68ee14d0 100644 --- a/src/mem/ruby/common/Consumer.cc +++ b/src/mem/ruby/common/Consumer.cc @@ -41,7 +41,9 @@ Consumer::scheduleEventAbsolute(Tick evt_time) { if (!alreadyScheduled(evt_time)) { // This wakeup is not redundant - ConsumerEvent *evt = new ConsumerEvent(this); + auto *evt = new EventFunctionWrapper( + [this]{ wakeup(); }, "Consumer Event", true); + em->schedule(evt, evt_time); insertScheduledWakeupTime(evt_time); } diff --git a/src/mem/ruby/common/Consumer.hh b/src/mem/ruby/common/Consumer.hh index 20f2bdd0f..b0d35bf70 100644 --- a/src/mem/ruby/common/Consumer.hh +++ b/src/mem/ruby/common/Consumer.hh @@ -76,20 +76,6 @@ class Consumer private: std::set<Tick> m_scheduled_wakeups; ClockedObject *em; - - class ConsumerEvent : public Event - { - public: - ConsumerEvent(Consumer* _consumer) - : Event(Default_Pri, AutoDelete), m_consumer_ptr(_consumer) - { - } - - void process() { m_consumer_ptr->wakeup(); } - - private: - Consumer* m_consumer_ptr; - }; }; inline std::ostream& |