* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Authors: Kevin Lim
*/
#ifndef __CPU_THREAD_STATE_HH__
};
#endif
+class Checkpoint;
+
/**
* Struct for holding general thread state that is needed across CPU
* models. This includes things such as pointers to the process,
#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 §ion);
+
void setCpuId(int id) { cpuId = id; }
int readCpuId() { return cpuId; }
Kernel::Statistics *getKernelStats() { return kernelStats; }
+ FunctionalPort *getPhysPort() { return physPort; }
+
void setPhysPort(FunctionalPort *port) { physPort = port; }
+ VirtualPort *getVirtPort(ThreadContext *tc = NULL) { return virtPort; }
+
void setVirtPort(VirtualPort *port) { virtPort = port; }
#else
Process *getProcessPtr() { return process; }
// Index of hardware thread context on the CPU that this represents.
int tid;
+ public:
/** Last time activate was called on this thread. */
Tick lastActivate;
*/
TheISA::MachInst inst;
+ public:
/**
* Temporary storage to pass the source address from copy_load to
* copy_store.
*/
Addr copySrcPhysAddr;
- public:
/*
* number of executed instructions, for matching with syscall trace
* points in EIO files.