summaryrefslogtreecommitdiff
path: root/src/systemc
diff options
context:
space:
mode:
Diffstat (limited to 'src/systemc')
-rw-r--r--src/systemc/core/sc_join.cc7
-rw-r--r--src/systemc/tests/systemc/kernel/dynamic_processes/test04/expected_returncode1
2 files changed, 8 insertions, 0 deletions
diff --git a/src/systemc/core/sc_join.cc b/src/systemc/core/sc_join.cc
index 3e4c6eec4..3c27eaa42 100644
--- a/src/systemc/core/sc_join.cc
+++ b/src/systemc/core/sc_join.cc
@@ -32,6 +32,7 @@
#include "systemc/ext/core/sc_event.hh"
#include "systemc/ext/core/sc_join.hh"
#include "systemc/ext/core/sc_module.hh"
+#include "systemc/ext/utils/sc_report_handler.hh"
namespace sc_core
{
@@ -44,6 +45,12 @@ sc_join::add_process(sc_process_handle h)
auto p = (::sc_gem5::Process *)h;
assert(p);
+ if (p->procKind() == SC_METHOD_PROC_) {
+ SC_REPORT_ERROR("(E561) Attempt to register method process "
+ "with sc_join object", "");
+ return;
+ }
+
remaining++;
p->joinWait(this);
}
diff --git a/src/systemc/tests/systemc/kernel/dynamic_processes/test04/expected_returncode b/src/systemc/tests/systemc/kernel/dynamic_processes/test04/expected_returncode
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/src/systemc/tests/systemc/kernel/dynamic_processes/test04/expected_returncode
@@ -0,0 +1 @@
+1