From 38d8f5c84e7c02f2523005dddc31939ca18232dd Mon Sep 17 00:00:00 2001 From: Andreas Färber Date: Mon, 17 Dec 2012 19:47:15 +0100 Subject: exec: Return CPUState from qemu_get_cpu() Move the declaration to qemu/cpu.h and add documentation. The implementation still depends on CPUArchState for CPU iteration. Signed-off-by: Andreas Färber --- exec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'exec.c') diff --git a/exec.c b/exec.c index e5265e635c..5689613d0a 100644 --- a/exec.c +++ b/exec.c @@ -247,10 +247,10 @@ static const VMStateDescription vmstate_cpu_common = { }; #endif -CPUArchState *qemu_get_cpu(int index) +CPUState *qemu_get_cpu(int index) { CPUArchState *env = first_cpu; - CPUState *cpu; + CPUState *cpu = NULL; while (env) { cpu = ENV_GET_CPU(env); @@ -260,7 +260,7 @@ CPUArchState *qemu_get_cpu(int index) env = env->next_cpu; } - return env; + return cpu; } void cpu_exec_init(CPUArchState *env) -- cgit v1.2.3-55-g7522