summaryrefslogtreecommitdiff
path: root/src/systemc
diff options
context:
space:
mode:
Diffstat (limited to 'src/systemc')
-rw-r--r--src/systemc/core/process.cc12
-rw-r--r--src/systemc/core/process.hh2
-rw-r--r--src/systemc/core/process_types.hh11
-rw-r--r--src/systemc/core/sc_spawn.cc8
4 files changed, 14 insertions, 19 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;
}
diff --git a/src/systemc/core/process.hh b/src/systemc/core/process.hh
index 0cb3e3c01..0d852afdb 100644
--- a/src/systemc/core/process.hh
+++ b/src/systemc/core/process.hh
@@ -327,7 +327,7 @@ class Process : public ::sc_core::sc_process_b, public ListNode
::sc_core::sc_report *lastReport() const;
protected:
- Process(const char *name, ProcessFuncWrapper *func, bool _dynamic);
+ Process(const char *name, ProcessFuncWrapper *func);
static Process *_newest;
diff --git a/src/systemc/core/process_types.hh b/src/systemc/core/process_types.hh
index 2dde4672a..5fbab8038 100644
--- a/src/systemc/core/process_types.hh
+++ b/src/systemc/core/process_types.hh
@@ -39,9 +39,7 @@ namespace sc_gem5
class Method : public Process
{
public:
- Method(const char *name, ProcessFuncWrapper *func, bool _dynamic=false) :
- Process(name, func, _dynamic)
- {}
+ Method(const char *name, ProcessFuncWrapper *func) : Process(name, func) {}
const char *kind() const override { return "sc_method_process"; }
@@ -55,8 +53,8 @@ class Method : public Process
class Thread : public Process
{
public:
- Thread(const char *name, ProcessFuncWrapper *func, bool _dynamic=false) :
- Process(name, func, _dynamic), ctx(nullptr)
+ Thread(const char *name, ProcessFuncWrapper *func) :
+ Process(name, func), ctx(nullptr)
{}
~Thread() { delete ctx; }
@@ -105,8 +103,7 @@ class Thread : public Process
class CThread : public Thread
{
public:
- CThread(const char *name, ProcessFuncWrapper *func, bool _dynamic=false) :
- Thread(name, func, _dynamic)
+ CThread(const char *name, ProcessFuncWrapper *func) : Thread(name, func)
{
// We'll be in the initialization list now, but we shouldn't be.
popListNode();
diff --git a/src/systemc/core/sc_spawn.cc b/src/systemc/core/sc_spawn.cc
index 054feb8da..b0570a663 100644
--- a/src/systemc/core/sc_spawn.cc
+++ b/src/systemc/core/sc_spawn.cc
@@ -60,15 +60,11 @@ spawnWork(ProcessFuncWrapper *func, const char *name,
name = ::sc_core::sc_gen_unique_name("thread_p");
}
- bool dynamic =
- (::sc_core::sc_get_status() >
- ::sc_core::SC_BEFORE_END_OF_ELABORATION);
-
Process *proc;
if (method)
- proc = new Method(name, func, dynamic);
+ proc = new Method(name, func);
else
- proc = new Thread(name, func, dynamic);
+ proc = new Thread(name, func);
if (opts) {
for (auto e: opts->_events)