1 #ifndef QEMU_THREAD_WIN32_H 2 #define QEMU_THREAD_WIN32_H 3 4 #include <windows.h> 5 6 struct QemuMutex { 7 SRWLOCK lock; 8 #ifdef CONFIG_DEBUG_MUTEX 9 const char *file; 10 int line; 11 #endif 12 bool initialized; 13 }; 14 15 typedef struct QemuRecMutex QemuRecMutex; 16 struct QemuRecMutex { 17 CRITICAL_SECTION lock; 18 bool initialized; 19 }; 20 21 struct QemuCond { 22 CONDITION_VARIABLE var; 23 bool initialized; 24 }; 25 26 struct QemuSemaphore { 27 HANDLE sema; 28 bool initialized; 29 }; 30 31 struct QemuEvent { 32 int value; 33 HANDLE event; 34 bool initialized; 35 }; 36 37 typedef struct QemuThreadData QemuThreadData; 38 struct QemuThread { 39 QemuThreadData *data; 40 unsigned tid; 41 }; 42 43 /* Only valid for joinable threads. */ 44 HANDLE qemu_thread_get_handle(struct QemuThread *thread); 45 46 #endif 47