mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
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>
This commit is contained in:
parent
4a1e40b509
commit
38d8f5c84e
5 changed files with 22 additions and 8 deletions
6
exec.c
6
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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue