diff options
author | Korey Sewell <ksewell@umich.edu> | 2010-03-23 00:29:10 -0400 |
---|---|---|
committer | Korey Sewell <ksewell@umich.edu> | 2010-03-23 00:29:10 -0400 |
commit | d484e1b334c6fd3f2721a2a4628c2324ed14fd08 (patch) | |
tree | c95594df5ecae29b11262967f3f8b99fca82ca5d /src/mem/ruby/eventqueue/RubyEventQueue.hh | |
parent | 70308bc835035b940efb36d7f335643dfaa39851 (diff) | |
parent | a0651b8f6127c8b7994a165b525e93d87c470d20 (diff) | |
download | gem5-d484e1b334c6fd3f2721a2a4628c2324ed14fd08.tar.xz |
m5merge(2): another merge of regression stats
Diffstat (limited to 'src/mem/ruby/eventqueue/RubyEventQueue.hh')
-rw-r--r-- | src/mem/ruby/eventqueue/RubyEventQueue.hh | 77 |
1 files changed, 31 insertions, 46 deletions
diff --git a/src/mem/ruby/eventqueue/RubyEventQueue.hh b/src/mem/ruby/eventqueue/RubyEventQueue.hh index 468b21edb..d2ebc42c2 100644 --- a/src/mem/ruby/eventqueue/RubyEventQueue.hh +++ b/src/mem/ruby/eventqueue/RubyEventQueue.hh @@ -1,4 +1,3 @@ - /* * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood * All rights reserved. @@ -28,9 +27,7 @@ */ /* - * $Id$ - * - * Description: The RubyEventQueue class implements an event queue which + * The RubyEventQueue class implements an event queue which * can be trigger events, allowing our simulation to be event driven. * * Currently, the only event we support is a Consumer being signaled @@ -56,8 +53,8 @@ * */ -#ifndef RUBYEVENTQUEUE_H -#define RUBYEVENTQUEUE_H +#ifndef __MEM_RUBY_EVENTQUEUE_RUBYEVENTQUEUE_HH__ +#define __MEM_RUBY_EVENTQUEUE_RUBYEVENTQUEUE_HH__ #include <iostream> @@ -70,48 +67,36 @@ class Consumer; template <class TYPE> class PrioHeap; class RubyEventQueueNode; -class RubyEventQueue : public EventManager { -public: - // Constructors - RubyEventQueue(EventQueue* eventq, Tick _clock); - - // Destructor - ~RubyEventQueue(); - - // Public Methods - - Time getTime() const { return curTick/m_clock; } - Tick getClock() const { return m_clock; } - void scheduleEvent(Consumer* consumer, Time timeDelta); - void scheduleEventAbsolute(Consumer* consumer, Time timeAbs); - void print(std::ostream& out) const; - - void triggerEvents(Time t) { assert(0); } - void triggerAllEvents() { assert(0); } - - // Private Methods -private: - // Private copy constructor and assignment operator - RubyEventQueue(const RubyEventQueue& obj); - RubyEventQueue& operator=(const RubyEventQueue& obj); - - // Data Members (m_ prefix) - Tick m_clock; +class RubyEventQueue : public EventManager +{ + public: + RubyEventQueue(EventQueue* eventq, Tick _clock); + ~RubyEventQueue(); + + Time getTime() const { return curTick/m_clock; } + Tick getClock() const { return m_clock; } + void scheduleEvent(Consumer* consumer, Time timeDelta); + void scheduleEventAbsolute(Consumer* consumer, Time timeAbs); + void print(std::ostream& out) const; + + void triggerEvents(Time t) { assert(0); } + void triggerAllEvents() { assert(0); } + + private: + // Private copy constructor and assignment operator + RubyEventQueue(const RubyEventQueue& obj); + RubyEventQueue& operator=(const RubyEventQueue& obj); + + // Data Members (m_ prefix) + Tick m_clock; }; -// Output operator declaration -inline extern -std::ostream& operator<<(std::ostream& out, const RubyEventQueue& obj); - -// ******************* Definitions ******************* - -// Output operator definition -inline extern -std::ostream& operator<<(std::ostream& out, const RubyEventQueue& obj) +inline std::ostream& +operator<<(std::ostream& out, const RubyEventQueue& obj) { - obj.print(out); - out << std::flush; - return out; + obj.print(out); + out << std::flush; + return out; } -#endif //EVENTQUEUE_H +#endif // __MEM_RUBY_EVENTQUEUE_RUBYEVENTQUEUE_HH__ |