From 9f177a190b5114554d0138c82b08c83f3063d91e Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Tue, 21 Aug 2018 18:59:13 -0700 Subject: [PATCH] systemc: Make sure an immediate notification overrides a delayed one. If an event has a delayed notification pending, that should be cleared if it's later notified immediately. Change-Id: I4272f6b47a41d80756769f3fe69069a00016dbd6 Reviewed-on: https://gem5-review.googlesource.com/12223 Reviewed-by: Gabe Black Maintainer: Gabe Black --- src/systemc/core/event.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/systemc/core/event.cc b/src/systemc/core/event.cc index 6e35da1c8..77e47fba6 100644 --- a/src/systemc/core/event.cc +++ b/src/systemc/core/event.cc @@ -122,6 +122,10 @@ Event::getParentObject() const void Event::notify() { + // An immediate notification overrides any pending delayed notification. + if (delayedNotify.scheduled()) + scheduler.deschedule(&delayedNotify); + auto local_sensitivities = sensitivities; for (auto s: local_sensitivities) s->notify(this); -- 2.30.2