repo.or.cz
/
qemu.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
qdev-properties-system: Change set_pointer's parse callback to use Error
[qemu.git]
/
include
/
qemu
/
thread-posix.h
blob
eb5c7a1da12dc34cfd3b0fcb6e4c84352e996bc5
1
#ifndef __QEMU_THREAD_POSIX_H
2
#define __QEMU_THREAD_POSIX_H 1
3
#include
"pthread.h"
4
#include <semaphore.h>
5
6
struct
QemuMutex
{
7
pthread_mutex_t lock
;
8
};
9
10
struct
QemuCond
{
11
pthread_cond_t cond
;
12
};
13
14
struct
QemuSemaphore
{
15
#if defined(__APPLE__) || defined(__NetBSD__)
16
pthread_mutex_t lock
;
17
pthread_cond_t cond
;
18
unsigned int
count
;
19
#else
20
sem_t sem
;
21
#endif
22
};
23
24
struct
QemuEvent
{
25
#ifndef __linux__
26
pthread_mutex_t lock
;
27
pthread_cond_t cond
;
28
#endif
29
unsigned
value
;
30
};
31
32
struct
QemuThread
{
33
pthread_t thread
;
34
};
35
36
#endif