diff options
author | Steve Reinhardt <stever@eecs.umich.edu> | 2003-10-30 07:08:35 -0800 |
---|---|---|
committer | Steve Reinhardt <stever@eecs.umich.edu> | 2003-10-30 07:08:35 -0800 |
commit | ec9d41c46a3fcbf5ce5212c4997cee697ebde706 (patch) | |
tree | 7204c6dcea1e7f43b4b1e02831e0ae7cbc6f7d7f | |
parent | 2f8d858e13e8206999c3eb28d7362bc217d6a5b3 (diff) | |
download | gem5-ec9d41c46a3fcbf5ce5212c4997cee697ebde706.tar.xz |
Add some comments explaining ExecContext::Status enum.
cpu/exec_context.hh:
Add some comments explaining Status enum.
--HG--
extra : convert_revision : 87fdb5d9c09d2a08ab0cff9fa38da2579a550477
-rw-r--r-- | cpu/exec_context.hh | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/cpu/exec_context.hh b/cpu/exec_context.hh index cb826a15e..e008e3e13 100644 --- a/cpu/exec_context.hh +++ b/cpu/exec_context.hh @@ -61,7 +61,27 @@ class MemoryController; class ExecContext { public: - enum Status { Unallocated, Active, Suspended, Halted }; + enum Status + { + /// Initialized but not running yet. All CPUs start in + /// this state, but most transition to Active on cycle 1. + /// In MP or SMT systems, non-primary contexts will stay + /// in this state until a thread is assigned to them. + Unallocated, + + /// Running. Instructions should be executed only when + /// the context is in this state. + Active, + + /// Temporarily inactive. Entered while waiting for + /// synchronization, etc. + Suspended, + + /// Permanently shut down. Entered when target executes + /// m5exit pseudo-instruction. When all contexts enter + /// this state, the simulation will terminate. + Halted + }; private: Status _status; |