changeset 9abcc140f346 in /z/repo/m5
details: http://repo.m5sim.org/m5?cmd=changeset;node=9abcc140f346
description:
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:
2 files changed, 2 deletions(-)
src/sim/eventq.cc | 1 -
src/sim/eventq.hh | 1 -
diffs (70 lines):
diff -r 1acb7016d0e4 -r 9abcc140f346 src/sim/eventq.cc
--- a/src/sim/eventq.cc Thu Oct 09 04:58:23 2008 -0700
+++ b/src/sim/eventq.cc Thu Oct 09 04:58:23 2008 -0700
@@ -57,8 +57,8 @@
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 @@
{
// Deal with the head case
if (!head || *event <= *head) {
- head = insertBefore(event, head);
+ head = Event::insertBefore(event, head);
return;
}
@@ -98,11 +98,11 @@
// 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 @@
// 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 @@
// 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 *
diff -r 1acb7016d0e4 -r 9abcc140f346 src/sim/eventq.hh
--- a/src/sim/eventq.hh Thu Oct 09 04:58:23 2008 -0700
+++ b/src/sim/eventq.hh Thu Oct 09 04:58:23 2008 -0700
@@ -87,8 +87,8 @@
Event *nextBin;
Event *nextInBin;
- friend Event *insertBefore(Event *event, Event *curr);
- friend Event *removeItem(Event *event, Event *last);
+ static Event *insertBefore(Event *event, Event *curr);
+ static Event *removeItem(Event *event, Event *last);
/// queue to which this event belongs (though it may or may not be
/// scheduled on this queue yet)
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev