summaryrefslogtreecommitdiff
path: root/src/cpu/simple_thread.hh
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2008-07-01 10:25:07 -0400
committerAli Saidi <saidi@eecs.umich.edu>2008-07-01 10:25:07 -0400
commita4a7a09e9622d6ad1ca91a4df253b9768c73de90 (patch)
tree828d818d5420c123f005a3b4617abc1689628406 /src/cpu/simple_thread.hh
parentc5fbbf376a6be4bb3ad7ddc64841450541c16db6 (diff)
downloadgem5-a4a7a09e9622d6ad1ca91a4df253b9768c73de90.tar.xz
Remove delVirtPort() and make getVirtPort() only return cached version.
Diffstat (limited to 'src/cpu/simple_thread.hh')
-rw-r--r--src/cpu/simple_thread.hh11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/cpu/simple_thread.hh b/src/cpu/simple_thread.hh
index fa80a283a..37c3221f5 100644
--- a/src/cpu/simple_thread.hh
+++ b/src/cpu/simple_thread.hh
@@ -208,12 +208,11 @@ class SimpleThread : public ThreadState
FunctionalPort *getPhysPort() { return physPort; }
- /** Return a virtual port. If no thread context is specified then a static
- * port is returned. Otherwise a port is created and returned. It must be
- * deleted by deleteVirtPort(). */
- VirtualPort *getVirtPort(ThreadContext *tc);
-
- void delVirtPort(VirtualPort *vp);
+ /** Return a virtual port. This port cannot be cached locally in an object.
+ * After a CPU switch it may point to the wrong memory object which could
+ * mean stale data.
+ */
+ VirtualPort *getVirtPort() { return virtPort; }
#endif
Status status() const { return _status; }