diff options
Diffstat (limited to 'src/systemc')
-rw-r--r-- | src/systemc/core/process.cc | 1 | ||||
-rw-r--r-- | src/systemc/core/process.hh | 1 | ||||
-rw-r--r-- | src/systemc/core/scheduler.cc | 4 |
3 files changed, 5 insertions, 1 deletions
diff --git a/src/systemc/core/process.cc b/src/systemc/core/process.cc index 1a101f749..94e49a8af 100644 --- a/src/systemc/core/process.cc +++ b/src/systemc/core/process.cc @@ -320,6 +320,7 @@ Process::run() _isUnwinding = false; } } while (reset); + needsStart(true); } void diff --git a/src/systemc/core/process.hh b/src/systemc/core/process.hh index 17f417b6e..0cb3e3c01 100644 --- a/src/systemc/core/process.hh +++ b/src/systemc/core/process.hh @@ -271,6 +271,7 @@ class Process : public ::sc_core::sc_process_b, public ListNode public: virtual ::sc_core::sc_curr_proc_kind procKind() const = 0; bool needsStart() const { return _needsStart; } + void needsStart(bool ns) { _needsStart = ns; } bool dynamic() const { return _dynamic; } bool isUnwinding() const { return _isUnwinding; } void isUnwinding(bool v) { _isUnwinding = v; } diff --git a/src/systemc/core/scheduler.cc b/src/systemc/core/scheduler.cc index 2dc3aa74c..7851bac67 100644 --- a/src/systemc/core/scheduler.cc +++ b/src/systemc/core/scheduler.cc @@ -174,8 +174,10 @@ Scheduler::yield() // Fibers which aren't running should be parked at this line. _current->fiber()->run(); // If the current process needs to be manually started, start it. - if (_current && _current->needsStart()) + if (_current && _current->needsStart()) { + _current->needsStart(false); _current->run(); + } } if (_current && _current->excWrapper) { // Make sure this isn't a method process. |