89,91d88
<
< if (stopAfterCallbacks)
< stopWork();
97c94
< if (scMainDone)
---
> if (scMainDone || stopAfterCallbacks)
116,118d112
<
< if (stopAfterCallbacks)
< stopWork();
126a121,125
> schedule(t0Event, curTick());
>
> if (stopAfterCallbacks)
> return;
>
145d143
< schedule(t0Event, curTick());
181,183c179,186
< ::sc_gem5::scheduler.initPhase();
<
< status(::sc_core::SC_RUNNING);
---
> if (stopAfterCallbacks) {
> scheduler.clear();
> ::sc_gem5::scheduler.initPhase();
> scheduler.scheduleStop(false);
> } else {
> ::sc_gem5::scheduler.initPhase();
> status(::sc_core::SC_RUNNING);
> }