aboutsummaryrefslogtreecommitdiff
path: root/include
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 /include
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 'include')
-rw-r--r--include/exec/cpu-all.h3
-rw-r--r--include/qom/cpu.h4
2 files changed, 4 insertions, 3 deletions
diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h
index 35bdf858f2..6760851139 100644
--- a/include/exec/cpu-all.h
+++ b/include/exec/cpu-all.h
@@ -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.
diff --git a/include/qom/cpu.h b/include/qom/cpu.h
index 7cb5e54cf2..d7fc1868d6 100644
--- a/include/qom/cpu.h
+++ b/include/qom/cpu.h
@@ -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.