summaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
Diffstat (limited to 'sim')
-rw-r--r--sim/stat_control.cc13
-rw-r--r--sim/stat_control.hh4
2 files changed, 11 insertions, 6 deletions
diff --git a/sim/stat_control.cc b/sim/stat_control.cc
index e4394cfa3..33b3ccdb6 100644
--- a/sim/stat_control.cc
+++ b/sim/stat_control.cc
@@ -158,13 +158,13 @@ class StatEvent : public Event
Tick repeat;
public:
- StatEvent(int _flags, Tick _when, Tick _repeat);
+ StatEvent(EventQueue *queue, int _flags, Tick _when, Tick _repeat);
virtual void process();
virtual const char *description();
};
-StatEvent::StatEvent(int _flags, Tick _when, Tick _repeat)
- : Event(&mainEventQueue, Stat_Event_Pri),
+StatEvent::StatEvent(EventQueue *queue, int _flags, Tick _when, Tick _repeat)
+ : Event(queue, Stat_Event_Pri),
flags(_flags), repeat(_repeat)
{
setFlags(AutoDelete);
@@ -214,9 +214,12 @@ DumpNow()
}
void
-SetupEvent(int flags, Tick when, Tick repeat)
+SetupEvent(int flags, Tick when, Tick repeat, EventQueue *queue)
{
- new StatEvent(flags, when, repeat);
+ if (queue == NULL)
+ queue = &mainEventQueue;
+
+ new StatEvent(queue, flags, when, repeat);
}
/* namespace Stats */ }
diff --git a/sim/stat_control.hh b/sim/stat_control.hh
index a22ce76af..806c4be6b 100644
--- a/sim/stat_control.hh
+++ b/sim/stat_control.hh
@@ -32,6 +32,8 @@
#include <fstream>
#include <list>
+class EventQueue;
+
namespace Stats {
enum {
@@ -43,7 +45,7 @@ class Output;
extern std::list<Output *> OutputList;
void DumpNow();
-void SetupEvent(int flags, Tick when, Tick repeat = 0);
+void SetupEvent(int flags, Tick when, Tick repeat = 0, EventQueue *queue = NULL);
void InitSimStats();