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>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
1
|
||||
Reference in New Issue
Block a user