aboutsummaryrefslogtreecommitdiff
path: root/cpus.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpus.c')
-rw-r--r--cpus.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/cpus.c b/cpus.c
index 363d392cd9..e566297bd3 100644
--- a/cpus.c
+++ b/cpus.c
@@ -854,12 +854,6 @@ static void *qemu_dummy_cpu_thread_fn(void *arg)
static void tcg_exec_all(void);
-static void tcg_signal_cpu_creation(CPUState *cpu, void *data)
-{
- cpu->thread_id = qemu_get_thread_id();
- cpu->created = true;
-}
-
static void *qemu_tcg_cpu_thread_fn(void *arg)
{
CPUState *cpu = arg;
@@ -868,7 +862,10 @@ static void *qemu_tcg_cpu_thread_fn(void *arg)
qemu_thread_get_self(cpu->thread);
qemu_mutex_lock(&qemu_global_mutex);
- qemu_for_each_cpu(tcg_signal_cpu_creation, NULL);
+ CPU_FOREACH(cpu) {
+ cpu->thread_id = qemu_get_thread_id();
+ cpu->created = true;
+ }
qemu_cond_signal(&qemu_cpu_cond);
/* wait for initial kick-off after machine start */