summaryrefslogtreecommitdiff
path: root/src/systemc/core/process_types.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/systemc/core/process_types.hh')
-rw-r--r--src/systemc/core/process_types.hh13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/systemc/core/process_types.hh b/src/systemc/core/process_types.hh
index 369fa726e..7617d41ef 100644
--- a/src/systemc/core/process_types.hh
+++ b/src/systemc/core/process_types.hh
@@ -40,7 +40,7 @@ class Method : public Process
{
public:
Method(const char *name, ProcessFuncWrapper *func, bool _dynamic=false) :
- Process(name, func, _dynamic, true)
+ Process(name, func, _dynamic)
{}
const char *kind() const override { return "sc_method_process"; }
@@ -56,7 +56,7 @@ class Thread : public Process
{
public:
Thread(const char *name, ProcessFuncWrapper *func, bool _dynamic=false) :
- Process(name, func, _dynamic, false), ctx(nullptr)
+ Process(name, func, _dynamic), ctx(nullptr)
{}
~Thread() { delete ctx; }
@@ -88,8 +88,15 @@ class Thread : public Process
private:
Thread *thread;
- void main() override { thread->run(); }
+ void
+ main() override
+ {
+ thread->_needsStart = false;
+ thread->run();
+ thread->terminate();
+ }
};
+ friend class Context;
Context *ctx;
};