diff options
author | Steve Reinhardt <steve.reinhardt@amd.com> | 2011-01-07 21:50:29 -0800 |
---|---|---|
committer | Steve Reinhardt <steve.reinhardt@amd.com> | 2011-01-07 21:50:29 -0800 |
commit | 6f1187943cf78c2fd0334bd7e4372ae79a587fa4 (patch) | |
tree | 8d0eac2e2f4d55d48245266d3930ad4e7f92030f /src/sim/eventq.hh | |
parent | c22be9f2f016872b05d65c82055ddc936b4aa075 (diff) | |
download | gem5-6f1187943cf78c2fd0334bd7e4372ae79a587fa4.tar.xz |
Replace curTick global variable with accessor functions.
This step makes it easy to replace the accessor functions
(which still access a global variable) with ones that access
per-thread curTick values.
Diffstat (limited to 'src/sim/eventq.hh')
-rw-r--r-- | src/sim/eventq.hh | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/sim/eventq.hh b/src/sim/eventq.hh index 3869ca287..e28c43bb7 100644 --- a/src/sim/eventq.hh +++ b/src/sim/eventq.hh @@ -136,7 +136,7 @@ class Event : public Serializable, public FastAlloc queue = q; #endif #ifdef EVENTQ_DEBUG - whenScheduled = curTick; + whenScheduled = curTick(); #endif } @@ -254,7 +254,7 @@ class Event : public Serializable, public FastAlloc queue = NULL; #endif #ifdef EVENTQ_DEBUG - whenCreated = curTick; + whenCreated = curTick(); whenScheduled = 0; #endif } @@ -405,15 +405,15 @@ class EventQueue : public Serializable } } - // default: process all events up to 'now' (curTick) - void serviceEvents() { serviceEvents(curTick); } + // default: process all events up to 'now' (curTick()) + void serviceEvents() { serviceEvents(curTick()); } // return true if no events are queued bool empty() const { return head == NULL; } void dump() const; - Tick nextEventTime() { return empty() ? curTick : head->when(); } + Tick nextEventTime() { return empty() ? curTick() : head->when(); } bool debugVerify() const; @@ -486,7 +486,7 @@ class EventManager inline void EventQueue::schedule(Event *event, Tick when) { - assert((UTick)when >= (UTick)curTick); + assert((UTick)when >= (UTick)curTick()); assert(!event->scheduled()); assert(event->initialized()); @@ -523,7 +523,7 @@ EventQueue::deschedule(Event *event) inline void EventQueue::reschedule(Event *event, Tick when, bool always) { - assert(when >= curTick); + assert(when >= curTick()); assert(always || event->scheduled()); assert(event->initialized()); |