From f90b08a5ccd83800e0263e6e13af7d8c87b3cdf4 Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Fri, 11 Jul 2008 08:48:50 -0700 Subject: 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. --- src/sim/eventq.hh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/sim/eventq.hh') 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 -- cgit v1.2.3