34a35,36
> #include "systemc/ext/core/sc_process_handle.hh"
> #include "systemc/ext/utils/sc_report_handler.hh"
204c206
< _terminated = true;
---
> terminate();
206,208d207
< _suspendedReady = false;
< _suspended = false;
< _syncReset = false;
210,211c209,210
< // Inject the kill exception into this process.
< injectException(killException);
---
> // Make sure this process isn't marked ready
> popListNode();
212a212,215
> // Inject the kill exception into this process if it's started.
> if (!_needsStart)
> injectException(killException);
>
227,228d229
< // Update our state.
< _isUnwinding = true;
230,231c231,236
< // Inject the reset exception into this process.
< injectException(resetException);
---
> if (_needsStart) {
> scheduler.runNow(this);
> } else {
> _isUnwinding = true;
> injectException(resetException);
> }
240a246,249
>
> // Only inject an exception into threads that have started.
> if (!_needsStart)
> injectException(exc);
298d306
< _terminated = true;
349,350c357
< Process::Process(const char *name, ProcessFuncWrapper *func,
< bool _dynamic, bool needs_start) :
---
> Process::Process(const char *name, ProcessFuncWrapper *func, bool _dynamic) :
352c359
< _needsStart(needs_start), _dynamic(_dynamic), _isUnwinding(false),
---
> _needsStart(true), _dynamic(_dynamic), _isUnwinding(false),
359a367,380
> void
> Process::terminate()
> {
> _terminated = true;
> _suspendedReady = false;
> _suspended = false;
> _syncReset = false;
> delete dynamicSensitivity;
> dynamicSensitivity = nullptr;
> for (auto s: staticSensitivities)
> delete s;
> staticSensitivities.clear();
> }
>