summaryrefslogtreecommitdiff
path: root/src/sim
diff options
context:
space:
mode:
authorKevin Lim <ktlim@umich.edu>2006-07-05 17:59:33 -0400
committerKevin Lim <ktlim@umich.edu>2006-07-05 17:59:33 -0400
commitd8fd09cc159a7b5b0d314a41b09cfcdef91de55f (patch)
tree336c7f2ae7e5366aa665b31fc7022ff8ad767e56 /src/sim
parentbd26dbdb13108bffed1c246a450029a3322dba4c (diff)
downloadgem5-d8fd09cc159a7b5b0d314a41b09cfcdef91de55f.tar.xz
Rename quiesce to drain to avoid confusion with the pseudo instruction.
src/cpu/simple/timing.cc: src/cpu/simple/timing.hh: src/python/m5/__init__.py: src/python/m5/config.py: src/sim/main.cc: src/sim/sim_events.cc: src/sim/sim_events.hh: src/sim/sim_object.cc: src/sim/sim_object.hh: Rename quiesce to drain. --HG-- extra : convert_revision : fc3244a3934812e1edb8050f1f51f30382baf774
Diffstat (limited to 'src/sim')
-rw-r--r--src/sim/main.cc14
-rw-r--r--src/sim/sim_events.cc4
-rw-r--r--src/sim/sim_events.hh6
-rw-r--r--src/sim/sim_object.cc20
-rw-r--r--src/sim/sim_object.hh8
5 files changed, 26 insertions, 26 deletions
diff --git a/src/sim/main.cc b/src/sim/main.cc
index 3eb7fa95d..e96a44930 100644
--- a/src/sim/main.cc
+++ b/src/sim/main.cc
@@ -523,19 +523,19 @@ simulate(Tick num_cycles = -1)
}
Event *
-createCountedQuiesce()
+createCountedDrain()
{
- return new CountedQuiesceEvent();
+ return new CountedDrainEvent();
}
void
-cleanupCountedQuiesce(Event *counted_quiesce)
+cleanupCountedDrain(Event *counted_drain)
{
- CountedQuiesceEvent *event =
- dynamic_cast<CountedQuiesceEvent *>(counted_quiesce);
+ CountedDrainEvent *event =
+ dynamic_cast<CountedDrainEvent *>(counted_drain);
if (event == NULL) {
- fatal("Called cleanupCountedQuiesce() on an event that was not "
- "a CountedQuiesceEvent.");
+ fatal("Called cleanupCountedDrain() on an event that was not "
+ "a CountedDrainEvent.");
}
assert(event->getCount() == 0);
delete event;
diff --git a/src/sim/sim_events.cc b/src/sim/sim_events.cc
index 97f7ae03c..d9e8bdeaa 100644
--- a/src/sim/sim_events.cc
+++ b/src/sim/sim_events.cc
@@ -79,10 +79,10 @@ exitSimLoop(const std::string &message, int exit_code)
}
void
-CountedQuiesceEvent::process()
+CountedDrainEvent::process()
{
if (--count == 0) {
- exitSimLoop("Finished quiesce");
+ exitSimLoop("Finished drain");
}
}
diff --git a/src/sim/sim_events.hh b/src/sim/sim_events.hh
index 50368f258..3c4a9dd05 100644
--- a/src/sim/sim_events.hh
+++ b/src/sim/sim_events.hh
@@ -67,13 +67,13 @@ class SimLoopExitEvent : public Event
virtual const char *description();
};
-class CountedQuiesceEvent : public SimLoopExitEvent
+class CountedDrainEvent : public SimLoopExitEvent
{
private:
- // Count down to quiescing
+ // Count of how many objects have not yet drained
int count;
public:
- CountedQuiesceEvent()
+ CountedDrainEvent()
: count(0)
{ }
void process();
diff --git a/src/sim/sim_object.cc b/src/sim/sim_object.cc
index 551555b25..4205b5762 100644
--- a/src/sim/sim_object.cc
+++ b/src/sim/sim_object.cc
@@ -271,22 +271,22 @@ SimObject::recordEvent(const std::string &stat)
}
bool
-SimObject::quiesce(Event *quiesce_event)
+SimObject::drain(Event *drain_event)
{
- if (state != QuiescedAtomic && state != Atomic) {
- panic("Must implement your own quiesce function if it is to be used "
+ if (state != DrainedAtomic && state != Atomic) {
+ panic("Must implement your own drain function if it is to be used "
"in timing mode!");
}
- state = QuiescedAtomic;
+ state = DrainedAtomic;
return false;
}
void
SimObject::resume()
{
- if (state == QuiescedAtomic) {
+ if (state == DrainedAtomic) {
state = Atomic;
- } else if (state == QuiescedTiming) {
+ } else if (state == DrainedTiming) {
state = Timing;
}
}
@@ -295,10 +295,10 @@ void
SimObject::setMemoryMode(State new_mode)
{
assert(new_mode == Timing || new_mode == Atomic);
- if (state == QuiescedAtomic && new_mode == Timing) {
- state = QuiescedTiming;
- } else if (state == QuiescedTiming && new_mode == Atomic) {
- state = QuiescedAtomic;
+ if (state == DrainedAtomic && new_mode == Timing) {
+ state = DrainedTiming;
+ } else if (state == DrainedTiming && new_mode == Atomic) {
+ state = DrainedAtomic;
} else {
state = new_mode;
}
diff --git a/src/sim/sim_object.hh b/src/sim/sim_object.hh
index e0b21782f..4833192d6 100644
--- a/src/sim/sim_object.hh
+++ b/src/sim/sim_object.hh
@@ -62,9 +62,9 @@ class SimObject : public Serializable, protected StartupCallback
enum State {
Atomic,
Timing,
- Quiescing,
- QuiescedAtomic,
- QuiescedTiming
+ Draining,
+ DrainedAtomic,
+ DrainedTiming
};
protected:
@@ -117,7 +117,7 @@ class SimObject : public Serializable, protected StartupCallback
// Methods to drain objects in order to take checkpoints
// Or switch from timing -> atomic memory model
// Quiesce returns true if the SimObject cannot quiesce immediately.
- virtual bool quiesce(Event *quiesce_event);
+ virtual bool drain(Event *drain_event);
virtual void resume();
virtual void setMemoryMode(State new_mode);
virtual void switchOut();