mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-05 20:35:44 +00:00
1ecf47bf0a
On Windows, cpus.c needs access to the hThread. Add a Windows-specific function to grab it. This requires changing the CPU threads to joinable. There is no substantial change because the threads run in an infinite loop. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
25 lines
455 B
C
25 lines
455 B
C
#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;
|
|
};
|
|
|
|
typedef struct QemuThreadData QemuThreadData;
|
|
struct QemuThread {
|
|
QemuThreadData *data;
|
|
unsigned tid;
|
|
};
|
|
|
|
/* Only valid for joinable threads. */
|
|
HANDLE qemu_thread_get_handle(QemuThread *thread);
|
|
|
|
#endif
|