mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-22 09:32:40 -06:00
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:
parent
d1895f4c17
commit
69e10db83e
7 changed files with 182 additions and 315 deletions
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue