summaryrefslogtreecommitdiff
path: root/src/sim/eventq.hh
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2008-07-11 08:48:50 -0700
committerNathan Binkert <nate@binkert.org>2008-07-11 08:48:50 -0700
commitf90b08a5ccd83800e0263e6e13af7d8c87b3cdf4 (patch)
tree3d62aa636507c46ee894865202ec8d0779ac63d1 /src/sim/eventq.hh
parent10df68dd727d37876f3d9526739b1c49d195e222 (diff)
downloadgem5-f90b08a5ccd83800e0263e6e13af7d8c87b3cdf4.tar.xz
eventq: change the event datastructure back to LIFO.
The status quo is preferred since it is less likely that people will rely on LIFO than FIFO, and when we move to a parallelized M5, no ordering between events of the same time/priority will be guaranteed.
Diffstat (limited to 'src/sim/eventq.hh')
-rw-r--r--src/sim/eventq.hh6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sim/eventq.hh b/src/sim/eventq.hh
index 10c0048a8..bc9b2353f 100644
--- a/src/sim/eventq.hh
+++ b/src/sim/eventq.hh
@@ -77,8 +77,8 @@ class Event : public Serializable, public FastAlloc
// The event queue is now a linked list of linked lists. The
// 'nextBin' pointer is to find the bin, where a bin is defined as
// when+priority. All events in the same bin will be stored in a
- // second circularly linked list maintained by the 'nextInBin'
- // pointer. The list will be accessed in FIFO order. The end
+ // second linked list (a stack) maintained by the 'nextInBin'
+ // pointer. The list will be accessed in LIFO order. The end
// result is that the insert/removal in 'nextBin' is
// linear/constant, and the lookup/removal in 'nextInBin' is
// constant/constant. Hopefully this is a significant improvement
@@ -86,7 +86,7 @@ class Event : public Serializable, public FastAlloc
Event *nextBin;
Event *nextInBin;
- friend void insertBefore(Event *event, Event *curr);
+ friend Event *insertBefore(Event *event, Event *curr);
friend Event *removeItem(Event *event, Event *last);
/// queue to which this event belongs (though it may or may not be