systemc: Add a warning about dont_initialize and cthreads.
authorGabe Black <gabeblack@google.com>
Sun, 7 Oct 2018 03:34:27 +0000 (20:34 -0700)
committerGabe Black <gabeblack@google.com>
Tue, 16 Oct 2018 01:07:51 +0000 (01:07 +0000)
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>

src/systemc/core/sc_module.cc

index 77f0f83f32de49a1b79815c1dffbe23772fca1bd..df23de4e1b8577a97c7b89297d5936d0b0bd9147 100644 (file)
@@ -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