aboutsummaryrefslogtreecommitdiff
path: root/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'exec.c')
-rw-r--r--exec.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/exec.c b/exec.c
index 3023f44184..bbaf0b6892 100644
--- a/exec.c
+++ b/exec.c
@@ -541,6 +541,19 @@ static int cpu_common_load(QEMUFile *f, void *opaque, int version_id)
}
#endif
+CPUState *qemu_get_cpu(int cpu)
+{
+ CPUState *env = first_cpu;
+
+ while (env) {
+ if (env->cpu_index == cpu)
+ break;
+ env = env->next_cpu;
+ }
+
+ return env;
+}
+
void cpu_exec_init(CPUState *env)
{
CPUState **penv;