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