diff -r 43c86c75a9de -r 38273543edc3 src/sim/eventq.hh --- a/src/sim/eventq.hh Wed Jan 04 15:03:18 2012 -0600 +++ b/src/sim/eventq.hh Wed Jan 04 15:03:19 2012 -0600 @@ -408,6 +408,14 @@ 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); diff -r 43c86c75a9de -r 38273543edc3 src/sim/eventq.cc --- a/src/sim/eventq.cc Wed Jan 04 15:03:18 2012 -0600 +++ b/src/sim/eventq.cc Wed Jan 04 15:03:19 2012 -0600 @@ -373,6 +373,14 @@ return true; } +Event* +EventQueue::replaceHead(Event* s) +{ + Event* t = head; + head = s; + return t; +} + void dumpMainQueue() {