2011-03-12 17:43:52 +01:00
|
|
|
#ifndef __QEMU_THREAD_WIN32_H
|
|
|
|
#define __QEMU_THREAD_WIN32_H 1
|
|
|
|
#include "windows.h"
|
|
|
|
|
|
|
|
struct QemuMutex {
|
|
|
|
CRITICAL_SECTION lock;
|
|
|
|
LONG owner;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct QemuCond {
|
|
|
|
LONG waiters, target;
|
|
|
|
HANDLE sema;
|
|
|
|
HANDLE continue_event;
|
|
|
|
};
|
|
|
|
|
2011-08-08 14:36:41 +02:00
|
|
|
struct QemuSemaphore {
|
|
|
|
HANDLE sema;
|
|
|
|
};
|
|
|
|
|
2013-09-25 08:20:59 +02:00
|
|
|
struct QemuEvent {
|
2015-08-12 15:38:18 +02:00
|
|
|
int value;
|
2013-09-25 08:20:59 +02:00
|
|
|
HANDLE event;
|
|
|
|
};
|
|
|
|
|
2011-12-12 17:21:33 +01:00
|
|
|
typedef struct QemuThreadData QemuThreadData;
|
2011-03-12 17:43:52 +01:00
|
|
|
struct QemuThread {
|
2011-12-12 17:21:33 +01:00
|
|
|
QemuThreadData *data;
|
|
|
|
unsigned tid;
|
2011-03-12 17:43:52 +01:00
|
|
|
};
|
|
|
|
|
2011-12-13 13:43:52 +01:00
|
|
|
/* Only valid for joinable threads. */
|
|
|
|
HANDLE qemu_thread_get_handle(QemuThread *thread);
|
|
|
|
|
2011-03-12 17:43:52 +01:00
|
|
|
#endif
|