From 6ae330055aa3ba8a5868ceba02bf40430a46caf3 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Wed, 26 Sep 2018 20:32:41 -0700 Subject: 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 Maintainer: Gabe Black --- src/systemc/core/process.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/systemc/core/process.cc b/src/systemc/core/process.cc index 78bbf91d5..d8ed5ffba 100644 --- a/src/systemc/core/process.cc +++ b/src/systemc/core/process.cc @@ -183,14 +183,14 @@ Process::reset(bool inc_kids) return; + _resetEvent.notify(); + if (_needsStart) { scheduler.runNow(this); } else { _isUnwinding = true; injectException(resetException); } - - _resetEvent.notify(); } void -- cgit v1.2.3