48c48
< SimExitEvent::process()
---
> SimLoopExitEvent::process()
50,54c50,54
< // This event does not autodelete because exitNow may be called,
< // and the function will never be allowed to finish.
< if (theQueue() == &mainEventQueue) {
< string _cause = cause;
< int _code = code;
---
> // if this got scheduled on a different queue (e.g. the committed
> // instruction queue) then make a corresponding event on the main
> // queue.
> if (theQueue() != &mainEventQueue) {
> exitSimLoop(cause, code);
56,59d55
< exitNow(_cause, _code);
< } else {
< new SimExitEvent(cause, code);
< delete this;
60a57,59
>
> // otherwise do nothing... the IsExitEvent flag takes care of
> // exiting the simulation loop and returning this object to Python
65c64
< SimExitEvent::description()
---
> SimLoopExitEvent::description()
67c66
< return "simulation termination";
---
> return "simulation loop exit";
69a69,80
> void
> exitSimLoop(Tick when, const std::string &message, int exit_code)
> {
> new SimLoopExitEvent(when, message, exit_code);
> }
>
> void
> exitSimLoop(const std::string &message, int exit_code)
> {
> exitSimLoop(curTick, message, exit_code);
> }
>
93c104
< new SimExitEvent(cause, 0);
---
> exitSimLoop(cause, 0);
122c133
< new SimExitEvent("Lack of swap space");
---
> exitSimLoop("Lack of swap space");