summaryrefslogtreecommitdiff
path: root/src/sim/futex_map.hh
diff options
context:
space:
mode:
authorCiro Santilli <ciro.santilli@arm.com>2019-11-20 16:51:47 +0000
committerCiro Santilli <ciro.santilli@arm.com>2019-11-25 12:02:11 +0000
commit7e488a91dccc9708501156d0bc4a45fad47f471d (patch)
tree92df0e7e8f85c15383fa3a8168ea6d58a715c106 /src/sim/futex_map.hh
parentcd096a6e17cbfe46ff637d34d1caa01b83e4864a (diff)
downloadgem5-7e488a91dccc9708501156d0bc4a45fad47f471d.tar.xz
sim-se: don't wake up threads that are halted on futex
At Ia6b4d3e6148c64721d810b8f1fffaa208a394b06 the futex wake up started skipping selecting threads that are already awake, which already prevented some deadlocks. However, threads that are Halting or Halted should not be woken up either, as those represent cores in which processes have already exited. Before this commit, this could lead an exited core to wake up, which would then immediately re-execute the exit syscall, and possibly leave one genuinely sleeping core locked and: Exiting @ tick 18446744073709551615 because simulate() limit reached Change-Id: I1531b56d605d47252dc0620bb3e755b7cf84df97 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22963 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Brandon Potter <Brandon.Potter@amd.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'src/sim/futex_map.hh')
-rw-r--r--src/sim/futex_map.hh2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sim/futex_map.hh b/src/sim/futex_map.hh
index 5e60f7c37..bbb484a5e 100644
--- a/src/sim/futex_map.hh
+++ b/src/sim/futex_map.hh
@@ -158,7 +158,7 @@ class FutexMap : public std::unordered_map<FutexKey, WaiterList>
// must only count threads that were actually
// woken up by this syscall.
auto& tc = waiterList.front().tc;
- if (tc->status() != ThreadContext::Active) {
+ if (tc->status() == ThreadContext::Suspended) {
tc->activate();
woken_up++;
}