Rev 6099 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6099 | Rev 6536 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | /* pthread.h |
1 | /* |
- | 2 | * Written by Joel Sherrill |
|
2 | * |
3 | * |
3 | * Written by Joel Sherrill |
- | |
4 | * |
- | |
5 | * COPYRIGHT (c) 1989-2013. |
4 | * COPYRIGHT (c) 1989-2013, 2015. |
6 | * On-Line Applications Research Corporation (OAR). |
5 | * On-Line Applications Research Corporation (OAR). |
7 | * |
6 | * |
8 | * Permission to use, copy, modify, and distribute this software for any |
7 | * Permission to use, copy, modify, and distribute this software for any |
9 | * purpose without fee is hereby granted, provided that this entire notice |
8 | * purpose without fee is hereby granted, provided that this entire notice |
10 | * is included in all copies of any software which is or includes a copy |
9 | * is included in all copies of any software which is or includes a copy |
Line 12... | Line 11... | ||
12 | * |
11 | * |
13 | * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED |
12 | * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED |
14 | * WARRANTY. IN PARTICULAR, THE AUTHOR MAKES NO REPRESENTATION |
13 | * WARRANTY. IN PARTICULAR, THE AUTHOR MAKES NO REPRESENTATION |
15 | * OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS |
14 | * OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS |
16 | * SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. |
15 | * SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. |
17 | * |
- | |
18 | * $Id$ |
- | |
19 | */ |
16 | */ |
Line 20... | Line 17... | ||
20 | 17 | ||
21 | #ifndef __PTHREAD_h |
18 | #ifndef __PTHREAD_h |
Line 94... | Line 91... | ||
94 | 91 | ||
Line 95... | Line 92... | ||
95 | /* Condition Variable Initialization Attributes, P1003.1c/Draft 10, p. 96 */ |
92 | /* Condition Variable Initialization Attributes, P1003.1c/Draft 10, p. 96 */ |
96 | 93 | ||
- | 94 | int _EXFUN(pthread_condattr_init, (pthread_condattr_t *__attr)); |
|
- | 95 | int _EXFUN(pthread_condattr_destroy, (pthread_condattr_t *__attr)); |
|
- | 96 | ||
- | 97 | int _EXFUN(pthread_condattr_getclock, |
|
- | 98 | (const pthread_condattr_t *__restrict __attr, |
|
- | 99 | clockid_t *__restrict __clock_id)); |
|
- | 100 | int _EXFUN(pthread_condattr_setclock, |
|
97 | int _EXFUN(pthread_condattr_init, (pthread_condattr_t *__attr)); |
101 | (pthread_condattr_t *__attr, clockid_t __clock_id)); |
98 | int _EXFUN(pthread_condattr_destroy, (pthread_condattr_t *__attr)); |
102 | |
99 | int _EXFUN(pthread_condattr_getpshared, |
103 | int _EXFUN(pthread_condattr_getpshared, |
100 | (_CONST pthread_condattr_t *__attr, int *__pshared)); |
104 | (_CONST pthread_condattr_t *__attr, int *__pshared)); |
Line 159... | Line 163... | ||
159 | int _EXFUN(pthread_getschedparam, |
163 | int _EXFUN(pthread_getschedparam, |
160 | (pthread_t __pthread, int *__policy, struct sched_param *__param)); |
164 | (pthread_t __pthread, int *__policy, struct sched_param *__param)); |
161 | int _EXFUN(pthread_setschedparam, |
165 | int _EXFUN(pthread_setschedparam, |
162 | (pthread_t __pthread, int __policy, struct sched_param *__param)); |
166 | (pthread_t __pthread, int __policy, struct sched_param *__param)); |
Line -... | Line 167... | ||
- | 167 | ||
- | 168 | /* Set Scheduling Priority of a Thread */ |
|
- | 169 | int _EXFUN(pthread_setschedprio, (pthread_t thread, int prio)); |
|
163 | 170 | ||
Line 164... | Line 171... | ||
164 | #endif /* defined(_POSIX_THREAD_PRIORITY_SCHEDULING) */ |
171 | #endif /* defined(_POSIX_THREAD_PRIORITY_SCHEDULING) */ |
Line 165... | Line 172... | ||
165 | 172 | ||
Line 251... | Line 258... | ||
251 | 258 | ||
Line 252... | Line 259... | ||
252 | int _EXFUN(pthread_detach, (pthread_t __pthread)); |
259 | int _EXFUN(pthread_detach, (pthread_t __pthread)); |
Line 253... | Line 260... | ||
253 | 260 | ||
Line 254... | Line 261... | ||
254 | /* Thread Termination, p1003.1c/Draft 10, p. 150 */ |
261 | /* Thread Termination, p1003.1c/Draft 10, p. 150 */ |
Line 255... | Line 262... | ||
255 | 262 | ||
Line 256... | Line 263... | ||
256 | void _EXFUN(pthread_exit, (void *__value_ptr)); |
263 | void _EXFUN(pthread_exit, (void *__value_ptr)) __dead2; |
Line 257... | Line 264... | ||
257 | 264 | ||
Line -... | Line 265... | ||
- | 265 | /* Get Calling Thread's ID, p1003.1c/Draft 10, p. XXX */ |
|
- | 266 | ||
- | 267 | pthread_t _EXFUN(pthread_self, (void)); |
|
- | 268 | ||
- | 269 | /* Compare Thread IDs, p1003.1c/Draft 10, p. 153 */ |
|
- | 270 | ||
- | 271 | int _EXFUN(pthread_equal, (pthread_t __t1, pthread_t __t2)); |
|
- | 272 | ||
258 | /* Get Calling Thread's ID, p1003.1c/Draft 10, p. XXX */ |
273 | /* Retrieve ID of a Thread's CPU Time Clock */ |
Line 259... | Line 274... | ||
259 | 274 | int _EXFUN(pthread_getcpuclockid, |
|
Line 260... | Line 275... | ||
260 | pthread_t _EXFUN(pthread_self, (void)); |
275 | (pthread_t thread, clockid_t *clock_id)); |
Line 327... | Line 342... | ||
327 | 342 | ||
328 | #define pthread_cleanup_pop(_execute) \ |
343 | #define pthread_cleanup_pop(_execute) \ |
329 | _pthread_cleanup_pop(&_pthread_clup_ctx, (_execute)); \ |
344 | _pthread_cleanup_pop(&_pthread_clup_ctx, (_execute)); \ |
Line 330... | Line 345... | ||
330 | } while (0) |
345 | } while (0) |
331 | 346 | ||
332 | #if defined(_GNU_SOURCE) |
347 | #if __GNU_VISIBLE |
333 | void _EXFUN(_pthread_cleanup_push_defer, |
348 | void _EXFUN(_pthread_cleanup_push_defer, |
Line 334... | Line 349... | ||
334 | (struct _pthread_cleanup_context *_context, |
349 | (struct _pthread_cleanup_context *_context, |
Line 345... | Line 360... | ||
345 | _pthread_cleanup_push_defer(&_pthread_clup_ctx, (_routine), (_arg)) |
360 | _pthread_cleanup_push_defer(&_pthread_clup_ctx, (_routine), (_arg)) |
Line 346... | Line 361... | ||
346 | 361 | ||
347 | #define pthread_cleanup_pop_restore_np(_execute) \ |
362 | #define pthread_cleanup_pop_restore_np(_execute) \ |
348 | _pthread_cleanup_pop_restore(&_pthread_clup_ctx, (_execute)); \ |
363 | _pthread_cleanup_pop_restore(&_pthread_clup_ctx, (_execute)); \ |
349 | } while (0) |
364 | } while (0) |
Line 350... | Line 365... | ||
350 | #endif /* defined(_GNU_SOURCE) */ |
365 | #endif /* __GNU_VISIBLE */ |
Line 351... | Line 366... | ||
351 | 366 |