aboutsummaryrefslogtreecommitdiff
path: root/cpu-exec.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2015-08-18 06:43:15 -0700
committerPaolo Bonzini <pbonzini@redhat.com>2015-09-09 15:34:54 +0200
commitaed807c8e2bf009b2c6a35490d4fd4383887221d (patch)
tree60cba0fab56d081be6209dd20ed7c857f09778d3 /cpu-exec.c
parentab096a75cd626dcd4ad34b2a11652df0269bee0d (diff)
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. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'cpu-exec.c')
-rw-r--r--cpu-exec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cpu-exec.c b/cpu-exec.c
index e24c640013..ef9d74552e 100644
--- a/cpu-exec.c
+++ b/cpu-exec.c
@@ -372,7 +372,7 @@ int cpu_exec(CPUState *cpu)
atomic_mb_set(&tcg_current_cpu, cpu);
rcu_read_lock();
- if (unlikely(exit_request)) {
+ if (unlikely(atomic_mb_read(&exit_request))) {
cpu->exit_request = 1;
}