Print this page
remove support for non-ANSI compilation
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/head/pthread.h
+++ new/usr/src/head/pthread.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
↓ open down ↓ |
12 lines elided |
↑ open up ↑ |
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21
22 22 /*
23 + * Copyright 2014 Garrett D'Amore <garrett@damore.org>
24 + *
23 25 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
24 26 * Use is subject to license terms.
25 27 */
26 28
27 29 #ifndef _PTHREAD_H
28 30 #define _PTHREAD_H
29 31
30 32 #include <sys/feature_tests.h>
31 33
32 34 #ifndef _ASM
33 35 #include <sys/types.h>
34 36 #include <time.h>
35 37 #include <sched.h>
36 38 #endif /* _ASM */
37 39
38 40 #ifdef __cplusplus
39 41 extern "C" {
40 42 #endif
41 43
42 44 /*
43 45 * Thread related attribute values defined as in thread.h.
44 46 * These are defined as bit pattern in thread.h.
45 47 * Any change here should be reflected in thread.h.
46 48 */
47 49 /* detach */
48 50 #define PTHREAD_CREATE_DETACHED 0x40 /* = THR_DETACHED */
49 51 #define PTHREAD_CREATE_JOINABLE 0
50 52 /* scope */
51 53 #define PTHREAD_SCOPE_SYSTEM 0x01 /* = THR_BOUND */
52 54 #define PTHREAD_SCOPE_PROCESS 0
53 55
54 56 /*
55 57 * Other attributes which are not defined in thread.h
56 58 */
57 59 /* inherit */
58 60 #define PTHREAD_INHERIT_SCHED 1
59 61 #define PTHREAD_EXPLICIT_SCHED 0
60 62
61 63 /*
62 64 * Value of process-shared attribute
63 65 * These are defined as values defined in sys/synch.h
64 66 * Any change here should be reflected in sys/synch.h.
65 67 */
66 68 #define PTHREAD_PROCESS_SHARED 1 /* = USYNC_PROCESS */
67 69 #define PTHREAD_PROCESS_PRIVATE 0 /* = USYNC_THREAD */
68 70
69 71 #define _DEFAULT_TYPE PTHREAD_PROCESS_PRIVATE
70 72 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
71 73 #define DEFAULT_TYPE _DEFAULT_TYPE
72 74 #endif
73 75
74 76 /*
75 77 * mutex types
76 78 * keep these in synch which sys/synch.h lock flags
77 79 */
78 80 #define PTHREAD_MUTEX_NORMAL 0x0
79 81 #define PTHREAD_MUTEX_ERRORCHECK 0x2
80 82 #define PTHREAD_MUTEX_RECURSIVE 0x4
81 83 #define PTHREAD_MUTEX_DEFAULT PTHREAD_MUTEX_NORMAL
82 84
83 85 /*
84 86 * Mutex protocol values. Keep these in synch with sys/synch.h lock types.
85 87 */
86 88 #define PTHREAD_PRIO_NONE 0x0
87 89 #define PTHREAD_PRIO_INHERIT 0x10
88 90 #define PTHREAD_PRIO_PROTECT 0x20
89 91
90 92 /*
91 93 * Mutex robust attribute values.
92 94 * Keep these in synch with sys/synch.h lock types.
93 95 */
94 96 #define PTHREAD_MUTEX_STALLED 0x0
95 97 #define PTHREAD_MUTEX_ROBUST 0x40
96 98 /*
97 99 * Historical solaris-specific names,
98 100 * from before pthread_mutexattr_getrobust() became standardized
99 101 */
100 102 #define PTHREAD_MUTEX_STALL_NP PTHREAD_MUTEX_STALLED
101 103 #define PTHREAD_MUTEX_ROBUST_NP PTHREAD_MUTEX_ROBUST
102 104
103 105 /*
104 106 * macros - default initializers defined as in synch.h
105 107 * Any change here should be reflected in synch.h.
106 108 *
107 109 * NOTE:
108 110 * Make sure that any change in the macros is consistent with the definition
109 111 * of the corresponding types in sys/types.h (e.g. PTHREAD_MUTEX_INITIALIZER
110 112 * should be consistent with the definition for pthread_mutex_t).
111 113 */
112 114 #define PTHREAD_MUTEX_INITIALIZER /* = DEFAULTMUTEX */ \
113 115 {{0, 0, 0, _DEFAULT_TYPE, _MUTEX_MAGIC}, {{{0}}}, 0}
114 116
115 117 #define PTHREAD_COND_INITIALIZER /* = DEFAULTCV */ \
116 118 {{{0, 0, 0, 0}, _DEFAULT_TYPE, _COND_MAGIC}, 0}
117 119
118 120 #define PTHREAD_RWLOCK_INITIALIZER /* = DEFAULTRWLOCK */ \
119 121 {0, _DEFAULT_TYPE, _RWL_MAGIC, PTHREAD_MUTEX_INITIALIZER, \
120 122 PTHREAD_COND_INITIALIZER, PTHREAD_COND_INITIALIZER}
121 123
122 124 /* cancellation type and state */
123 125 #define PTHREAD_CANCEL_ENABLE 0x00
124 126 #define PTHREAD_CANCEL_DISABLE 0x01
125 127 #define PTHREAD_CANCEL_DEFERRED 0x00
126 128 #define PTHREAD_CANCEL_ASYNCHRONOUS 0x02
127 129 #define PTHREAD_CANCELED (void *)-19
128 130
129 131 /* pthread_once related values */
130 132 #define PTHREAD_ONCE_NOTDONE 0
131 133 #define PTHREAD_ONCE_DONE 1
132 134 #define PTHREAD_ONCE_INIT { {0, 0, 0, PTHREAD_ONCE_NOTDONE} }
133 135
134 136 /*
135 137 * The key to be created by pthread_key_create_once_np()
136 138 * must be statically initialized with PTHREAD_ONCE_KEY_NP.
137 139 * This must be the same as THR_ONCE_KEY in <thread.h>
138 140 */
139 141 #define PTHREAD_ONCE_KEY_NP (pthread_key_t)(-1)
140 142
141 143 /* barriers */
142 144 #define PTHREAD_BARRIER_SERIAL_THREAD -2
↓ open down ↓ |
110 lines elided |
↑ open up ↑ |
143 145
144 146 #ifndef _ASM
145 147
146 148 /*
147 149 * cancellation cleanup structure
148 150 */
149 151 typedef struct _cleanup {
150 152 uintptr_t pthread_cleanup_pad[4];
151 153 } _cleanup_t;
152 154
153 -#ifdef __STDC__
154 -
155 155 void __pthread_cleanup_push(void (*)(void *), void *, caddr_t, _cleanup_t *);
156 156 void __pthread_cleanup_pop(int, _cleanup_t *);
157 157 caddr_t _getfp(void);
158 158
159 -#else /* __STDC__ */
160 -
161 -void __pthread_cleanup_push();
162 -void __pthread_cleanup_pop();
163 -caddr_t _getfp();
164 -
165 -#endif /* __STDC__ */
166 -
167 159 #if __cplusplus
168 160 extern "C" {
169 161 #endif
170 162
171 163 typedef void (*_Voidfp)(void*); /* pointer to extern "C" function */
172 164
173 165 #if __cplusplus
174 166 } /* extern "C" */
175 167 #endif
176 168
177 169 #define pthread_cleanup_push(routine, args) { \
178 170 _cleanup_t _cleanup_info; \
179 171 __pthread_cleanup_push((_Voidfp)(routine), (void *)(args), \
180 172 (caddr_t)_getfp(), &_cleanup_info);
181 173
182 174 #define pthread_cleanup_pop(ex) \
183 175 __pthread_cleanup_pop(ex, &_cleanup_info); \
184 176 }
185 177
186 -#ifdef __STDC__
187 -
188 178 /*
189 179 * function prototypes - thread related calls
190 180 */
191 181
192 182 /*
193 183 * pthread_atfork() is also declared in <unistd.h> as per SUSv2. The
194 184 * declarations are identical. A change to either one may also require
195 185 * appropriate namespace updates in order to avoid redeclaration
196 186 * warnings in the case where both prototypes are exposed via inclusion
197 187 * of both <pthread.h> and <unistd.h>.
198 188 */
199 189 extern int pthread_atfork(void (*) (void), void (*) (void), void (*) (void));
200 190 extern int pthread_attr_init(pthread_attr_t *);
201 191 extern int pthread_attr_destroy(pthread_attr_t *);
202 192 extern int pthread_attr_setstack(pthread_attr_t *, void *, size_t);
203 193 extern int pthread_attr_getstack(const pthread_attr_t *_RESTRICT_KYWD,
204 194 void **_RESTRICT_KYWD, size_t *_RESTRICT_KYWD);
205 195 extern int pthread_attr_setstacksize(pthread_attr_t *, size_t);
206 196 extern int pthread_attr_getstacksize(const pthread_attr_t *_RESTRICT_KYWD,
207 197 size_t *_RESTRICT_KYWD);
208 198 extern int pthread_attr_setstackaddr(pthread_attr_t *, void *);
209 199 extern int pthread_attr_getstackaddr(const pthread_attr_t *_RESTRICT_KYWD,
210 200 void **_RESTRICT_KYWD);
211 201 extern int pthread_attr_setdetachstate(pthread_attr_t *, int);
212 202 extern int pthread_attr_getdetachstate(const pthread_attr_t *, int *);
213 203 extern int pthread_attr_setscope(pthread_attr_t *, int);
214 204 extern int pthread_attr_getscope(const pthread_attr_t *_RESTRICT_KYWD,
215 205 int *_RESTRICT_KYWD);
216 206 extern int pthread_attr_setinheritsched(pthread_attr_t *, int);
217 207 extern int pthread_attr_getinheritsched(const pthread_attr_t *_RESTRICT_KYWD,
218 208 int *_RESTRICT_KYWD);
219 209 extern int pthread_attr_setschedpolicy(pthread_attr_t *, int);
220 210 extern int pthread_attr_getschedpolicy(const pthread_attr_t *_RESTRICT_KYWD,
221 211 int *_RESTRICT_KYWD);
222 212 extern int pthread_attr_setschedparam(pthread_attr_t *_RESTRICT_KYWD,
223 213 const struct sched_param *_RESTRICT_KYWD);
224 214 extern int pthread_attr_getschedparam(const pthread_attr_t *_RESTRICT_KYWD,
225 215 struct sched_param *_RESTRICT_KYWD);
226 216 extern int pthread_create(pthread_t *_RESTRICT_KYWD,
227 217 const pthread_attr_t *_RESTRICT_KYWD, void * (*)(void *),
228 218 void *_RESTRICT_KYWD);
229 219 extern int pthread_once(pthread_once_t *, void (*)(void));
230 220 extern int pthread_join(pthread_t, void **);
231 221 extern int pthread_detach(pthread_t);
232 222 extern void pthread_exit(void *) __NORETURN;
233 223 extern int pthread_cancel(pthread_t);
234 224 extern int pthread_setschedparam(pthread_t, int, const struct sched_param *);
235 225 extern int pthread_getschedparam(pthread_t, int *_RESTRICT_KYWD,
236 226 struct sched_param *_RESTRICT_KYWD);
237 227 extern int pthread_setschedprio(pthread_t, int);
238 228 extern int pthread_setcancelstate(int, int *);
239 229 extern int pthread_setcanceltype(int, int *);
240 230 extern void pthread_testcancel(void);
241 231 extern int pthread_equal(pthread_t, pthread_t);
242 232 extern int pthread_key_create(pthread_key_t *, void (*)(void *));
243 233 extern int pthread_key_create_once_np(pthread_key_t *, void (*)(void *));
244 234 extern int pthread_key_delete(pthread_key_t);
245 235 extern int pthread_setspecific(pthread_key_t, const void *);
246 236 extern void *pthread_getspecific(pthread_key_t);
247 237 extern pthread_t pthread_self(void);
248 238
249 239 /*
250 240 * function prototypes - synchronization related calls
251 241 */
252 242 extern int pthread_mutexattr_init(pthread_mutexattr_t *);
253 243 extern int pthread_mutexattr_destroy(pthread_mutexattr_t *);
254 244 extern int pthread_mutexattr_setpshared(pthread_mutexattr_t *, int);
255 245 extern int pthread_mutexattr_getpshared(
256 246 const pthread_mutexattr_t *_RESTRICT_KYWD, int *_RESTRICT_KYWD);
257 247 extern int pthread_mutexattr_setprotocol(pthread_mutexattr_t *, int);
258 248 extern int pthread_mutexattr_getprotocol(
259 249 const pthread_mutexattr_t *_RESTRICT_KYWD, int *_RESTRICT_KYWD);
260 250 extern int pthread_mutexattr_setprioceiling(pthread_mutexattr_t *, int);
261 251 extern int pthread_mutexattr_getprioceiling(
262 252 const pthread_mutexattr_t *_RESTRICT_KYWD, int *_RESTRICT_KYWD);
263 253 extern int pthread_mutexattr_setrobust(pthread_mutexattr_t *, int);
264 254 extern int pthread_mutexattr_getrobust(
265 255 const pthread_mutexattr_t *_RESTRICT_KYWD, int *_RESTRICT_KYWD);
266 256 extern int pthread_mutex_init(pthread_mutex_t *_RESTRICT_KYWD,
267 257 const pthread_mutexattr_t *_RESTRICT_KYWD);
268 258 extern int pthread_mutex_consistent(pthread_mutex_t *);
269 259 extern int pthread_mutex_destroy(pthread_mutex_t *);
270 260 extern int pthread_mutex_lock(pthread_mutex_t *);
271 261 extern int pthread_mutex_timedlock(pthread_mutex_t *_RESTRICT_KYWD,
272 262 const struct timespec *_RESTRICT_KYWD);
273 263 extern int pthread_mutex_reltimedlock_np(pthread_mutex_t *_RESTRICT_KYWD,
274 264 const struct timespec *_RESTRICT_KYWD);
275 265 extern int pthread_mutex_unlock(pthread_mutex_t *);
276 266 extern int pthread_mutex_trylock(pthread_mutex_t *);
277 267 extern int pthread_mutex_setprioceiling(pthread_mutex_t *_RESTRICT_KYWD,
278 268 int, int *_RESTRICT_KYWD);
279 269 extern int pthread_mutex_getprioceiling(const pthread_mutex_t *_RESTRICT_KYWD,
280 270 int *_RESTRICT_KYWD);
281 271 extern int pthread_condattr_init(pthread_condattr_t *);
282 272 extern int pthread_condattr_destroy(pthread_condattr_t *);
283 273 extern int pthread_condattr_setclock(pthread_condattr_t *, clockid_t);
284 274 extern int pthread_condattr_getclock(const pthread_condattr_t *_RESTRICT_KYWD,
285 275 clockid_t *_RESTRICT_KYWD);
286 276 extern int pthread_condattr_setpshared(pthread_condattr_t *, int);
287 277 extern int pthread_condattr_getpshared(const pthread_condattr_t *_RESTRICT_KYWD,
288 278 int *_RESTRICT_KYWD);
289 279 extern int pthread_cond_init(pthread_cond_t *_RESTRICT_KYWD,
290 280 const pthread_condattr_t *_RESTRICT_KYWD);
291 281 extern int pthread_cond_destroy(pthread_cond_t *);
292 282 extern int pthread_cond_broadcast(pthread_cond_t *);
293 283 extern int pthread_cond_signal(pthread_cond_t *);
294 284 extern int pthread_cond_wait(pthread_cond_t *_RESTRICT_KYWD,
295 285 pthread_mutex_t *_RESTRICT_KYWD);
296 286 extern int pthread_cond_timedwait(pthread_cond_t *_RESTRICT_KYWD,
297 287 pthread_mutex_t *_RESTRICT_KYWD, const struct timespec *_RESTRICT_KYWD);
298 288 extern int pthread_cond_reltimedwait_np(pthread_cond_t *_RESTRICT_KYWD,
299 289 pthread_mutex_t *_RESTRICT_KYWD, const struct timespec *_RESTRICT_KYWD);
300 290 extern int pthread_attr_getguardsize(const pthread_attr_t *_RESTRICT_KYWD,
301 291 size_t *_RESTRICT_KYWD);
302 292 extern int pthread_attr_setguardsize(pthread_attr_t *, size_t);
303 293 extern int pthread_getconcurrency(void);
304 294 extern int pthread_setconcurrency(int);
305 295 extern int pthread_mutexattr_settype(pthread_mutexattr_t *, int);
306 296 extern int pthread_mutexattr_gettype(const pthread_mutexattr_t *_RESTRICT_KYWD,
307 297 int *_RESTRICT_KYWD);
308 298 extern int pthread_rwlock_init(pthread_rwlock_t *_RESTRICT_KYWD,
309 299 const pthread_rwlockattr_t *_RESTRICT_KYWD);
310 300 extern int pthread_rwlock_destroy(pthread_rwlock_t *);
311 301 extern int pthread_rwlock_rdlock(pthread_rwlock_t *);
312 302 extern int pthread_rwlock_timedrdlock(pthread_rwlock_t *_RESTRICT_KYWD,
313 303 const struct timespec *_RESTRICT_KYWD);
314 304 extern int pthread_rwlock_reltimedrdlock_np(pthread_rwlock_t *_RESTRICT_KYWD,
315 305 const struct timespec *_RESTRICT_KYWD);
316 306 extern int pthread_rwlock_tryrdlock(pthread_rwlock_t *);
317 307 extern int pthread_rwlock_wrlock(pthread_rwlock_t *);
318 308 extern int pthread_rwlock_timedwrlock(pthread_rwlock_t *_RESTRICT_KYWD,
319 309 const struct timespec *_RESTRICT_KYWD);
320 310 extern int pthread_rwlock_reltimedwrlock_np(pthread_rwlock_t *_RESTRICT_KYWD,
321 311 const struct timespec *_RESTRICT_KYWD);
322 312 extern int pthread_rwlock_trywrlock(pthread_rwlock_t *);
323 313 extern int pthread_rwlock_unlock(pthread_rwlock_t *);
324 314 extern int pthread_rwlockattr_init(pthread_rwlockattr_t *);
325 315 extern int pthread_rwlockattr_destroy(pthread_rwlockattr_t *);
326 316 extern int pthread_rwlockattr_getpshared(
327 317 const pthread_rwlockattr_t *_RESTRICT_KYWD, int *_RESTRICT_KYWD);
328 318 extern int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *, int);
329 319 extern int pthread_spin_init(pthread_spinlock_t *, int);
330 320 extern int pthread_spin_destroy(pthread_spinlock_t *);
331 321 extern int pthread_spin_lock(pthread_spinlock_t *);
332 322 extern int pthread_spin_trylock(pthread_spinlock_t *);
333 323 extern int pthread_spin_unlock(pthread_spinlock_t *);
334 324 extern int pthread_barrierattr_init(pthread_barrierattr_t *);
335 325 extern int pthread_barrierattr_destroy(pthread_barrierattr_t *);
336 326 extern int pthread_barrierattr_setpshared(pthread_barrierattr_t *, int);
337 327 extern int pthread_barrierattr_getpshared(
338 328 const pthread_barrierattr_t *_RESTRICT_KYWD, int *_RESTRICT_KYWD);
339 329 extern int pthread_barrier_init(pthread_barrier_t *_RESTRICT_KYWD,
↓ open down ↓ |
142 lines elided |
↑ open up ↑ |
340 330 const pthread_barrierattr_t *_RESTRICT_KYWD, uint_t);
341 331 extern int pthread_barrier_destroy(pthread_barrier_t *);
342 332 extern int pthread_barrier_wait(pthread_barrier_t *);
343 333
344 334 /* Historical names -- present only for binary compatibility */
345 335 extern int pthread_mutex_consistent_np(pthread_mutex_t *);
346 336 extern int pthread_mutexattr_setrobust_np(pthread_mutexattr_t *, int);
347 337 extern int pthread_mutexattr_getrobust_np(
348 338 const pthread_mutexattr_t *_RESTRICT_KYWD, int *_RESTRICT_KYWD);
349 339
350 -#else /* __STDC__ */
351 -
352 -/*
353 - * function prototypes - thread related calls
354 - */
355 -extern int pthread_atfork();
356 -extern int pthread_attr_init();
357 -extern int pthread_attr_destroy();
358 -extern int pthread_attr_setstack();
359 -extern int pthread_attr_getstack();
360 -extern int pthread_attr_setstacksize();
361 -extern int pthread_attr_getstacksize();
362 -extern int pthread_attr_setstackaddr();
363 -extern int pthread_attr_getstackaddr();
364 -extern int pthread_attr_setdetachstate();
365 -extern int pthread_attr_getdetachstate();
366 -extern int pthread_attr_setscope();
367 -extern int pthread_attr_getscope();
368 -extern int pthread_attr_setinheritsched();
369 -extern int pthread_attr_getinheritsched();
370 -extern int pthread_attr_setschedpolicy();
371 -extern int pthread_attr_getschedpolicy();
372 -extern int pthread_attr_setschedparam();
373 -extern int pthread_attr_getschedparam();
374 -extern int pthread_create();
375 -extern int pthread_once();
376 -extern int pthread_join();
377 -extern int pthread_detach();
378 -extern void pthread_exit();
379 -extern int pthread_cancel();
380 -extern int pthread_setschedparam();
381 -extern int pthread_getschedparam();
382 -extern int pthread_setschedprio();
383 -extern int pthread_setcancelstate();
384 -extern int pthread_setcanceltype();
385 -extern void pthread_testcancel();
386 -extern int pthread_equal();
387 -extern int pthread_key_create();
388 -extern int pthread_key_create_once_np();
389 -extern int pthread_key_delete();
390 -extern int pthread_setspecific();
391 -extern void *pthread_getspecific();
392 -extern pthread_t pthread_self();
393 -/*
394 - * function prototypes - synchronization related calls
395 - */
396 -extern int pthread_mutexattr_init();
397 -extern int pthread_mutexattr_destroy();
398 -extern int pthread_mutexattr_setpshared();
399 -extern int pthread_mutexattr_getpshared();
400 -extern int pthread_mutexattr_setprotocol();
401 -extern int pthread_mutexattr_getprotocol();
402 -extern int pthread_mutexattr_setprioceiling();
403 -extern int pthread_mutexattr_getprioceiling();
404 -extern int pthread_mutexattr_setrobust();
405 -extern int pthread_mutexattr_getrobust();
406 -extern int pthread_mutex_init();
407 -extern int pthread_mutex_consistent();
408 -extern int pthread_mutex_destroy();
409 -extern int pthread_mutex_lock();
410 -extern int pthread_mutex_timedlock();
411 -extern int pthread_mutex_reltimedlock_np();
412 -extern int pthread_mutex_unlock();
413 -extern int pthread_mutex_trylock();
414 -extern int pthread_mutex_setprioceiling();
415 -extern int pthread_mutex_getprioceiling();
416 -extern int pthread_condattr_init();
417 -extern int pthread_condattr_destroy();
418 -extern int pthread_condattr_setclock();
419 -extern int pthread_condattr_getclock();
420 -extern int pthread_condattr_setpshared();
421 -extern int pthread_condattr_getpshared();
422 -extern int pthread_cond_init();
423 -extern int pthread_cond_destroy();
424 -extern int pthread_cond_broadcast();
425 -extern int pthread_cond_signal();
426 -extern int pthread_cond_wait();
427 -extern int pthread_cond_timedwait();
428 -extern int pthread_cond_reltimedwait_np();
429 -extern int pthread_attr_getguardsize();
430 -extern int pthread_attr_setguardsize();
431 -extern int pthread_getconcurrency();
432 -extern int pthread_setconcurrency();
433 -extern int pthread_mutexattr_settype();
434 -extern int pthread_mutexattr_gettype();
435 -extern int pthread_rwlock_init();
436 -extern int pthread_rwlock_destroy();
437 -extern int pthread_rwlock_rdlock();
438 -extern int pthread_rwlock_tryrdlock();
439 -extern int pthread_rwlock_wrlock();
440 -extern int pthread_rwlock_trywrlock();
441 -extern int pthread_rwlock_unlock();
442 -extern int pthread_rwlockattr_init();
443 -extern int pthread_rwlockattr_destroy();
444 -extern int pthread_rwlockattr_getpshared();
445 -extern int pthread_rwlockattr_setpshared();
446 -extern int pthread_spin_init();
447 -extern int pthread_spin_destroy();
448 -extern int pthread_spin_lock();
449 -extern int pthread_spin_trylock();
450 -extern int pthread_spin_unlock();
451 -extern int pthread_barrierattr_init();
452 -extern int pthread_barrierattr_destroy();
453 -extern int pthread_barrierattr_setpshared();
454 -extern int pthread_barrierattr_getpshared();
455 -extern int pthread_barrier_init();
456 -extern int pthread_barrier_destroy();
457 -extern int pthread_barrier_wait();
458 -
459 -/* Historical names -- present only for binary compatibility */
460 -extern int pthread_mutex_consistent_np();
461 -extern int pthread_mutexattr_setrobust_np();
462 -extern int pthread_mutexattr_getrobust_np();
463 -
464 -#endif /* __STDC__ */
465 -
466 340 #endif /* _ASM */
467 341
468 342 #ifdef __cplusplus
469 343 }
470 344 #endif
471 345
472 346 #endif /* _PTHREAD_H */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX