summaryrefslogtreecommitdiff
path: root/src/cpu/thread_context.hh
diff options
context:
space:
mode:
authorMichael LeBeane <michael.lebeane@amd.com>2016-09-13 23:17:42 -0400
committerMichael LeBeane <michael.lebeane@amd.com>2016-09-13 23:17:42 -0400
commit458d4a3c7bff9365e9d732c56f105b5b7bd37739 (patch)
tree91c48b32127fc2ded18dfc6edf3b4077d3b021e4 /src/cpu/thread_context.hh
parent2068af5768fdd15acaf7a8bad766f7005f86e0c2 (diff)
downloadgem5-458d4a3c7bff9365e9d732c56f105b5b7bd37739.tar.xz
sim: Refactor quiesce and remove FS asserts
The quiesce family of magic ops can be simplified by the inclusion of quiesceTick() and quiesce() functions on ThreadContext. This patch also gets rid of the FS guards, since suspending a CPU is also a valid operation for SE mode.
Diffstat (limited to 'src/cpu/thread_context.hh')
-rw-r--r--src/cpu/thread_context.hh12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/cpu/thread_context.hh b/src/cpu/thread_context.hh
index 2544b19c6..f966c0aa1 100644
--- a/src/cpu/thread_context.hh
+++ b/src/cpu/thread_context.hh
@@ -174,6 +174,12 @@ class ThreadContext
/// Set the status to Halted.
virtual void halt() = 0;
+ /// Quiesce thread context
+ void quiesce();
+
+ /// Quiesce, suspend, and schedule activate at resume
+ void quiesceTick(Tick resume);
+
virtual void dumpFuncProfile() = 0;
virtual void takeOverFrom(ThreadContext *old_context) = 0;
@@ -367,6 +373,12 @@ class ProxyThreadContext : public ThreadContext
/// Set the status to Halted.
void halt() { actualTC->halt(); }
+ /// Quiesce thread context
+ void quiesce() { actualTC->quiesce(); }
+
+ /// Quiesce, suspend, and schedule activate at resume
+ void quiesceTick(Tick resume) { actualTC->quiesceTick(resume); }
+
void dumpFuncProfile() { actualTC->dumpFuncProfile(); }
void takeOverFrom(ThreadContext *oldContext)