summaryrefslogtreecommitdiff
path: root/exec.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2012-12-17 19:47:15 +0100
committerAndreas Färber <afaerber@suse.de>2013-01-15 04:09:14 +0100
commit38d8f5c84e7c02f2523005dddc31939ca18232dd (patch)
treeb331156b39565092fe7f860647b912730367ffcd /exec.c
parent4a1e40b5091bcff5f8ea3fe9963eaa8e76b16389 (diff)
downloadqemu-38d8f5c84e7c02f2523005dddc31939ca18232dd.tar.gz
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 <afaerber@suse.de>
Diffstat (limited to 'exec.c')
-rw-r--r--exec.c6
1 files changed, 3 insertions, 3 deletions
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)