diff options
author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-01-21 12:57:16 +0100 |
---|---|---|
committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-03-09 17:00:47 +0100 |
commit | 72eacd623170dd680557ece6957575c30774cdef (patch) | |
tree | abec4c0ddfdb0283cfa2235deb0264f9026ebcf2 /include | |
parent | 8f8dbe04bdafdbe265e9ae25737bb18daacc6ca6 (diff) | |
download | qemu-72eacd623170dd680557ece6957575c30774cdef.zip qemu-72eacd623170dd680557ece6957575c30774cdef.tar.gz qemu-72eacd623170dd680557ece6957575c30774cdef.tar.bz2 |
cpus: Introduce SysemuCPUOps::has_work() handler
SysemuCPUOps::has_work() is similar to CPUClass::has_work(),
but only exposed on system emulation.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20250125170125.32855-4-philmd@linaro.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/accel/tcg/cpu-ops.h | 2 | ||||
-rw-r--r-- | include/hw/core/sysemu-cpu-ops.h | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/include/accel/tcg/cpu-ops.h b/include/accel/tcg/cpu-ops.h index 2e3f169..f60e530 100644 --- a/include/accel/tcg/cpu-ops.h +++ b/include/accel/tcg/cpu-ops.h @@ -141,7 +141,7 @@ struct TCGCPUOps { * * This method must be provided. If the target does not need to * do anything special for halt, the same function used for its - * CPUClass::has_work method can be used here, as they have the + * SysemuCPUOps::has_work method can be used here, as they have the * same function signature. */ bool (*cpu_exec_halt)(CPUState *cpu); diff --git a/include/hw/core/sysemu-cpu-ops.h b/include/hw/core/sysemu-cpu-ops.h index 0df5b05..dee8a62 100644 --- a/include/hw/core/sysemu-cpu-ops.h +++ b/include/hw/core/sysemu-cpu-ops.h @@ -17,6 +17,10 @@ */ typedef struct SysemuCPUOps { /** + * @has_work: Callback for checking if there is work to do. + */ + bool (*has_work)(CPUState *cpu); + /** * @get_memory_mapping: Callback for obtaining the memory mappings. */ bool (*get_memory_mapping)(CPUState *cpu, MemoryMappingList *list, |