diff options
author | Andreas Sandberg <andreas.sandberg@arm.com> | 2015-07-07 09:51:04 +0100 |
---|---|---|
committer | Andreas Sandberg <andreas.sandberg@arm.com> | 2015-07-07 09:51:04 +0100 |
commit | e9c3d59aae58f8fcf77ce5cf4b985dc9e2a90de2 (patch) | |
tree | 799c50d9a0b99f1623a16d9c1d49f4cb0d1fcbaf /src/cpu/minor | |
parent | 1dc5e63b889647a153f01351f560a3beaa41f293 (diff) | |
download | gem5-e9c3d59aae58f8fcf77ce5cf4b985dc9e2a90de2.tar.xz |
sim: Make the drain state a global typed enum
The drain state enum is currently a part of the Drainable
interface. The same state machine will be used by the DrainManager to
identify the global state of the simulator. Make the drain state a
global typed enum to better cater for this usage scenario.
Diffstat (limited to 'src/cpu/minor')
-rw-r--r-- | src/cpu/minor/cpu.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cpu/minor/cpu.cc b/src/cpu/minor/cpu.cc index d21bf7042..ac1a18bf9 100644 --- a/src/cpu/minor/cpu.cc +++ b/src/cpu/minor/cpu.cc @@ -217,7 +217,7 @@ void MinorCPU::signalDrainDone() { DPRINTF(Drain, "MinorCPU drain done\n"); - setDrainState(Drainable::Drained); + setDrainState(DrainState::Drained); drainManager->signalDrainDone(); drainManager = NULL; } @@ -225,8 +225,8 @@ MinorCPU::signalDrainDone() void MinorCPU::drainResume() { - assert(getDrainState() == Drainable::Drained || - getDrainState() == Drainable::Running); + assert(getDrainState() == DrainState::Drained || + getDrainState() == DrainState::Running); if (switchedOut()) { DPRINTF(Drain, "drainResume while switched out. Ignoring\n"); @@ -243,7 +243,7 @@ MinorCPU::drainResume() wakeup(); pipeline->drainResume(); - setDrainState(Drainable::Running); + setDrainState(DrainState::Running); } void |