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
return true;
}
+Event*
+EventQueue::replaceHead(Event* s)
+{
+ Event* t = head;
+ head = s;
+ return t;
+}
+
void
dumpMainQueue()
{
bool debugVerify() const;
+ /**
+ * function for replacing the head of the event queue, so that a
+ * different set of events can run without disturbing events that have
+ * already been scheduled. Already scheduled events can be processed
+ * by replacing the original head back.
+ * USING THIS FUNCTION CAN BE DANGEROUS TO THE HEALTH OF THE SIMULATOR.
+ * NOT RECOMMENDED FOR USE.
+ */
+ Event* replaceHead(Event* s);
+
#ifndef SWIG
virtual void serialize(std::ostream &os);
virtual void unserialize(Checkpoint *cp, const std::string §ion);