Move cpu_xxx functions to qom/cpu.h
This patch moves a few CPU-releated function declarations to
include/qom/cpu.h, while changing their signature to take a
CPUState instead of a CPUOldState.
Change-Id: I5f09b522dc755be334973a27f58b6704fbccc4c6
diff --git a/cpus.c b/cpus.c
index ed08a34..02829f6 100644
--- a/cpus.c
+++ b/cpus.c
@@ -99,9 +99,9 @@
return 0;
}
-void qemu_init_vcpu(void *_env)
+void qemu_init_vcpu(CPUState *cpu)
{
- CPUOldState *env = _env;
+ CPUArchState *env = cpu->env_ptr;
if (kvm_enabled())
kvm_init_vcpu(env);
@@ -112,9 +112,9 @@
return;
}
-int qemu_cpu_self(void *env)
+bool qemu_cpu_is_self(CPUState *cpu)
{
- return 1;
+ return true;
}
void resume_all_vcpus(void)
@@ -125,7 +125,7 @@
{
}
-void qemu_cpu_kick(void *env)
+void qemu_cpu_kick(CPUState *cpu)
{
return;
}
@@ -140,7 +140,7 @@
CPUState *cpu = current_cpu;
if (cpu) {
- cpu_exit(cpu->env_ptr);
+ cpu_exit(cpu);
/*
* This is mainly for the Windows host, where the timer may be in
* a different thread with vcpu. Thus the timer function needs to