aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkihiko Odaki <akihiko.odaki@daynix.com>2025-05-29 14:46:01 +0900
committerPaolo Bonzini <pbonzini@redhat.com>2025-06-06 14:32:55 +0200
commit5e2312f75adcba8cfee343a03343bf298c5bc937 (patch)
tree2c14ef3def0f70a8d0157a84650738cca7802ecb
parent0a765ca850125e0202c366cb4aab032ac9670870 (diff)
downloadqemu-5e2312f75adcba8cfee343a03343bf298c5bc937.zip
qemu-5e2312f75adcba8cfee343a03343bf298c5bc937.tar.gz
qemu-5e2312f75adcba8cfee343a03343bf298c5bc937.tar.bz2
qemu-thread: Document QemuEvent
Document QemuEvent to help choose an appropriate synchronization primitive. Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Link: https://lore.kernel.org/r/20250529-event-v5-12-53b285203794@daynix.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--include/qemu/thread.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/qemu/thread.h b/include/qemu/thread.h
index 573f8c9..f0302ed 100644
--- a/include/qemu/thread.h
+++ b/include/qemu/thread.h
@@ -10,6 +10,16 @@ typedef struct QemuSemaphore QemuSemaphore;
typedef struct QemuLockCnt QemuLockCnt;
typedef struct QemuThread QemuThread;
+/*
+ * QemuEvent
+ * =========
+ *
+ * QemuEvent is an implementation of Win32 manual-reset event object.
+ * For details, refer to:
+ * https://learn.microsoft.com/en-us/windows/win32/sync/using-event-objects
+ *
+ * QemuEvent is more lightweight than QemuSemaphore when HAVE_FUTEX is defined.
+ */
typedef struct QemuEvent {
#ifndef HAVE_FUTEX
pthread_mutex_t lock;