From 2993683b0fde0f836777c945baaddcaa5937903f Mon Sep 17 00:00:00 2001 From: Igor Mammedov Date: Tue, 23 Apr 2013 10:29:37 +0200 Subject: cpu: Introduce cpu_resume(), for single CPU MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also add a stub for it, to make possible to use it in qom/cpu.c, which is shared with user emulators. Signed-off-by: Igor Mammedov Signed-off-by: Andreas Färber --- cpus.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'cpus.c') diff --git a/cpus.c b/cpus.c index 5a98a370df..1d8876157c 100644 --- a/cpus.c +++ b/cpus.c @@ -993,6 +993,13 @@ void pause_all_vcpus(void) } } +void cpu_resume(CPUState *cpu) +{ + cpu->stop = false; + cpu->stopped = false; + qemu_cpu_kick(cpu); +} + void resume_all_vcpus(void) { CPUArchState *penv = first_cpu; @@ -1000,9 +1007,7 @@ void resume_all_vcpus(void) qemu_clock_enable(vm_clock, true); while (penv) { CPUState *pcpu = ENV_GET_CPU(penv); - pcpu->stop = false; - pcpu->stopped = false; - qemu_cpu_kick(pcpu); + cpu_resume(pcpu); penv = penv->next_cpu; } } -- cgit v1.2.3