summaryrefslogtreecommitdiff
path: root/src/cpu/thread_state.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/thread_state.hh')
-rw-r--r--src/cpu/thread_state.hh9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/cpu/thread_state.hh b/src/cpu/thread_state.hh
index d72697cb7..de9b2f14e 100644
--- a/src/cpu/thread_state.hh
+++ b/src/cpu/thread_state.hh
@@ -24,6 +24,8 @@
* 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__
@@ -86,8 +88,12 @@ struct ThreadState {
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; }
@@ -147,6 +153,7 @@ struct ThreadState {
// Index of hardware thread context on the CPU that this represents.
int tid;
+ public:
/** Last time activate was called on this thread. */
Tick lastActivate;
@@ -185,6 +192,7 @@ struct ThreadState {
*/
TheISA::MachInst inst;
+ public:
/**
* Temporary storage to pass the source address from copy_load to
* copy_store.
@@ -197,7 +205,6 @@ struct ThreadState {
*/
Addr copySrcPhysAddr;
- public:
/*
* number of executed instructions, for matching with syscall trace
* points in EIO files.