aboutsummaryrefslogtreecommitdiff
path: root/user-exec.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-05-27 05:17:50 +0200
committerAndreas Färber <afaerber@suse.de>2013-07-09 21:20:28 +0200
commit4917cf44326a1bda2fd7f27303aff7a25ad86518 (patch)
treed9c153504b0806990d0c5646c886e16150835d1a /user-exec.c
parent80b7cd735417b0883a026d79a513629a2817cdb4 (diff)
cpu: Replace cpu_single_env with CPUState current_cpu
Move it to qom/cpu.h. Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'user-exec.c')
-rw-r--r--user-exec.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/user-exec.c b/user-exec.c
index fa7f1f1de9..26cde7c57c 100644
--- a/user-exec.c
+++ b/user-exec.c
@@ -81,6 +81,7 @@ static inline int handle_cpu_signal(uintptr_t pc, unsigned long address,
int is_write, sigset_t *old_set,
void *puc)
{
+ CPUArchState *env;
int ret;
#if defined(DEBUG_SIGNAL)
@@ -93,9 +94,9 @@ static inline int handle_cpu_signal(uintptr_t pc, unsigned long address,
return 1;
}
+ env = current_cpu->env_ptr;
/* see if it is an MMU fault */
- ret = cpu_handle_mmu_fault(cpu_single_env, address, is_write,
- MMU_USER_IDX);
+ ret = cpu_handle_mmu_fault(env, address, is_write, MMU_USER_IDX);
if (ret < 0) {
return 0; /* not an MMU fault */
}
@@ -103,12 +104,12 @@ static inline int handle_cpu_signal(uintptr_t pc, unsigned long address,
return 1; /* the MMU fault was handled without causing real CPU fault */
}
/* now we have a real cpu fault */
- cpu_restore_state(cpu_single_env, pc);
+ cpu_restore_state(env, pc);
/* we restore the process signal mask as the sigreturn should
do it (XXX: use sigsetjmp) */
sigprocmask(SIG_SETMASK, old_set, NULL);
- exception_action(cpu_single_env);
+ exception_action(env);
/* never comes here */
return 1;