diff options
author | Gabe Black <gabeblack@google.com> | 2018-09-07 15:24:17 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2018-10-09 21:41:46 +0000 |
commit | 18b2e3b7c954b6b5916ba8c39e731e219277e5f4 (patch) | |
tree | e82e0df6806854c337298a25cccc9ecc5c81048c /src | |
parent | 5a5f768667736d683bd1555b72d410e32db307a3 (diff) | |
download | gem5-18b2e3b7c954b6b5916ba8c39e731e219277e5f4.tar.xz |
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 <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/systemc/core/event.cc | 5 |
1 files changed, 5 insertions, 0 deletions
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); |