]> git.proxmox.com Git - qemu.git/blame - include/qemu/thread-posix.h
sun4m: Add FCode ROM for TCX framebuffer
[qemu.git] / include / qemu / thread-posix.h
CommitLineData
9257d46d
PB
1#ifndef __QEMU_THREAD_POSIX_H
2#define __QEMU_THREAD_POSIX_H 1
3#include "pthread.h"
38b14db3 4#include <semaphore.h>
9257d46d
PB
5
6struct QemuMutex {
7 pthread_mutex_t lock;
8};
9
10struct QemuCond {
11 pthread_cond_t cond;
12};
13
38b14db3 14struct QemuSemaphore {
927fa909 15#if defined(__APPLE__) || defined(__NetBSD__)
c166cb72
PB
16 pthread_mutex_t lock;
17 pthread_cond_t cond;
79761c66 18 unsigned int count;
c166cb72 19#else
38b14db3 20 sem_t sem;
c166cb72 21#endif
38b14db3
PB
22};
23
c7c4d063
PB
24struct QemuEvent {
25#ifndef __linux__
26 pthread_mutex_t lock;
27 pthread_cond_t cond;
28#endif
29 unsigned value;
30};
31
9257d46d
PB
32struct QemuThread {
33 pthread_t thread;
34};
35
9257d46d 36#endif