47#if defined(_POSIX_THREADS)
64#if !defined(__rtems__)
65 int pthread_atfork(
void (*prepare)(
void),
void (*parent)(
void),
86#define PTHREAD_MUTEX_INITIALIZER MUTEX_INITIALIZER
95#if defined(_POSIX_TIMEOUTS)
97 int pthread_mutex_timedlock(
pthread_mutex_t *mutex,
const struct timespec *timeout);
118#define PTHREAD_COND_INITIALIZER COND_INITIALIZER
130 const struct timespec *abstime);
132#if defined(_POSIX_THREAD_PRIORITY_SCHEDULING)
136 int pthread_attr_setscope(
pthread_attr_t *attr,
int contentionscope);
137 int pthread_attr_getscope(
const pthread_attr_t *attr,
int *contentionscope);
138 int pthread_attr_setinheritsched(
pthread_attr_t *attr,
int inheritsched);
139 int pthread_attr_getinheritsched(
const pthread_attr_t *attr,
int *inheritsched);
140 int pthread_attr_setschedpolicy(
pthread_attr_t *attr,
int policy);
141 int pthread_attr_getschedpolicy(
const pthread_attr_t *attr,
int *policy);
148#if defined(_POSIX_THREAD_PRIORITY_SCHEDULING)
157#if defined(_POSIX_THREAD_PRIO_INHERIT) || defined(_POSIX_THREAD_PRIO_PROTECT)
168#if defined(_POSIX_THREAD_PRIO_PROTECT)
172 int pthread_mutex_setprioceiling(
pthread_mutex_t *mutex,
int prioceiling,
int *old_ceiling);
173 int pthread_mutex_getprioceiling(
pthread_mutex_t *mutex,
int *prioceiling);
181 int pthread_attr_getstacksize(
const pthread_attr_t *attr,
size_t *stacksize);
182 int pthread_attr_setstacksize(
pthread_attr_t *attr,
size_t stacksize);
183 int pthread_attr_getstackaddr(
const pthread_attr_t *attr,
void **stackaddr);
184 int pthread_attr_setstackaddr(
pthread_attr_t *attr,
void *stackaddr);
185 int pthread_attr_getdetachstate(
const pthread_attr_t *attr,
int *detachstate);
186 int pthread_attr_setdetachstate(
pthread_attr_t *attr,
int detachstate);
191 void * (*start_routine)(
void *),
void *arg);
195 int pthread_join(
pthread_t thread,
void **value_ptr);
203 void pthread_exit(
void *value_ptr);
221#define PTHREAD_ONCE_INIT { 1, 0 }
223 int pthread_once(
pthread_once_t *once_control,
void (*init_routine)(
void));
227 int pthread_key_create(
pthread_key_t *key,
void (*destructor)(
void *));
231 int pthread_setspecific(
pthread_key_t key,
const void *value);
240#define PTHREAD_CANCEL_ENABLE 0
241#define PTHREAD_CANCEL_DISABLE 1
243#define PTHREAD_CANCEL_DEFERRED 0
244#define PTHREAD_CANCEL_ASYNCHRONOUS 1
246#define PTHREAD_CANCELED ((void *) -1)
252 int pthread_setcancelstate(
int state,
int *oldstate);
253 int pthread_setcanceltype(
int type,
int *oldtype);
254 void pthread_testcancel(
void);
258 void pthread_cleanup_push(
void (*routine)(
void *),
void *arg);
259 void pthread_cleanup_pop(
int execute);
261#if defined(_POSIX_THREAD_CPUTIME)
265 int pthread_getcpuclockid(
pthread_t thread_id, clockid_t *clock_id);
269 int pthread_attr_setcputime(
pthread_attr_t *attr,
int clock_allowed);
271 int pthread_attr_getcputime(
pthread_attr_t *attr,
int *clock_allowed);
Basic sys/_pthread.h file for newlib.
Basic sys/sched.h file for newlib.
kthread_key_t pthread_key_t
POSIX thread data key.
Definition sched.h:74
kthread_once_t pthread_once_t
POSIX once control.
Definition sched.h:73
Condition variable.
Definition cond.h:62
Structure describing one running thread.
Definition thread.h:169
Mutual exclusion lock type.
Definition mutex.h:68
POSIX thread attributes.
Definition sched.h:62
POSIX condition variable attributes.
Definition sched.h:52
POSIX mutex attributes.
Definition sched.h:42
Scheduling Parameters, P1003.1b-1993, p.
Definition sched.h:23
KOS-implementation of select C11 and POSIX extensions.