aboutsummaryrefslogtreecommitdiff
path: root/cpu-exec-common.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2016-06-29 22:12:55 -0700
committerRichard Henderson <rth@twiddle.net>2016-10-26 08:29:00 -0700
commitfdbc2b5722f6092e47181a947c90fd4bdcc1c121 (patch)
treee28acccae721a37200503f6983edf56b42b9d4a4 /cpu-exec-common.c
parent1edaeee0955fba7d834b7c8f4e372e7eae030745 (diff)
tcg: Add EXCP_ATOMIC
When we cannot emulate an atomic operation within a parallel context, this exception allows us to stop the world and try again in a serial context. Reviewed-by: Emilio G. Cota <cota@braap.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'cpu-exec-common.c')
-rw-r--r--cpu-exec-common.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/cpu-exec-common.c b/cpu-exec-common.c
index 0cb4ae60ef..767d9c6f0c 100644
--- a/cpu-exec-common.c
+++ b/cpu-exec-common.c
@@ -77,3 +77,9 @@ void cpu_loop_exit_restore(CPUState *cpu, uintptr_t pc)
}
siglongjmp(cpu->jmp_env, 1);
}
+
+void cpu_loop_exit_atomic(CPUState *cpu, uintptr_t pc)
+{
+ cpu->exception_index = EXCP_ATOMIC;
+ cpu_loop_exit_restore(cpu, pc);
+}