Gabe Black has submitted this change and it was merged. ( https://gem5-review.googlesource.com/c/public/gem5/+/12223 )

Change subject: systemc: Make sure an immediate notification overrides a delayed one.
......................................................................

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 <[email protected]>
Maintainer: Gabe Black <[email protected]>
---
M src/systemc/core/event.cc
1 file changed, 4 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 6e35da1..77e47fb 100644
--- a/src/systemc/core/event.cc
+++ b/src/systemc/core/event.cc
@@ -122,6 +122,10 @@
 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);

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/12223
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: I4272f6b47a41d80756769f3fe69069a00016dbd6
Gerrit-Change-Number: 12223
Gerrit-PatchSet: 11
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Gabe Black <[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

Reply via email to