summaryrefslogtreecommitdiff
path: root/src/systemc
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-10-06 20:34:27 -0700
committerGabe Black <gabeblack@google.com>2018-10-16 01:07:51 +0000
commit7911f271e852cc54a9591fce582bc8f4eb427a5e (patch)
tree1fc35018d063a6322d4943822584a7c747a2a0d8 /src/systemc
parent0b49ab94b267af7231141b0c992099a3be723ab7 (diff)
downloadgem5-7911f271e852cc54a9591fce582bc8f4eb427a5e.tar.xz
systemc: Add a warning about dont_initialize and cthreads.
Change-Id: I7cc3e571a7a63eed383ad7f897342a539318f961 Reviewed-on: https://gem5-review.googlesource.com/c/13321 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/systemc')
-rw-r--r--src/systemc/core/sc_module.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/systemc/core/sc_module.cc b/src/systemc/core/sc_module.cc
index 77f0f83f3..df23de4e1 100644
--- a/src/systemc/core/sc_module.cc
+++ b/src/systemc/core/sc_module.cc
@@ -338,7 +338,12 @@ sc_module::async_reset_signal_is(const sc_signal_in_if<bool> &signal, bool val)
void
sc_module::dont_initialize()
{
- ::sc_gem5::Process::newest()->dontInitialize(true);
+ ::sc_gem5::Process *p = ::sc_gem5::Process::newest();
+ if (p->procKind() == SC_CTHREAD_PROC_) {
+ SC_REPORT_WARNING("(W524) dont_initialize() has no effect for "
+ "SC_CTHREADs", "");
+ }
+ p->dontInitialize(true);
}
void