summaryrefslogtreecommitdiff
path: root/src/cpu/thread_state.hh
diff options
context:
space:
mode:
authorKevin Lim <ktlim@umich.edu>2006-11-02 14:58:31 -0500
committerKevin Lim <ktlim@umich.edu>2006-11-02 14:58:31 -0500
commitdd5e2cd959e61b8af094137f337e999048317ec3 (patch)
tree76ad1a4fb55e939493ff304bc395699a87b2bab2 /src/cpu/thread_state.hh
parent64f8cd12c6a613205196bbe9dbc0fab98c4ca735 (diff)
downloadgem5-dd5e2cd959e61b8af094137f337e999048317ec3.tar.xz
More proper handling of the ports.
src/cpu/simple_thread.cc: Fix up port handling to share code. src/cpu/thread_state.cc: Separate code off into a function. src/cpu/thread_state.hh: Make a separate function that will get the CPU's memory's functional port. --HG-- extra : convert_revision : 96a9bb3c5e4b9ba5511678c0fd17f0017c8cd312
Diffstat (limited to 'src/cpu/thread_state.hh')
-rw-r--r--src/cpu/thread_state.hh9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/cpu/thread_state.hh b/src/cpu/thread_state.hh
index 14673aabb..862d671f2 100644
--- a/src/cpu/thread_state.hh
+++ b/src/cpu/thread_state.hh
@@ -51,6 +51,7 @@ namespace Kernel {
class BaseCPU;
class Checkpoint;
+class Port;
class TranslatingPort;
/**
@@ -69,6 +70,8 @@ struct ThreadState {
short _asid);
#endif
+ ~ThreadState();
+
void serialize(std::ostream &os);
void unserialize(Checkpoint *cp, const std::string &section);
@@ -136,6 +139,12 @@ struct ThreadState {
/** Sets the status of this thread. */
void setStatus(Status new_status) { _status = new_status; }
+ protected:
+ /** Gets a functional port from the memory object that's connected
+ * to the CPU. */
+ Port *getMemFuncPort();
+
+ public:
/** Number of instructions committed. */
Counter numInst;
/** Stat for number instructions committed. */