From: Gabe Black Date: Wed, 22 Aug 2018 01:59:13 +0000 (-0700) Subject: systemc: Make sure an immediate notification overrides a delayed one. X-Git-Tag: v19.0.0.0~1746 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9f177a190b5114554d0138c82b08c83f3063d91e;p=gem5.git 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 --- 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);