7 #if __STDC_VERSION__ >= 199901L
8 #define __restrict restrict
9 #elif !defined(__GNUC__)
14 #define __NEED_struct_timespec
15 #include <bits/alltypes.h>
19 #define SEM_FAILED ((sem_t *)0)
22 int __val[4*sizeof(long)/sizeof(int)];
25 int sem_close(sem_t *);
26 int sem_destroy(sem_t *);
27 int sem_getvalue(sem_t *__restrict, int *__restrict);
28 int sem_init(sem_t *, int, unsigned);
29 sem_t *sem_open(const char *, int, ...);
30 int sem_post(sem_t *);
31 int sem_timedwait(sem_t *__restrict, const struct timespec *__restrict);
32 int sem_trywait(sem_t *);
33 int sem_unlink(const char *);
34 int sem_wait(sem_t *);