30a31
> #include "systemc/core/scheduler.hh"
82,83c83,85
< if (procKind() != ::sc_core::SC_METHOD_PROC_ /* && we're running */) {
< // We suspended this thread or cthread. Stop running.
---
> if (procKind() != ::sc_core::SC_METHOD_PROC_ &&
> scheduler.current() == this) {
> scheduler.yield();
192c194
< Thread::throw_it(ExceptionWrapperBase &exc, bool inc_kids)
---
> Process::run()
194c196,207
< Process::throw_it(exc, inc_kids);
---
> _running = true;
> bool reset;
> do {
> reset = false;
> try {
> func->call();
> } catch(::sc_core::sc_unwind_exception exc) {
> reset = exc.is_reset();
> }
> } while (reset);
> _running = false;
> }
196,199c209,217
< if (_terminated)
< return;
<
< injectException(exc);
---
> Process::Process(const char *name, ProcessFuncWrapper *func, bool _dynamic) :
> ::sc_core::sc_object(name), excWrapper(nullptr), func(func),
> _running(false), _dynamic(_dynamic), _isUnwinding(false),
> _terminated(false), _suspended(false), _disabled(false),
> _syncReset(false), refCount(0), stackSize(::Fiber::DefaultStackSize)
> {
> _newest = this;
> if (!_dynamic)
> scheduler.init(this);
201a220,221
> Process *Process::_newest;
>