diff options
author | Nathan Binkert <nate@binkert.org> | 2008-10-09 04:58:24 -0700 |
---|---|---|
committer | Nathan Binkert <nate@binkert.org> | 2008-10-09 04:58:24 -0700 |
commit | e06321091d4e931ff1a4d753e56d76f9746c3cd2 (patch) | |
tree | 75e2049ca5ffc65cbfaefa73804571aa933f015b /src/cpu/memtest | |
parent | 8291d9db0a0bdeecb2a13f28962893ed3659230e (diff) | |
download | gem5-e06321091d4e931ff1a4d753e56d76f9746c3cd2.tar.xz |
eventq: convert all usage of events to use the new API.
For now, there is still a single global event queue, but this is
necessary for making the steps towards a parallelized m5.
Diffstat (limited to 'src/cpu/memtest')
-rw-r--r-- | src/cpu/memtest/memtest.cc | 4 | ||||
-rw-r--r-- | src/cpu/memtest/memtest.hh | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/cpu/memtest/memtest.cc b/src/cpu/memtest/memtest.cc index 42889163a..9e5b9d099 100644 --- a/src/cpu/memtest/memtest.cc +++ b/src/cpu/memtest/memtest.cc @@ -152,7 +152,7 @@ MemTest::MemTest(const Params *p) // set up counters noResponseCycles = 0; numReads = 0; - tickEvent.schedule(0); + schedule(tickEvent, 0); id = TESTER_ALLOCATOR++; @@ -262,7 +262,7 @@ void MemTest::tick() { if (!tickEvent.scheduled()) - tickEvent.schedule(curTick + ticks(1)); + schedule(tickEvent, curTick + ticks(1)); if (++noResponseCycles >= 500000) { cerr << name() << ": deadlocked at cycle " << curTick << endl; diff --git a/src/cpu/memtest/memtest.hh b/src/cpu/memtest/memtest.hh index 5a7e0b9ae..82438b41f 100644 --- a/src/cpu/memtest/memtest.hh +++ b/src/cpu/memtest/memtest.hh @@ -74,10 +74,10 @@ class MemTest : public MemObject { private: MemTest *cpu; + public: - TickEvent(MemTest *c) - : Event(&mainEventQueue, CPU_Tick_Pri), cpu(c) {} - void process() {cpu->tick();} + TickEvent(MemTest *c) : Event(CPU_Tick_Pri), cpu(c) {} + void process() { cpu->tick(); } virtual const char *description() const { return "MemTest tick"; } }; |