Merge tag 'pull-request-2024-06-12' of https://gitlab.com/thuth/qemu into staging
[qemu/kevin.git] / include / qemu / thread-win32.h
blobd95af4498fc9e74bab49b2fab3bbfb12e7b8edfa
1 #ifndef QEMU_THREAD_WIN32_H
2 #define QEMU_THREAD_WIN32_H
4 #include <windows.h>
6 struct QemuMutex {
7 SRWLOCK lock;
8 #ifdef CONFIG_DEBUG_MUTEX
9 const char *file;
10 int line;
11 #endif
12 bool initialized;
15 typedef struct QemuRecMutex QemuRecMutex;
16 struct QemuRecMutex {
17 CRITICAL_SECTION lock;
18 bool initialized;
21 struct QemuCond {
22 CONDITION_VARIABLE var;
23 bool initialized;
26 struct QemuSemaphore {
27 HANDLE sema;
28 bool initialized;
31 struct QemuEvent {
32 int value;
33 HANDLE event;
34 bool initialized;
37 typedef struct QemuThreadData QemuThreadData;
38 struct QemuThread {
39 QemuThreadData *data;
40 unsigned tid;
43 /* Only valid for joinable threads. */
44 HANDLE qemu_thread_get_handle(struct QemuThread *thread);
46 #endif