diff options
author | Nathan Binkert <nate@binkert.org> | 2010-03-22 18:43:53 -0700 |
---|---|---|
committer | Nathan Binkert <nate@binkert.org> | 2010-03-22 18:43:53 -0700 |
commit | 5ab13e2deb8f904ef2a233749193fa09ea7013c4 (patch) | |
tree | 07f5f02902f9e719fe58d1a9419b5a1d51f7a2ce /src/mem/ruby/eventqueue/RubyEventQueue.hh | |
parent | 2620e08722b38660658d46cdb76c337db18e877c (diff) | |
download | gem5-5ab13e2deb8f904ef2a233749193fa09ea7013c4.tar.xz |
ruby: style pass
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__ |