From: Philippe Mathieu-Daudé <f4bug@amsat.org>
Introduce precheck/postcheck handlers which will help to
refactor code common to the various create_vcpu_thread()
implementations.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
include/sysemu/accel-ops.h | 4 ++++
softmmu/cpus.c | 8 +++++++-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/include/sysemu/accel-ops.h b/include/sysemu/accel-ops.h
index 6013c9444c..26b542d35c 100644
--- a/include/sysemu/accel-ops.h
+++ b/include/sysemu/accel-ops.h
@@ -31,6 +31,10 @@ struct AccelOpsClass {
bool (*cpus_are_resettable)(void);
void (*create_vcpu_thread)(CPUState *cpu); /* MANDATORY NON-NULL */
+ /* If non-NULL, return whether common vCPU thread must be created */
+ bool (*create_vcpu_thread_precheck)(CPUState *cpu);
+ void (*create_vcpu_thread_postcheck)(CPUState *cpu);