mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
cpus: Restrict cpu_has_work() to system emulation
This method is not used on user emulation, because there is always work to do there. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20250125170125.32855-2-philmd@linaro.org>
This commit is contained in:
parent
0ebdf989c3
commit
c0ee4dd155
1 changed files with 14 additions and 14 deletions
|
@ -750,6 +750,20 @@ int cpu_asidx_from_attrs(CPUState *cpu, MemTxAttrs attrs);
|
|||
*/
|
||||
bool cpu_virtio_is_big_endian(CPUState *cpu);
|
||||
|
||||
/**
|
||||
* cpu_has_work:
|
||||
* @cpu: The vCPU to check.
|
||||
*
|
||||
* Checks whether the CPU has work to do.
|
||||
*
|
||||
* Returns: %true if the CPU has work, %false otherwise.
|
||||
*/
|
||||
static inline bool cpu_has_work(CPUState *cpu)
|
||||
{
|
||||
g_assert(cpu->cc->has_work);
|
||||
return cpu->cc->has_work(cpu);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_USER_ONLY */
|
||||
|
||||
/**
|
||||
|
@ -816,20 +830,6 @@ CPUState *cpu_create(const char *typename);
|
|||
*/
|
||||
const char *parse_cpu_option(const char *cpu_option);
|
||||
|
||||
/**
|
||||
* cpu_has_work:
|
||||
* @cpu: The vCPU to check.
|
||||
*
|
||||
* Checks whether the CPU has work to do.
|
||||
*
|
||||
* Returns: %true if the CPU has work, %false otherwise.
|
||||
*/
|
||||
static inline bool cpu_has_work(CPUState *cpu)
|
||||
{
|
||||
g_assert(cpu->cc->has_work);
|
||||
return cpu->cc->has_work(cpu);
|
||||
}
|
||||
|
||||
/**
|
||||
* qemu_cpu_is_self:
|
||||
* @cpu: The vCPU to check against.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue