diff options
author | Gabe Black <gabeblack@google.com> | 2018-08-29 00:18:23 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2018-10-03 00:15:14 +0000 |
commit | 8fdda3b2d8eb12b3c26cce8f38ce6ea4f525fa69 (patch) | |
tree | 63a6a1a854a929a0aaa12b7db62532ee83a5f85c /src/systemc/core/process.cc | |
parent | c599dfdfcd37934ae8756f421953ceeb37661a1f (diff) | |
download | gem5-8fdda3b2d8eb12b3c26cce8f38ce6ea4f525fa69.tar.xz |
systemc: Make Process track whether it's dynamic on its own.
Processes which are created in end_of_elaboration aren't created with
sc_spawn but still need to figure out if they're dynamic. Rather than
duplicate the check in sc_spawn, this change centralizes it in the
Process class itself.
Change-Id: I763d5a0fa89a72fbc82346b6ce2eed852ee72524
Reviewed-on: https://gem5-review.googlesource.com/c/12443
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/systemc/core/process.cc')
-rw-r--r-- | src/systemc/core/process.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/systemc/core/process.cc b/src/systemc/core/process.cc index 0784ab49f..830b8c729 100644 --- a/src/systemc/core/process.cc +++ b/src/systemc/core/process.cc @@ -390,13 +390,15 @@ Process::lastReport(::sc_core::sc_report *report) ::sc_core::sc_report *Process::lastReport() const { return _lastReport.get(); } -Process::Process(const char *name, ProcessFuncWrapper *func, bool _dynamic) : +Process::Process(const char *name, ProcessFuncWrapper *func) : ::sc_core::sc_process_b(name), excWrapper(nullptr), func(func), - _needsStart(true), _dynamic(_dynamic), _isUnwinding(false), - _terminated(false), _suspended(false), _disabled(false), - _syncReset(false), refCount(0), stackSize(::Fiber::DefaultStackSize), - dynamicSensitivity(nullptr) + _needsStart(true), _isUnwinding(false), _terminated(false), + _suspended(false), _disabled(false), _syncReset(false), refCount(0), + stackSize(::Fiber::DefaultStackSize), dynamicSensitivity(nullptr) { + _dynamic = + (::sc_core::sc_get_status() > + ::sc_core::SC_BEFORE_END_OF_ELABORATION); _newest = this; } |