diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2023-09-13 17:22:49 -0700 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2023-10-04 11:03:54 -0700 |
commit | b77af26e973705e8fd96cff102fc978ee44043da (patch) | |
tree | 5da84b6520fbcf44ef8d9af06307785744eef835 /bsd-user | |
parent | ad75a51e84af9638e4ec51aa1e6ec5f3ff642558 (diff) |
accel/tcg: Replace CPUState.env_ptr with cpu_env()
Reviewed-by: Anton Johansson <anjo@rev.ng>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'bsd-user')
-rw-r--r-- | bsd-user/main.c | 2 | ||||
-rw-r--r-- | bsd-user/signal.c | 9 |
2 files changed, 5 insertions, 6 deletions
diff --git a/bsd-user/main.c b/bsd-user/main.c index f913cb55a7..6c9addb75a 100644 --- a/bsd-user/main.c +++ b/bsd-user/main.c @@ -462,7 +462,7 @@ int main(int argc, char **argv) ac->init_machine(NULL); } cpu = cpu_create(cpu_type); - env = cpu->env_ptr; + env = cpu_env(cpu); cpu_reset(cpu); thread_cpu = cpu; diff --git a/bsd-user/signal.c b/bsd-user/signal.c index b6beab659e..4109aa5043 100644 --- a/bsd-user/signal.c +++ b/bsd-user/signal.c @@ -351,8 +351,8 @@ static int core_dump_signal(int sig) static G_NORETURN void dump_core_and_abort(int target_sig) { - CPUArchState *env = thread_cpu->env_ptr; - CPUState *cpu = env_cpu(env); + CPUState *cpu = thread_cpu; + CPUArchState *env = cpu_env(cpu); TaskState *ts = cpu->opaque; int core_dumped = 0; int host_sig; @@ -457,7 +457,7 @@ static int fatal_signal(int sig) void force_sig_fault(int sig, int code, abi_ulong addr) { CPUState *cpu = thread_cpu; - CPUArchState *env = cpu->env_ptr; + CPUArchState *env = cpu_env(cpu); target_siginfo_t info = {}; info.si_signo = sig; @@ -469,8 +469,7 @@ void force_sig_fault(int sig, int code, abi_ulong addr) static void host_signal_handler(int host_sig, siginfo_t *info, void *puc) { - CPUArchState *env = thread_cpu->env_ptr; - CPUState *cpu = env_cpu(env); + CPUState *cpu = thread_cpu; TaskState *ts = cpu->opaque; target_siginfo_t tinfo; ucontext_t *uc = puc; |