OSDN Git Service

accel/tcg: Split out cpu_exec_{setjmp,loop}
authorRichard Henderson <richard.henderson@linaro.org>
Sat, 7 Jan 2023 18:12:51 +0000 (10:12 -0800)
committerRichard Henderson <richard.henderson@linaro.org>
Mon, 16 Jan 2023 20:14:12 +0000 (10:14 -1000)
commit61710a7e23a63546da0071ea32adb96476fa5d07
tree293b0ada5765b7d0076fc05f8d80254e7673cc08
parent701ea5870d3752173d0c78d79d9d1f57757a8036
accel/tcg: Split out cpu_exec_{setjmp,loop}

Recently the g_assert(cpu == current_cpu) test has been
intermittently failing with gcc.  Reorg the code around
the setjmp to minimize the lifetime of the cpu variable
affected by the setjmp.

This appears to fix the existing issue with clang as well.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1147
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
accel/tcg/cpu-exec.c