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

Change subject: systemc: Ensure the reset event is notified before reseting the target.
......................................................................

systemc: Ensure the reset event is notified before reseting the target.

The target may be the process which is currently running. In that case,
the reset method will end and never get to notifying the reset event.
To fix that, we need to notify the reset event first.

Change-Id: If3a9d87edc0999293a68d86d35989ae49eab3c07
Reviewed-on: https://gem5-review.googlesource.com/c/13187
Reviewed-by: Gabe Black <[email protected]>
Maintainer: Gabe Black <[email protected]>
---
M src/systemc/core/process.cc
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Gabe Black: Looks good to me, approved; Looks good to me, approved



diff --git a/src/systemc/core/process.cc b/src/systemc/core/process.cc
index 78bbf91..d8ed5ff 100644
--- a/src/systemc/core/process.cc
+++ b/src/systemc/core/process.cc
@@ -183,14 +183,14 @@
         return;


+    _resetEvent.notify();
+
     if (_needsStart) {
         scheduler.runNow(this);
     } else {
         _isUnwinding = true;
         injectException(resetException);
     }
-
-    _resetEvent.notify();
 }

 void

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