migration/postcopy: Replace QemuSemaphore with QemuEvent

thread_sync_sem is an one-shot event so it can be converted into
QemuEvent, which is more lightweight.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20250529-event-v5-9-53b285203794@daynix.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Akihiko Odaki 2025-05-29 14:45:58 +09:00 committed by Paolo Bonzini
parent da926a8b9d
commit d401b7aed8
3 changed files with 8 additions and 8 deletions

View file

@ -98,9 +98,9 @@ struct MigrationIncomingState {
void (*transport_cleanup)(void *data);
/*
* Used to sync thread creations. Note that we can't create threads in
* parallel with this sem.
* parallel with this event.
*/
QemuSemaphore thread_sync_sem;
QemuEvent thread_sync_event;
/*
* Free at the start of the main state load, set as the main thread finishes
* loading state.