tcg: synchronize exit_request and tcg_current_cpu accesses

Synchronize the remaining pair of accesses in cpu_signal. These should
be necessary on Windows as well, at least in theory. Probably
SuspendProcess and ResumeProcess introduce some implicit memory
barrier.

Backports relevant parts of commit aed807c8e2bf009b2c6a35490d4fd4383887221d from qemu
This commit is contained in:
Paolo Bonzini 2018-02-15 13:13:06 -05:00 committed by Lioncash
parent 7f1d59bb83
commit 62045513bb
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -90,7 +90,7 @@ int cpu_exec(struct uc_struct *uc, CPUState *cpu)
uc->current_cpu = cpu;
atomic_mb_set(&uc->tcg_current_cpu, cpu);
if (unlikely(uc->exit_request)) {
if (unlikely(atomic_mb_read(&uc->exit_request))) {
cpu->exit_request = 1;
}