add win32 qemu-thread implementation

For now, qemu_cond_timedwait and qemu_mutex_timedlock are left as
POSIX-only functions.  They can be removed later, once the patches
that remove their uses are in.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
Paolo Bonzini 2011-03-12 17:43:52 +01:00 committed by Blue Swirl
parent b7680cb607
commit 9257d46d55
6 changed files with 313 additions and 17 deletions

18
qemu-thread-posix.h Normal file
View file

@ -0,0 +1,18 @@
#ifndef __QEMU_THREAD_POSIX_H
#define __QEMU_THREAD_POSIX_H 1
#include "pthread.h"
struct QemuMutex {
pthread_mutex_t lock;
};
struct QemuCond {
pthread_cond_t cond;
};
struct QemuThread {
pthread_t thread;
};
void qemu_thread_signal(QemuThread *thread, int sig);
#endif