diff options
author | Gabe Black <gabeblack@google.com> | 2018-09-22 06:35:06 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2018-10-16 00:28:49 +0000 |
commit | 0c3d23437a9961b46cb6e7f4150834f2345ed9fc (patch) | |
tree | e2313a89ff6635e9c17610b8b30231521d68936f /src/systemc/core/sc_join.cc | |
parent | 2ede803d7c29065c1e42442b495f773c03c68270 (diff) | |
download | gem5-0c3d23437a9961b46cb6e7f4150834f2345ed9fc.tar.xz |
systemc: Check the process type when using sc_join.
Method processes aren't allowed in an sc_join.
Change-Id: I5c8421a396dbe261645a074df514f69fc652c9c8
Reviewed-on: https://gem5-review.googlesource.com/c/12968
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/systemc/core/sc_join.cc')
-rw-r--r-- | src/systemc/core/sc_join.cc | 7 |
1 files changed, 7 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); } |