Gabe Black has submitted this change and it was merged. (
https://gem5-review.googlesource.com/c/public/gem5/+/12606 )
Change subject: systemc: Report an error if notifying during the update
phase.
......................................................................
systemc: Report an error if notifying during the update phase.
Change-Id: If261c7a981a247884f0a6466756966b454f197f4
Reviewed-on: https://gem5-review.googlesource.com/c/12606
Reviewed-by: Gabe Black <[email protected]>
Maintainer: Gabe Black <[email protected]>
---
M src/systemc/core/event.cc
1 file changed, 5 insertions(+), 0 deletions(-)
Approvals:
Gabe Black: Looks good to me, approved; Looks good to me, approved
diff --git a/src/systemc/core/event.cc b/src/systemc/core/event.cc
index e91df15..61fa80c 100644
--- a/src/systemc/core/event.cc
+++ b/src/systemc/core/event.cc
@@ -136,6 +136,11 @@
void
Event::notify()
{
+ if (scheduler.inUpdate()) {
+ SC_REPORT_ERROR("(E521) immediate notification is not allowed "
+ "during update phase or elaboration", "");
+ }
+
// An immediate notification overrides any pending delayed
notification.
if (delayedNotify.scheduled())
scheduler.deschedule(&delayedNotify);
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/12606
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: If261c7a981a247884f0a6466756966b454f197f4
Gerrit-Change-Number: 12606
Gerrit-PatchSet: 8
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