summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-09-26 20:32:41 -0700
committerGabe Black <gabeblack@google.com>2018-10-16 00:36:27 +0000
commit6ae330055aa3ba8a5868ceba02bf40430a46caf3 (patch)
tree3fb2c907d580c51ba42179aec7a13876ab564875
parent0cfce458003c377878aad3b15cf5fa2860a5f8e7 (diff)
downloadgem5-6ae330055aa3ba8a5868ceba02bf40430a46caf3.tar.xz
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 <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
-rw-r--r--src/systemc/core/process.cc4
1 files 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