mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
cpu: Replace cpu_single_env with CPUState current_cpu
Move it to qom/cpu.h. Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
80b7cd7354
commit
4917cf4432
23 changed files with 120 additions and 115 deletions
|
@ -20,7 +20,6 @@
|
|||
#define CPU_ALL_H
|
||||
|
||||
#include "qemu-common.h"
|
||||
#include "qemu/tls.h"
|
||||
#include "exec/cpu-common.h"
|
||||
#include "qemu/thread.h"
|
||||
|
||||
|
@ -358,8 +357,6 @@ CPUArchState *cpu_copy(CPUArchState *env);
|
|||
void QEMU_NORETURN cpu_abort(CPUArchState *env, const char *fmt, ...)
|
||||
GCC_FMT_ATTR(2, 3);
|
||||
extern CPUArchState *first_cpu;
|
||||
DECLARE_TLS(CPUArchState *,cpu_single_env);
|
||||
#define cpu_single_env tls_var(cpu_single_env)
|
||||
|
||||
/* Flags for use in ENV->INTERRUPT_PENDING.
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "hw/qdev-core.h"
|
||||
#include "exec/hwaddr.h"
|
||||
#include "qemu/thread.h"
|
||||
#include "qemu/tls.h"
|
||||
#include "qemu/typedefs.h"
|
||||
|
||||
typedef int (*WriteCoreDumpFunction)(void *buf, size_t size, void *opaque);
|
||||
|
@ -156,6 +157,9 @@ struct CPUState {
|
|||
uint32_t halted; /* used by alpha, cris, ppc TCG */
|
||||
};
|
||||
|
||||
DECLARE_TLS(CPUState *, current_cpu);
|
||||
#define current_cpu tls_var(current_cpu)
|
||||
|
||||
/**
|
||||
* cpu_paging_enabled:
|
||||
* @cpu: The CPU whose state is to be inspected.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue