sim-se: don't wake up threads that are halted on futex
authorCiro Santilli <ciro.santilli@arm.com>
Wed, 20 Nov 2019 16:51:47 +0000 (16:51 +0000)
committerCiro Santilli <ciro.santilli@arm.com>
Mon, 25 Nov 2019 12:02:11 +0000 (12:02 +0000)
commit7e488a91dccc9708501156d0bc4a45fad47f471d
tree92df0e7e8f85c15383fa3a8168ea6d58a715c106
parentcd096a6e17cbfe46ff637d34d1caa01b83e4864a
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>
src/sim/futex_map.hh