46 #if defined(_POSIX_THREADS)
48 #include <sys/types.h>
63 #if !defined(__rtems__)
71 int _EXFUN(pthread_mutexattr_getpshared,
73 int _EXFUN(pthread_mutexattr_setpshared,
78 int _EXFUN(pthread_mutex_init,
87 #define PTHREAD_MUTEX_INITIALIZER MUTEX_INITIALIZER
96 #if defined(_POSIX_TIMEOUTS)
98 int _EXFUN(pthread_mutex_timedlock,
107 int _EXFUN(pthread_condattr_getpshared,
109 int _EXFUN(pthread_condattr_setpshared,
114 int _EXFUN(pthread_cond_init,
123 #define PTHREAD_COND_INITIALIZER COND_INITIALIZER
132 int _EXFUN(pthread_cond_wait,
135 int _EXFUN(pthread_cond_timedwait,
137 const struct timespec *abstime));
139 #if defined(_POSIX_THREAD_PRIORITY_SCHEDULING)
143 int _EXFUN(pthread_attr_setscope,
145 int _EXFUN(pthread_attr_getscope,
147 int _EXFUN(pthread_attr_setinheritsched,
149 int _EXFUN(pthread_attr_getinheritsched,
151 int _EXFUN(pthread_attr_setschedpolicy, (
pthread_attr_t *attr,
int policy));
152 int _EXFUN(pthread_attr_getschedpolicy,
157 int _EXFUN(pthread_attr_setschedparam,
159 int _EXFUN(pthread_attr_getschedparam,
162 #if defined(_POSIX_THREAD_PRIORITY_SCHEDULING)
166 int _EXFUN(pthread_getschedparam,
168 int _EXFUN(pthread_setschedparam,
173 #if defined(_POSIX_THREAD_PRIO_INHERIT) || defined(_POSIX_THREAD_PRIO_PROTECT)
177 int _EXFUN(pthread_mutexattr_setprotocol,
179 int _EXFUN(pthread_mutexattr_getprotocol,
181 int _EXFUN(pthread_mutexattr_setprioceiling,
183 int _EXFUN(pthread_mutexattr_getprioceiling,
188 #if defined(_POSIX_THREAD_PRIO_PROTECT)
192 int _EXFUN(pthread_mutex_setprioceiling,
194 int _EXFUN(pthread_mutex_getprioceiling,
203 int _EXFUN(pthread_attr_getstacksize,
205 int _EXFUN(pthread_attr_setstacksize,
207 int _EXFUN(pthread_attr_getstackaddr,
209 int _EXFUN(pthread_attr_setstackaddr,
211 int _EXFUN(pthread_attr_getdetachstate,
213 int _EXFUN(pthread_attr_setdetachstate,
218 int _EXFUN(pthread_create,
220 void * (*start_routine)(
void *),
void *arg));
224 int _EXFUN(pthread_join, (
pthread_t thread,
void **value_ptr));
228 int _EXFUN(pthread_detach, (
pthread_t thread));
232 void _EXFUN(pthread_exit, (
void *value_ptr));
250 #define PTHREAD_ONCE_INIT { 1, 0 }
252 int _EXFUN(pthread_once,
257 int _EXFUN(pthread_key_create,
262 int _EXFUN(pthread_setspecific, (
pthread_key_t key,
const void *value));
271 #define PTHREAD_CANCEL_ENABLE 0
272 #define PTHREAD_CANCEL_DISABLE 1
274 #define PTHREAD_CANCEL_DEFERRED 0
275 #define PTHREAD_CANCEL_ASYNCHRONOUS 1
277 #define PTHREAD_CANCELED ((void *) -1)
279 int _EXFUN(pthread_cancel, (
pthread_t thread));
283 int _EXFUN(pthread_setcancelstate, (
int state,
int *oldstate));
284 int _EXFUN(pthread_setcanceltype, (
int type,
int *oldtype));
285 void _EXFUN(pthread_testcancel, (
void));
289 void _EXFUN(pthread_cleanup_push, (
void (*routine)(
void *),
void *arg));
290 void _EXFUN(pthread_cleanup_pop, (
int execute));
292 #if defined(_POSIX_THREAD_CPUTIME)
296 int _EXFUN(pthread_getcpuclockid,
297 (
pthread_t thread_id, clockid_t *clock_id));
301 int _EXFUN(pthread_attr_setcputime,
304 int _EXFUN(pthread_attr_getcputime,
kthread_key_t pthread_key_t
POSIX thread data key.
Definition: sched.h:74
Object type backing kthread_once.
Definition: once.h:34
Scheduling Parameters, P1003.1b-1993, p. 249.
Definition: sched.h:23
POSIX mutex attributes.
Definition: sched.h:42
Basic sys/sched.h file for newlib.
Condition variable.
Definition: cond.h:61
Mutual exclusion lock type.
Definition: mutex.h:70
Basic sys/_pthread.h file for newlib.
Structure describing one running thread.
Definition: thread.h:90
POSIX thread attributes.
Definition: sched.h:62
POSIX condition variable attributes.
Definition: sched.h:52