Gabe Black has submitted this change and it was merged. ( https://gem5-review.googlesource.com/c/public/gem5/+/13321 )

Change subject: systemc: Add a warning about dont_initialize and cthreads.
......................................................................

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 <[email protected]>
Maintainer: Gabe Black <[email protected]>
---
M src/systemc/core/sc_module.cc
1 file changed, 6 insertions(+), 1 deletion(-)

Approvals:
  Gabe Black: Looks good to me, approved; Looks good to me, approved



diff --git a/src/systemc/core/sc_module.cc b/src/systemc/core/sc_module.cc
index 77f0f83..df23de4 100644
--- a/src/systemc/core/sc_module.cc
+++ b/src/systemc/core/sc_module.cc
@@ -338,7 +338,12 @@
 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

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/13321
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I7cc3e571a7a63eed383ad7f897342a539318f961
Gerrit-Change-Number: 13321
Gerrit-PatchSet: 4
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Matthias Jung <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to