From 18b2e3b7c954b6b5916ba8c39e731e219277e5f4 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Fri, 7 Sep 2018 15:24:17 -0700 Subject: [PATCH] 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 Maintainer: Gabe Black --- src/systemc/core/event.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/systemc/core/event.cc b/src/systemc/core/event.cc index e91df1528..61fa80c8b 100644 --- a/src/systemc/core/event.cc +++ b/src/systemc/core/event.cc @@ -136,6 +136,11 @@ Event::getParentObject() const 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); -- 2.30.2