From daa4c7526acf97bf53b1cdfc6a4d6a327f1966dd Mon Sep 17 00:00:00 2001 From: Nilay Vaish Date: Thu, 5 Jan 2012 11:02:56 -0600 Subject: 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 --- src/sim/eventq.cc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/sim/eventq.cc') 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() { -- cgit v1.2.3