diff options
| author | Nicholas Piggin <npiggin@gmail.com> | 2024-07-12 22:02:43 +1000 |
|---|---|---|
| committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-07-16 20:04:08 +0200 |
| commit | 6b6593107d65113d3b83a936b06bab6c1c9fafe0 (patch) | |
| tree | 39c21f8c6f33d06ecd0067b77a61b86edfd9df9a /include/hw/core/cpu.h | |
| parent | de680286b527965a503b87dda59ebc8f539684f2 (diff) | |
| download | focaccia-qemu-6b6593107d65113d3b83a936b06bab6c1c9fafe0.tar.gz focaccia-qemu-6b6593107d65113d3b83a936b06bab6c1c9fafe0.zip | |
system/cpus: Add cpu_pause() function
This factors the CPU pause function from pause_all_vcpus() into a new cpu_pause() function, similarly to cpu_resume(). cpu_resume() is moved to keep it next to cpu_pause(). Cc: Philippe Mathieu-Daudé <philmd@linaro.org> Cc: Peter Xu <peterx@redhat.com> Cc: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Peter Xu <peterx@redhat.com> Message-ID: <20240712120247.477133-17-npiggin@gmail.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Diffstat (limited to 'include/hw/core/cpu.h')
| -rw-r--r-- | include/hw/core/cpu.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index a2c8536943..e6acfcb59a 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -985,6 +985,14 @@ void cpu_reset_interrupt(CPUState *cpu, int mask); void cpu_exit(CPUState *cpu); /** + * cpu_pause: + * @cpu: The CPU to pause. + * + * Pauses CPU, i.e. puts CPU into stopped state. + */ +void cpu_pause(CPUState *cpu); + +/** * cpu_resume: * @cpu: The CPU to resume. * |