summaryrefslogtreecommitdiff
path: root/src/cpu/thread_state.hh
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2006-11-01 19:00:59 -0500
committerGabe Black <gblack@eecs.umich.edu>2006-11-01 19:00:59 -0500
commitb565660c42cbf8f9ec9442cd6c0b7d488c7816af (patch)
treeaa977395b10e164190efdd5106da54a57bc23b44 /src/cpu/thread_state.hh
parent8dbab9f701150cf93d33f2a21d6b556507f3d617 (diff)
parent9ef8bf74c7ab3d34889e804cb4b1e365da090d0b (diff)
downloadgem5-b565660c42cbf8f9ec9442cd6c0b7d488c7816af.tar.xz
Merge zizzer.eecs.umich.edu:/bk/newmem/
into zeep.eecs.umich.edu:/home/gblack/m5/newmemmemops --HG-- extra : convert_revision : c2f7398a0d14dd11108579bb243ada7420285a22
Diffstat (limited to 'src/cpu/thread_state.hh')
-rw-r--r--src/cpu/thread_state.hh14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/cpu/thread_state.hh b/src/cpu/thread_state.hh
index 60353760c..14673aabb 100644
--- a/src/cpu/thread_state.hh
+++ b/src/cpu/thread_state.hh
@@ -37,7 +37,6 @@
#if !FULL_SYSTEM
#include "mem/mem_object.hh"
-#include "mem/translating_port.hh"
#include "sim/process.hh"
#endif
@@ -50,7 +49,9 @@ namespace Kernel {
};
#endif
+class BaseCPU;
class Checkpoint;
+class TranslatingPort;
/**
* Struct for holding general thread state that is needed across CPU
@@ -62,10 +63,10 @@ struct ThreadState {
typedef ThreadContext::Status Status;
#if FULL_SYSTEM
- ThreadState(int _cpuId, int _tid);
+ ThreadState(BaseCPU *cpu, int _cpuId, int _tid);
#else
- ThreadState(int _cpuId, int _tid, Process *_process,
- short _asid, MemObject *mem);
+ ThreadState(BaseCPU *cpu, int _cpuId, int _tid, Process *_process,
+ short _asid);
#endif
void serialize(std::ostream &os);
@@ -105,7 +106,7 @@ struct ThreadState {
#else
Process *getProcessPtr() { return process; }
- TranslatingPort *getMemPort() { return port; }
+ TranslatingPort *getMemPort();
void setMemPort(TranslatingPort *_port) { port = _port; }
@@ -153,6 +154,9 @@ struct ThreadState {
protected:
ThreadContext::Status _status;
+ // Pointer to the base CPU.
+ BaseCPU *baseCpu;
+
// ID of this context w.r.t. the System or Process object to which
// it belongs. For full-system mode, this is the system CPU ID.
int cpuId;