extensive header cleanup for standards conformance & correctness
[musl] / include / semaphore.h
1 #ifndef _SEMAPHORE_H
2 #define _SEMAPHORE_H
3 #ifdef __cplusplus
4 extern "C" {
5 #endif
6
7 #define SEM_FAILED ((sem_t *)0)
8
9 typedef struct {
10         long __val[4];
11 } sem_t;
12
13 int    sem_close(sem_t *);
14 int    sem_destroy(sem_t *);
15 int    sem_getvalue(sem_t *, int *);
16 int    sem_init(sem_t *, int, unsigned);
17 sem_t *sem_open(const char *, int, ...);
18 int    sem_post(sem_t *);
19 int    sem_timedwait(sem_t *, const struct timespec *);
20 int    sem_trywait(sem_t *);
21 int    sem_unlink(const char *);
22 int    sem_wait(sem_t *);
23
24 #ifdef __cplusplus
25 }
26 #endif
27 #endif