36#include <sys/features.h>
46#define PTHREAD_PROCESS_PRIVATE 0
47#define PTHREAD_PROCESS_SHARED 1
51#define PTHREAD_SCOPE_PROCESS 0
52#define PTHREAD_SCOPE_SYSTEM 1
54#define PTHREAD_CANCEL_DISABLE 0
55#define PTHREAD_CANCEL_ENABLE 1
57#define PTHREAD_CANCEL_DEFERRED 0
58#define PTHREAD_CANCEL_ASYNCHRONOUS 1
60#define PTHREAD_CREATE_DETACHED 0
61#define PTHREAD_CREATE_JOINABLE 1
63#define PTHREAD_STACK_MIN 256
64#define PTHREAD_STACK_MIN_ALIGNMENT 32
69 void *(*start_routine)(
void *),
void *
__RESTRICT arg);
72void pthread_exit(
void *value_ptr);
73int pthread_join(
pthread_t thread,
void **value_ptr);
75int pthread_setschedprio(
pthread_t thread,
int prio);
77#if __GNU_VISIBLE || __BSD_VISIBLE
78int pthread_getname_np(
pthread_t thread,
char *buf,
size_t buflen);
79int pthread_setname_np(
pthread_t thread,
const char *buf);
84int pthread_setprio(
pthread_t thread,
int prio);
93int pthread_attr_setdetachstate(
pthread_attr_t *attr,
int detachstate);
97int pthread_attr_setguardsize(
pthread_attr_t *attr,
size_t guardsize);
107 void *
__RESTRICT stackaddr,
size_t stacksize);
114int pthread_attr_setscope(
pthread_attr_t *attr,
int contentionscope);
122void pthread_testcancel(
void);
123int pthread_setcancelstate(
int state,
int *oldstate);
124int pthread_setcanceltype(
int type,
int *oldtype);
131#define PTHREAD_COND_INITIALIZER { .__data = { 0 } }
150typedef int pthread_key_t;
151int pthread_key_create(pthread_key_t *key,
void (*destructor)(
void *));
152int pthread_key_delete(pthread_key_t key);
153void *pthread_getspecific(pthread_key_t key);
154int pthread_setspecific(pthread_key_t key,
const void *value);
161#define PTHREAD_MUTEX_INITIALIZER { .__data = { 0 } }
162#define PTHREAD_MUTEX_NORMAL 0
163#define PTHREAD_MUTEX_DEFAULT PTHREAD_MUTEX_NORMAL
164#define PTHREAD_MUTEX_ERRORCHECK 2
165#define PTHREAD_MUTEX_RECURSIVE 3
167#define PTHREAD_MUTEX_ROBUST 0
168#define PTHREAD_MUTEX_STALLED 1
189typedef volatile int pthread_once_t;
190#define PTHREAD_ONCE_INIT 0
192int pthread_once(pthread_once_t *once_control,
void (*init_routine)(
void));
199#define PTHREAD_RWLOCK_INITIALIZER { .__data = { 0 } }
215typedef volatile int pthread_spinlock_t;
217int pthread_spin_init(pthread_spinlock_t *lock,
int pshared);
218int pthread_spin_destroy(pthread_spinlock_t *lock);
219int pthread_spin_lock(pthread_spinlock_t *lock);
220int pthread_spin_trylock(pthread_spinlock_t *lock);
221int pthread_spin_unlock(pthread_spinlock_t *lock);
224#define PTHREAD_BARRIER_SERIAL_THREAD 0x7fffffff
236int pthread_getconcurrency(
void);
237int pthread_setconcurrency(
int new_level);
238int pthread_atfork(
void (*prepare)(
void),
void (*parent)(
void),
239 void (*child)(
void));
241#if __GNU_VISIBLE || __BSD_VISIBLE
244int pthread_yield(
void);
unsigned long int pthread_t
Definition _pthreadtypes.h:11
#define __RESTRICT
Definition cdefs.h:195
Basic sys/sched.h file for newlib.
Definition _pthreadtypes.h:35
Definition _pthreadtypes.h:13
Definition _pthreadtypes.h:18
Scheduling Parameters, P1003.1b-1993, p.
Definition sched.h:23
KOS-implementation of select C11 and POSIX extensions.
Definition _pthreadtypes.h:47
Definition _pthreadtypes.h:95
Definition _pthreadtypes.h:71
Definition _pthreadtypes.h:27
Definition _pthreadtypes.h:59
Definition _pthreadtypes.h:83