summaryrefslogtreecommitdiff
path: root/src/mem/ruby/eventqueue/RubyEventQueueNode.hh
diff options
context:
space:
mode:
authorKorey Sewell <ksewell@umich.edu>2010-03-23 00:29:10 -0400
committerKorey Sewell <ksewell@umich.edu>2010-03-23 00:29:10 -0400
commitd484e1b334c6fd3f2721a2a4628c2324ed14fd08 (patch)
treec95594df5ecae29b11262967f3f8b99fca82ca5d /src/mem/ruby/eventqueue/RubyEventQueueNode.hh
parent70308bc835035b940efb36d7f335643dfaa39851 (diff)
parenta0651b8f6127c8b7994a165b525e93d87c470d20 (diff)
downloadgem5-d484e1b334c6fd3f2721a2a4628c2324ed14fd08.tar.xz
m5merge(2): another merge of regression stats
Diffstat (limited to 'src/mem/ruby/eventqueue/RubyEventQueueNode.hh')
-rw-r--r--src/mem/ruby/eventqueue/RubyEventQueueNode.hh78
1 files changed, 28 insertions, 50 deletions
diff --git a/src/mem/ruby/eventqueue/RubyEventQueueNode.hh b/src/mem/ruby/eventqueue/RubyEventQueueNode.hh
index 46d8b317c..c759e7f57 100644
--- a/src/mem/ruby/eventqueue/RubyEventQueueNode.hh
+++ b/src/mem/ruby/eventqueue/RubyEventQueueNode.hh
@@ -1,4 +1,3 @@
-
/*
* Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
* All rights reserved.
@@ -27,65 +26,44 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-/*
- * $Id$
- *
- */
-
-#ifndef RUBYEVENTQUEUENODE_H
-#define RUBYEVENTQUEUENODE_H
+#ifndef __MEM_RUBY_EVENTQUEUE_RUBYEVENTQUEUENODE_HH__
+#define __MEM_RUBY_EVENTQUEUE_RUBYEVENTQUEUENODE_HH__
#include <iostream>
+#include "mem/ruby/common/Consumer.hh"
#include "mem/ruby/common/Global.hh"
#include "sim/eventq.hh"
-#include "mem/ruby/common/Consumer.hh"
-//class Consumer;
-class RubyEventQueueNode : public Event {
-public:
- // Constructors
- RubyEventQueueNode(Consumer* _consumer, RubyEventQueue* _eventq)
- : m_consumer_ptr(_consumer), m_eventq_ptr(_eventq)
- {
- setFlags(AutoDelete);
- }
-
- // Destructor
- //~RubyEventQueueNode();
-
- // Public Methods
- void print(std::ostream& out) const;
- virtual void process()
- {
- m_consumer_ptr->wakeup();
- m_consumer_ptr->removeScheduledWakeupTime(m_eventq_ptr->getTime());
- }
- virtual const char *description() const { return "Ruby Event"; }
-
-private:
- // Private Methods
+class RubyEventQueueNode : public Event
+{
+ public:
+ RubyEventQueueNode(Consumer* _consumer, RubyEventQueue* _eventq)
+ : m_consumer_ptr(_consumer), m_eventq_ptr(_eventq)
+ {
+ setFlags(AutoDelete);
+ }
- // Default copy constructor and assignment operator
- // RubyEventQueueNode(const RubyEventQueueNode& obj);
+ void print(std::ostream& out) const;
+ virtual void
+ process()
+ {
+ m_consumer_ptr->wakeup();
+ m_consumer_ptr->removeScheduledWakeupTime(m_eventq_ptr->getTime());
+ }
+ virtual const char *description() const { return "Ruby Event"; }
- // Data Members (m_ prefix)
- Consumer* m_consumer_ptr;
- RubyEventQueue* m_eventq_ptr;
+ private:
+ Consumer* m_consumer_ptr;
+ RubyEventQueue* m_eventq_ptr;
};
-// Output operator declaration
-std::ostream& operator<<(std::ostream& out, const RubyEventQueueNode& obj);
-
-// ******************* Definitions *******************
-
-// Output operator definition
-extern inline
-std::ostream& operator<<(std::ostream& out, const RubyEventQueueNode& obj)
+inline std::ostream&
+operator<<(std::ostream& out, const RubyEventQueueNode& obj)
{
- obj.print(out);
- out << std::flush;
- return out;
+ obj.print(out);
+ out << std::flush;
+ return out;
}
-#endif //EVENTQUEUENODE_H
+#endif // __MEM_RUBY_EVENTQUEUE_EVENTQUEUENODE_HH__