summaryrefslogtreecommitdiff
path: root/src/mem/ruby/eventqueue
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2010-03-10 18:33:11 -0800
committerNathan Binkert <nate@binkert.org>2010-03-10 18:33:11 -0800
commit140785d24c27f3afddbe95c9e504e27bf8274290 (patch)
treecc4d27a7d4e417a6cd0f0364cff3db67ca1825b7 /src/mem/ruby/eventqueue
parent1badec39a94397397a3c918bfcc75c71efc507ea (diff)
downloadgem5-140785d24c27f3afddbe95c9e504e27bf8274290.tar.xz
ruby: get rid of std-includes.hh
Do not use "using namespace std;" in headers Include header files as needed
Diffstat (limited to 'src/mem/ruby/eventqueue')
-rw-r--r--src/mem/ruby/eventqueue/RubyEventQueue.hh10
-rw-r--r--src/mem/ruby/eventqueue/RubyEventQueueNode.cc2
-rw-r--r--src/mem/ruby/eventqueue/RubyEventQueueNode.hh10
3 files changed, 13 insertions, 9 deletions
diff --git a/src/mem/ruby/eventqueue/RubyEventQueue.hh b/src/mem/ruby/eventqueue/RubyEventQueue.hh
index f9b4aa060..468b21edb 100644
--- a/src/mem/ruby/eventqueue/RubyEventQueue.hh
+++ b/src/mem/ruby/eventqueue/RubyEventQueue.hh
@@ -59,6 +59,8 @@
#ifndef RUBYEVENTQUEUE_H
#define RUBYEVENTQUEUE_H
+#include <iostream>
+
#include "config/no_vector_bounds_checks.hh"
#include "mem/ruby/common/Global.hh"
#include "mem/gems_common/Vector.hh"
@@ -82,7 +84,7 @@ public:
Tick getClock() const { return m_clock; }
void scheduleEvent(Consumer* consumer, Time timeDelta);
void scheduleEventAbsolute(Consumer* consumer, Time timeAbs);
- void print(ostream& out) const;
+ void print(std::ostream& out) const;
void triggerEvents(Time t) { assert(0); }
void triggerAllEvents() { assert(0); }
@@ -99,16 +101,16 @@ private:
// Output operator declaration
inline extern
-ostream& operator<<(ostream& out, const RubyEventQueue& obj);
+std::ostream& operator<<(std::ostream& out, const RubyEventQueue& obj);
// ******************* Definitions *******************
// Output operator definition
inline extern
-ostream& operator<<(ostream& out, const RubyEventQueue& obj)
+std::ostream& operator<<(std::ostream& out, const RubyEventQueue& obj)
{
obj.print(out);
- out << flush;
+ out << std::flush;
return out;
}
diff --git a/src/mem/ruby/eventqueue/RubyEventQueueNode.cc b/src/mem/ruby/eventqueue/RubyEventQueueNode.cc
index 5034069cc..31aa2088a 100644
--- a/src/mem/ruby/eventqueue/RubyEventQueueNode.cc
+++ b/src/mem/ruby/eventqueue/RubyEventQueueNode.cc
@@ -34,7 +34,7 @@
#include "mem/ruby/eventqueue/RubyEventQueueNode.hh"
-void RubyEventQueueNode::print(ostream& out) const
+void RubyEventQueueNode::print(std::ostream& out) const
{
out << "[";
if (m_consumer_ptr != NULL) {
diff --git a/src/mem/ruby/eventqueue/RubyEventQueueNode.hh b/src/mem/ruby/eventqueue/RubyEventQueueNode.hh
index 3b0c23162..dc2fc92e7 100644
--- a/src/mem/ruby/eventqueue/RubyEventQueueNode.hh
+++ b/src/mem/ruby/eventqueue/RubyEventQueueNode.hh
@@ -35,6 +35,8 @@
#ifndef RUBYEVENTQUEUENODE_H
#define RUBYEVENTQUEUENODE_H
+#include <iostream>
+
#include "mem/ruby/common/Global.hh"
#include "sim/eventq.hh"
#include "mem/ruby/common/Consumer.hh"
@@ -53,7 +55,7 @@ public:
//~RubyEventQueueNode();
// Public Methods
- void print(ostream& out) const;
+ void print(std::ostream& out) const;
virtual void process() { m_consumer_ptr->wakeup(); }
virtual const char *description() const { return "Ruby Event"; }
@@ -68,16 +70,16 @@ private:
};
// Output operator declaration
-ostream& operator<<(ostream& out, const RubyEventQueueNode& obj);
+std::ostream& operator<<(std::ostream& out, const RubyEventQueueNode& obj);
// ******************* Definitions *******************
// Output operator definition
extern inline
-ostream& operator<<(ostream& out, const RubyEventQueueNode& obj)
+std::ostream& operator<<(std::ostream& out, const RubyEventQueueNode& obj)
{
obj.print(out);
- out << flush;
+ out << std::flush;
return out;
}