qemu-thread: Use futex for QemuEvent on Windows

Use the futex-based implementation of QemuEvent on Windows to
remove code duplication and remove the overhead of event object
construction and destruction.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Link: https://lore.kernel.org/r/20250526-event-v4-6-5b784cc8e1de@daynix.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Akihiko Odaki 2025-05-26 14:29:13 +09:00 committed by Paolo Bonzini
parent d1895f4c17
commit 69e10db83e
7 changed files with 182 additions and 315 deletions

View file

@ -32,15 +32,6 @@ struct QemuSemaphore {
unsigned int count;
};
struct QemuEvent {
#ifndef CONFIG_LINUX
pthread_mutex_t lock;
pthread_cond_t cond;
#endif
unsigned value;
bool initialized;
};
struct QemuThread {
pthread_t thread;
};