1#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined XPG42
2constant PTHREAD_CANCEL_ASYNCHRONOUS
3constant PTHREAD_CANCEL_ENABLE
4constant PTHREAD_CANCEL_DEFERRED
5constant PTHREAD_CANCEL_DISABLE
6constant PTHREAD_CANCELED
7macro PTHREAD_COND_INITIALIZER
8constant PTHREAD_CREATE_DETACHED
9constant PTHREAD_CREATE_JOINABLE
10constant PTHREAD_EXPLICIT_SCHED
11constant PTHREAD_INHERIT_SCHED
12constant PTHREAD_ONCE_INIT
13optional-constant PTHREAD_PRIO_INHERIT
14optional-constant PTHREAD_PRIO_NONE
15optional-constant PTHREAD_PRIO_PROTECT
16constant PTHREAD_PROCESS_SHARED
17constant PTHREAD_PROCESS_PRIVATE
18constant PTHREAD_SCOPE_PROCESS
19constant PTHREAD_SCOPE_SYSTEM
20macro PTHREAD_MUTEX_INITIALIZER
21# ifndef POSIX
22constant PTHREAD_MUTEX_DEFAULT
23constant PTHREAD_MUTEX_ERRORCHECK
24constant PTHREAD_MUTEX_NORMAL
25constant PTHREAD_MUTEX_RECURSIVE
26macro PTHREAD_RWLOCK_INITIALIZER
27# endif
28# if defined XOPEN2K8 || defined POSIX2008
29constant PTHREAD_MUTEX_ROBUST
30constant PTHREAD_MUTEX_STALLED
31# endif
32
33# ifndef POSIX
34type pthread_attr_t
35#  ifndef UNIX98
36type pthread_barrier_t
37type pthread_barrierattr_t
38#  endif
39type pthread_cond_t
40type pthread_condattr_t
41type pthread_key_t
42type pthread_mutex_t
43type pthread_mutexattr_t
44type pthread_once_t
45type pthread_rwlock_t
46type pthread_rwlockattr_t
47#  ifndef UNIX98
48type pthread_spinlock_t
49#  endif
50type pthread_t
51# endif
52
53function int pthread_atfork (void (*) (void), void (*) (void), void (*) (void))
54function int pthread_attr_destroy (pthread_attr_t*)
55function int pthread_attr_getdetachstate (const pthread_attr_t*, int*)
56# ifndef POSIX
57function int pthread_attr_getguardsize (const pthread_attr_t*, size_t*)
58# endif
59function int pthread_attr_getinheritsched (const pthread_attr_t*, int*)
60function int pthread_attr_getschedparam (const pthread_attr_t*, struct sched_param*)
61function int pthread_attr_getschedpolicy (const pthread_attr_t*, int*)
62function int pthread_attr_getscope (const pthread_attr_t*, int*)
63function int pthread_attr_getstackaddr (const pthread_attr_t*, void**)
64function int pthread_attr_getstacksize (const pthread_attr_t*, size_t*)
65function int pthread_attr_init (pthread_attr_t*)
66function int pthread_attr_setdetachstate (pthread_attr_t*, int)
67# ifndef POSIX
68function int pthread_attr_setguardsize (pthread_attr_t*, size_t)
69# endif
70function int pthread_attr_setinheritsched (pthread_attr_t*, int)
71function int pthread_attr_setschedparam (pthread_attr_t*, const struct sched_param*)
72function int pthread_attr_setschedpolicy (pthread_attr_t*, int)
73function int pthread_attr_setscope (pthread_attr_t*, int)
74function int pthread_attr_setstackaddr (pthread_attr_t*, void*)
75function int pthread_attr_setstacksize (pthread_attr_t*, size_t)
76# if !defined POSIX && !defined UNIX98
77function int pthread_barrier_destroy (pthread_barrier_t*)
78function int pthread_barrier_init (pthread_barrier_t*, const pthread_barrierattr_t*, unsigned int)
79function int pthread_barrier_wait (pthread_barrier_t*)
80function int pthread_barrierattr_destroy (pthread_barrierattr_t*)
81function int pthread_barrierattr_getpshared (const pthread_barrierattr_t*, int*)
82function int pthread_barrierattr_init (pthread_barrierattr_t*)
83function int pthread_barrierattr_setpshared (pthread_barrierattr_t*, int)
84# endif
85function int pthread_cancel (pthread_t)
86// function int pthread_cleanup_push (void (*) (void*), void*)
87macro pthread_cleanup_push
88// function int pthread_cleanup_pop (int)
89macro pthread_cleanup_pop
90function int pthread_cond_broadcast (pthread_cond_t*)
91function int pthread_cond_destroy (pthread_cond_t*)
92function int pthread_cond_init (pthread_cond_t*, const pthread_condattr_t*)
93function int pthread_cond_signal (pthread_cond_t*)
94function int pthread_cond_timedwait (pthread_cond_t*, pthread_mutex_t*, const struct timespec*)
95function int pthread_cond_wait (pthread_cond_t*, pthread_mutex_t*)
96function int pthread_condattr_destroy (pthread_condattr_t*)
97#if !defined POSIX && !defined UNIX98 && !defined XOPEN2K
98optional-function int pthread_condattr_getclock (const pthread_condattr_t*, clockid_t*)
99#endif
100function int pthread_condattr_getpshared (const pthread_condattr_t*, int*)
101function int pthread_condattr_init (pthread_condattr_t*)
102#if !defined POSIX && !defined UNIX98 && !defined XOPEN2K
103optional-function int pthread_condattr_setclock (pthread_condattr_t*, clockid_t)
104#endif
105function int pthread_condattr_setpshared (pthread_condattr_t*, int)
106function int pthread_create (pthread_t*, const pthread_attr_t*, void *(*) (void*), void*)
107function int pthread_detach (pthread_t)
108function int pthread_equal (pthread_t, pthread_t)
109function void pthread_exit (void*)
110# if !defined POSIX && !defined POSIX2008
111function int pthread_getconcurrency (void)
112# endif
113# if !defined POSIX && !defined UNIX98
114function int pthread_getcpuclockid (pthread_t, clockid_t*)
115# endif
116function int pthread_getschedparam (pthread_t, int*, struct sched_param*)
117function {void*} pthread_getspecific (pthread_key_t)
118function int pthread_join (pthread_t, void**)
119function int pthread_key_create (pthread_key_t*, void (*)(void*))
120function int pthread_key_delete (pthread_key_t)
121function int pthread_mutex_destroy (pthread_mutex_t*)
122optional-function int pthread_mutex_getprioceiling (const pthread_mutex_t*, int*)
123function int pthread_mutex_init (pthread_mutex_t*, const pthread_mutexattr_t*)
124function int pthread_mutex_lock (pthread_mutex_t*)
125optional-function int pthread_mutex_setprioceiling (pthread_mutex_t*, int, int*)
126# if !defined POSIX && !defined UNIX98
127function int pthread_mutex_timedlock (pthread_mutex_t*, const struct timespec*)
128# endif
129function int pthread_mutex_trylock (pthread_mutex_t*)
130function int pthread_mutex_unlock (pthread_mutex_t*)
131function int pthread_mutexattr_destroy (pthread_mutexattr_t*)
132optional-function int pthread_mutexattr_getprioceiling (const pthread_mutexattr_t*, int*)
133optional-function int pthread_mutexattr_getprotocol (const pthread_mutexattr_t*, int*)
134function int pthread_mutexattr_getpshared (const pthread_mutexattr_t*, int*)
135# if !defined POSIX
136function int pthread_mutexattr_gettype (const pthread_mutexattr_t*, int*)
137# endif
138function int pthread_mutexattr_init (pthread_mutexattr_t*)
139optional-function int pthread_mutexattr_setprioceiling (pthread_mutexattr_t*, int)
140optional-function int pthread_mutexattr_setprotocol (pthread_mutexattr_t*, int)
141function int pthread_mutexattr_setpshared (pthread_mutexattr_t*, int)
142# if !defined POSIX
143function int pthread_mutexattr_settype (pthread_mutexattr_t*, int)
144# endif
145function int pthread_once (pthread_once_t*, void (*) (void))
146# if !defined POSIX
147function int pthread_rwlock_init (pthread_rwlock_t*, const pthread_rwlockattr_t*)
148function int pthread_rwlock_rdlock (pthread_rwlock_t*)
149# endif
150# if !defined POSIX && !defined UNIX98
151function int pthread_rwlock_timedrdlock (pthread_rwlock_t*, const struct timespec*)
152function int pthread_rwlock_timedwrlock (pthread_rwlock_t*, const struct timespec*)
153# endif
154# if !defined POSIX
155function int pthread_rwlock_tryrdlock (pthread_rwlock_t*)
156function int pthread_rwlock_trywrlock (pthread_rwlock_t*)
157function int pthread_rwlock_unlock (pthread_rwlock_t*)
158function int pthread_rwlock_wrlock (pthread_rwlock_t*)
159function int pthread_rwlockattr_destroy (pthread_rwlockattr_t*)
160function int pthread_rwlockattr_getpshared (const pthread_rwlockattr_t*, int*)
161function int pthread_rwlockattr_init (pthread_rwlockattr_t*)
162function int pthread_rwlockattr_setpshared (pthread_rwlockattr_t*, int)
163# endif
164function pthread_t pthread_self (void)
165function int pthread_setcancelstate (int, int*)
166function int pthread_setcanceltype (int, int*)
167# if !defined POSIX && !defined POSIX2008
168function int pthread_setconcurrency (int)
169# endif
170function int pthread_setschedparam (pthread_t, int, const struct sched_param*)
171function int pthread_setspecific (pthread_key_t, const void*)
172# if !defined POSIX && !defined UNIX98 && !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008
173function int pthread_sigmask (int, const sigset_t*, sigset_t*)
174# endif
175# if !defined POSIX && !defined UNIX98
176function int pthread_spin_destroy (pthread_spinlock_t*)
177function int pthread_spin_init (pthread_spinlock_t*, int)
178function int pthread_spin_lock (pthread_spinlock_t*)
179function int pthread_spin_trylock (pthread_spinlock_t*)
180function int pthread_spin_unlock (pthread_spinlock_t*)
181# endif
182function void pthread_testcancel (void)
183# if defined XOPEN2K8 || defined POSIX2008
184function int pthread_mutex_consistent (pthread_mutex_t *)
185function int pthread_mutexattr_getrobust (const pthread_mutexattr_t*, int*)
186function int pthread_mutexattr_setrobust (pthread_mutexattr_t*, int)
187# endif
188
189allow-header sched.h
190allow-header time.h
191
192allow PTHREAD_*
193allow pthread_*
194allow *_t
195#endif
196