mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-23 11:39:53 +00:00
cpu: Introduce cpu_resume(), for single CPU
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 <imammedo@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
13eed94ed5
commit
2993683b0f
11
cpus.c
11
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;
|
||||
}
|
||||
}
|
||||
|
@ -256,5 +256,12 @@ void cpu_interrupt(CPUState *cpu, int mask);
|
||||
*/
|
||||
void cpu_reset_interrupt(CPUState *cpu, int mask);
|
||||
|
||||
/**
|
||||
* cpu_resume:
|
||||
* @cpu: The CPU to resume.
|
||||
*
|
||||
* Resumes CPU, i.e. puts CPU into runnable state.
|
||||
*/
|
||||
void cpu_resume(CPUState *cpu);
|
||||
|
||||
#endif
|
||||
|
@ -23,3 +23,4 @@ stub-obj-y += sysbus.o
|
||||
stub-obj-y += vm-stop.o
|
||||
stub-obj-y += vmstate.o
|
||||
stub-obj-$(CONFIG_WIN32) += fd-register.o
|
||||
stub-obj-y += cpus.o
|
||||
|
5
stubs/cpus.c
Normal file
5
stubs/cpus.c
Normal file
@ -0,0 +1,5 @@
|
||||
#include "qom/cpu.h"
|
||||
|
||||
void cpu_resume(CPUState *cpu)
|
||||
{
|
||||
}
|
Loading…
Reference in New Issue
Block a user