diff options
Diffstat (limited to 'include/qemu/cpu.h')
-rw-r--r-- | include/qemu/cpu.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/qemu/cpu.h b/include/qemu/cpu.h index ad706a6..7be983d 100644 --- a/include/qemu/cpu.h +++ b/include/qemu/cpu.h @@ -78,5 +78,15 @@ struct CPUState { */ void cpu_reset(CPUState *cpu); +/** + * qemu_cpu_is_self: + * @cpu: The vCPU to check against. + * + * Checks whether the caller is executing on the vCPU thread. + * + * Returns: %true if called from @cpu's thread, %false otherwise. + */ +bool qemu_cpu_is_self(CPUState *cpu); + #endif |