summaryrefslogtreecommitdiff
path: root/src/sim/eventq.cc
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2008-10-09 04:58:23 -0700
committerNathan Binkert <nate@binkert.org>2008-10-09 04:58:23 -0700
commiteb89a23556a16958d9931b93f57b626f20af0ddd (patch)
tree75e9a1b81a9f8c7eea858485670336efc79bd43f /src/sim/eventq.cc
parenta589eb4053d9a902f9e9047830955963aec94e64 (diff)
downloadgem5-eb89a23556a16958d9931b93f57b626f20af0ddd.tar.xz
eventq: Don't use inline friend function when a static function will do.
Another good reason to avoid this is that swig will try to wrap the friend, but it won't try to wrap a private static function.
Diffstat (limited to 'src/sim/eventq.cc')
-rw-r--r--src/sim/eventq.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/sim/eventq.cc b/src/sim/eventq.cc
index 4f0b51e08..78d6a458f 100644
--- a/src/sim/eventq.cc
+++ b/src/sim/eventq.cc
@@ -57,8 +57,8 @@ EventQueue mainEventQueue("MainEventQueue");
Counter Event::instanceCounter = 0;
#endif
-inline Event *
-insertBefore(Event *event, Event *curr)
+Event *
+Event::insertBefore(Event *event, Event *curr)
{
// Either way, event will be the top element in the 'in bin' list
// which is the pointer we need in order to look into the list, so
@@ -83,7 +83,7 @@ EventQueue::insert(Event *event)
{
// Deal with the head case
if (!head || *event <= *head) {
- head = insertBefore(event, head);
+ head = Event::insertBefore(event, head);
return;
}
@@ -98,11 +98,11 @@ EventQueue::insert(Event *event)
// Note: this operation may render all nextBin pointers on the
// prev 'in bin' list stale (except for the top one)
- prev->nextBin = insertBefore(event, curr);
+ prev->nextBin = Event::insertBefore(event, curr);
}
-inline Event *
-removeItem(Event *event, Event *top)
+Event *
+Event::removeItem(Event *event, Event *top)
{
Event *curr = top;
Event *next = top->nextInBin;
@@ -141,7 +141,7 @@ EventQueue::remove(Event *event)
// deal with an event on the head's 'in bin' list (event has the same
// time as the head)
if (*head == *event) {
- head = removeItem(event, head);
+ head = Event::removeItem(event, head);
return;
}
@@ -159,7 +159,7 @@ EventQueue::remove(Event *event)
// curr points to the top item of the the correct 'in bin' list, when
// we remove an item, it returns the new top item (which may be
// unchanged)
- prev->nextBin = removeItem(event, curr);
+ prev->nextBin = Event::removeItem(event, curr);
}
Event *