2011-03-12 19:43:52 +03: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-12-12 20:21:33 +04:00
|
|
|
typedef struct QemuThreadData QemuThreadData;
|
2011-03-12 19:43:52 +03:00
|
|
|
struct QemuThread {
|
2011-12-12 20:21:33 +04:00
|
|
|
QemuThreadData *data;
|
|
|
|
unsigned tid;
|
2011-03-12 19:43:52 +03:00
|
|
|
};
|
|
|
|
|
2011-12-13 16:43:52 +04:00
|
|
|
/* Only valid for joinable threads. */
|
|
|
|
HANDLE qemu_thread_get_handle(QemuThread *thread);
|
|
|
|
|
2011-03-12 19:43:52 +03:00
|
|
|
#endif
|