summaryrefslogtreecommitdiff
path: root/src/sim/eventq.cc
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2012-01-05 11:02:56 -0600
committerNilay Vaish <nilay@cs.wisc.edu>2012-01-05 11:02:56 -0600
commitdaa4c7526acf97bf53b1cdfc6a4d6a327f1966dd (patch)
tree30c1b54ea6e0acb2f8c2fc2c2c65c3a07935a1e3 /src/sim/eventq.cc
parentd3aa01eed9972bf1e20e3a6888b27f648a4730da (diff)
downloadgem5-daa4c7526acf97bf53b1cdfc6a4d6a327f1966dd.tar.xz
eventq: add a function for replacing head of the queue
This patch adds a function for replacing the event at the head of the queue with another event. This helps in running a different set of events. Events already scheduled can processed by replacing the original head event back. This function has been specifically added to support cache warmup and cooldown required for creating and restoring checkpoints. --HG-- extra : rebase_source : ed6e2905720b6bfdefd020fab76235ccf33d28d1
Diffstat (limited to 'src/sim/eventq.cc')
-rw-r--r--src/sim/eventq.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/sim/eventq.cc b/src/sim/eventq.cc
index 78524fe51..b389efcf2 100644
--- a/src/sim/eventq.cc
+++ b/src/sim/eventq.cc
@@ -373,6 +373,14 @@ EventQueue::debugVerify() const
return true;
}
+Event*
+EventQueue::replaceHead(Event* s)
+{
+ Event* t = head;
+ head = s;
+ return t;
+}
+
void
dumpMainQueue()
{