From: Gabe Black Date: Thu, 27 Sep 2018 03:32:41 +0000 (-0700) Subject: systemc: Ensure the reset event is notified before reseting the target. X-Git-Tag: v19.0.0.0~1558 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6ae330055aa3ba8a5868ceba02bf40430a46caf3;p=gem5.git 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 --- 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