mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-31 14:23:53 -06:00
cpu: Move jmp_env field from CPU_COMMON to CPUState
Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
8cd70437f3
commit
6f03bef0ff
4 changed files with 9 additions and 6 deletions
|
@ -28,7 +28,7 @@ void cpu_loop_exit(CPUArchState *env)
|
|||
CPUState *cpu = ENV_GET_CPU(env);
|
||||
|
||||
cpu->current_tb = NULL;
|
||||
siglongjmp(env->jmp_env, 1);
|
||||
siglongjmp(cpu->jmp_env, 1);
|
||||
}
|
||||
|
||||
/* exit the current TB from a signal handler. The host registers are
|
||||
|
@ -37,10 +37,12 @@ void cpu_loop_exit(CPUArchState *env)
|
|||
#if defined(CONFIG_SOFTMMU)
|
||||
void cpu_resume_from_signal(CPUArchState *env, void *puc)
|
||||
{
|
||||
CPUState *cpu = ENV_GET_CPU(env);
|
||||
|
||||
/* XXX: restore cpu registers saved in host registers */
|
||||
|
||||
env->exception_index = -1;
|
||||
siglongjmp(env->jmp_env, 1);
|
||||
siglongjmp(cpu->jmp_env, 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -284,7 +286,7 @@ int cpu_exec(CPUArchState *env)
|
|||
|
||||
/* prepare setjmp context for exception handling */
|
||||
for(;;) {
|
||||
if (sigsetjmp(env->jmp_env, 0) == 0) {
|
||||
if (sigsetjmp(cpu->jmp_env, 0) == 0) {
|
||||
/* if an exception is pending, we execute it here */
|
||||
if (env->exception_index >= 0) {
|
||||
if (env->exception_index >= EXCP_INTERRUPT) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue