scons: Group Source-s based on what SConscript included them.
[gem5.git] / src / cpu / cpuevent.hh
index c973621c0b4d6d4a368f9f035fbf4201a9609f6d..77b1d9138acfe6b264d87be09196cde66ee01e68 100644 (file)
@@ -32,6 +32,7 @@
 #define __CPU_CPUEVENT_HH__
 
 #include <vector>
+
 #include "sim/eventq.hh"
 
 class ThreadContext;
@@ -58,8 +59,8 @@ class CpuEvent : public Event
     ThreadContext *tc;
 
   public:
-    CpuEvent(EventQueue *q, ThreadContext *_tc, Priority p = Default_Pri)
-        : Event(q, p), tc(_tc)
+    CpuEvent(ThreadContext *_tc, Priority p = Default_Pri)
+        : Event(p), tc(_tc)
     { cpuEventList.push_back(this); }
 
     /** delete the cpu event from the global list. */
@@ -71,6 +72,7 @@ class CpuEvent : public Event
      */
     static void replaceThreadContext(ThreadContext *oldTc,
                                      ThreadContext *newTc);
+    ThreadContext* getTC() { return tc; }
 };
 
 template <class T, void (T::* F)(ThreadContext *tc)>
@@ -80,9 +82,8 @@ class CpuEventWrapper : public CpuEvent
     T *object;
 
   public:
-    CpuEventWrapper(T *obj, ThreadContext *_tc,
-        EventQueue *q = &mainEventQueue, Priority p = Default_Pri)
-        : CpuEvent(q, _tc, p), object(obj)
+    CpuEventWrapper(T *obj, ThreadContext *_tc, Priority p = Default_Pri)
+        : CpuEvent(_tc, p), object(obj)
     { }
     void process() { (object->*F)(tc); }
 };