From 458d4a3c7bff9365e9d732c56f105b5b7bd37739 Mon Sep 17 00:00:00 2001 From: Michael LeBeane Date: Tue, 13 Sep 2016 23:17:42 -0400 Subject: 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. --- src/cpu/thread_context.hh | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/cpu/thread_context.hh') 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) -- cgit v1.2.3