mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-23 16:35:30 +00:00
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:
parent
7f1d59bb83
commit
62045513bb
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue