Austin Harris has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/50710 )
Change subject: sim: Fix hang while terminating threads with fork
......................................................................
sim: Fix hang while terminating threads with fork
It is possible that gem5 is forked multiple times before the threads are
re-created, so don't wait for the barrier if the threads were already
terminated.
Change-Id: Ia04db2f3b1341c4d432178a37812fd882e148ec2
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50710
Reviewed-by: Andreas Sandberg <andreas.sandb...@arm.com>
Maintainer: Andreas Sandberg <andreas.sandb...@arm.com>
Tested-by: kokoro <noreply+kok...@google.com>
---
M src/sim/simulate.cc
1 file changed, 2 insertions(+), 0 deletions(-)
Approvals:
Andreas Sandberg: Looks good to me, approved; Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/sim/simulate.cc b/src/sim/simulate.cc
index ec46cbf..c5d0794 100644
--- a/src/sim/simulate.cc
+++ b/src/sim/simulate.cc
@@ -118,6 +118,8 @@
terminateThreads()
{
assert(!terminate);
+ if (threads.empty())
+ return;
/* This function should only be called when the simulator is
* handling a global exit event (typically from Python). This
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/50710
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Ia04db2f3b1341c4d432178a37812fd882e148ec2
Gerrit-Change-Number: 50710
Gerrit-PatchSet: 2
Gerrit-Owner: Austin Harris <m...@austin-harris.com>
Gerrit-Reviewer: Andreas Sandberg <andreas.sandb...@arm.com>
Gerrit-Reviewer: Austin Harris <m...@austin-harris.com>
Gerrit-Reviewer: Jason Lowe-Power <ja...@lowepower.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s