Clean up header guards that don't match their file name
[qemu/kevin.git] / include / qemu / thread-posix.h
blob24f84908b0092ac6ca5b3da7608f54a52d48aa7a
1 #ifndef __QEMU_THREAD_POSIX_H
2 #define __QEMU_THREAD_POSIX_H 1
4 #include <pthread.h>
5 #include <semaphore.h>
7 struct QemuMutex {
8 pthread_mutex_t lock;
9 };
11 struct QemuCond {
12 pthread_cond_t cond;
15 struct QemuSemaphore {
16 #if defined(__APPLE__) || defined(__NetBSD__)
17 pthread_mutex_t lock;
18 pthread_cond_t cond;
19 unsigned int count;
20 #else
21 sem_t sem;
22 #endif
25 struct QemuEvent {
26 #ifndef __linux__
27 pthread_mutex_t lock;
28 pthread_cond_t cond;
29 #endif
30 unsigned value;
33 struct QemuThread {
34 pthread_t thread;
37 #endif