changes regarding fs.py
[gem5.git] / src / cpu / thread_state.hh
index de9b2f14e4fc866dfcec2af3808f988f60dfd0b6..14e033b7fbb02620807eb646397e7d84c35b2777 100644 (file)
@@ -31,7 +31,8 @@
 #ifndef __CPU_THREAD_STATE_HH__
 #define __CPU_THREAD_STATE_HH__
 
-#include "arch/isa_traits.hh"
+#include "arch/types.hh"
+#include "cpu/profile.hh"
 #include "cpu/thread_context.hh"
 
 #if !FULL_SYSTEM
@@ -49,6 +50,8 @@ namespace Kernel {
 };
 #endif
 
+class Checkpoint;
+
 /**
  *  Struct for holding general thread state that is needed across CPU
  *  models.  This includes things such as pointers to the process,
@@ -61,10 +64,14 @@ struct ThreadState {
 #if FULL_SYSTEM
     ThreadState(int _cpuId, int _tid);
 #else
-    ThreadState(int _cpuId, int _tid, MemObject *mem,
-                Process *_process, short _asid);
+    ThreadState(int _cpuId, int _tid, Process *_process,
+                short _asid, MemObject *mem);
 #endif
 
+    void serialize(std::ostream &os);
+
+    void unserialize(Checkpoint *cp, const std::string &section);
+
     void setCpuId(int id) { cpuId = id; }
 
     int readCpuId() { return cpuId; }
@@ -185,6 +192,7 @@ struct ThreadState {
     // simulation only; all functional memory accesses should use
     // one of the FunctionalMemory pointers above.
     short asid;
+
 #endif
 
     /** Current instruction the thread is committing.  Only set and