summaryrefslogtreecommitdiff
path: root/src/cpu/base.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/base.hh')
-rw-r--r--src/cpu/base.hh6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cpu/base.hh b/src/cpu/base.hh
index 3ae9c60b6..a1265b748 100644
--- a/src/cpu/base.hh
+++ b/src/cpu/base.hh
@@ -142,6 +142,12 @@ class BaseCPU : public MemObject
/// Notify the CPU that the indicated context is now halted.
virtual void haltContext(int thread_num) {}
+ /// Given a Thread Context pointer return the thread num
+ int findContext(ThreadContext *tc);
+
+ /// Given a thread num get tho thread context for it
+ ThreadContext *getContext(int tn) { return threadContexts[tn]; }
+
public:
struct Params
{