timer: update comments
[qemu/ar7.git] / include / qemu / thread-posix.h
blobaa03567e5e0da4e86676331b376262bffee0bdbc
1 #ifndef QEMU_THREAD_POSIX_H
2 #define QEMU_THREAD_POSIX_H
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