1#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined XPG42
2type sem_t
3
4constant SEM_FAILED
5
6function int sem_close (sem_t*)
7function int sem_destroy (sem_t*)
8function int sem_getvalue (sem_t*, int*)
9function int sem_init (sem_t*, int, unsigned int)
10function {sem_t*} sem_open (const char*, int, ...)
11function int sem_post (sem_t*)
12# if !defined POSIX && !defined UNIX98
13function int sem_timedwait (sem_t*, const struct timespec*)
14# endif
15function int sem_trywait (sem_t*)
16function int sem_unlink (const char*)
17function int sem_wait (sem_t*)
18
19allow-header fcntl.h
20# if !defined POSIX2008 && !defined XOPEN2K8
21allow-header sys/types.h
22# endif
23// Consider addition of this permission in POSIX.1:2008 as a bug fix,
24// so allow for POSIX.1:2001 as well since that includes sem_timedwait.
25# if !defined POSIX && !defined UNIX98
26allow-header time.h
27# endif
28
29allow sem_*
30allow SEM_*
31allow *_t
32#endif
33