![]() |
posix-next API 0.1.0
Out-of-tree Zephyr POSIX module
|
POSIX Threads Base option group. More...
Macros | |
| #define | PTHREAD_CANCEL_ASYNCHRONOUS 1 |
| Thread cancellation is performed immediately. | |
| #define | PTHREAD_CANCEL_ENABLE 0 |
| Cancellation is enabled (default). | |
| #define | PTHREAD_CANCEL_DEFERRED 0 |
| Cancellation is deferred until a cancellation point (default). | |
| #define | PTHREAD_CANCEL_DISABLE 1 |
| Cancellation delivery is disabled. | |
| #define | PTHREAD_CANCELED ((void *)-1) |
| Value returned by pthread_join() for a cancelled thread. | |
| #define | PTHREAD_CREATE_DETACHED 1 |
| Thread is created in the detached state. | |
| #define | PTHREAD_CREATE_JOINABLE 0 |
| Thread is created in the joinable state (default). | |
| #define | PTHREAD_ONCE_INIT _PTHREAD_ONCE_INITIALIZER |
| Static initialiser for pthread_once_t objects. | |
| #define | PTHREAD_PRIO_NONE 0 |
| Mutex protocol: no priority inheritance or ceiling. | |
| #define | PTHREAD_COND_INITIALIZER _PTHREAD_COND_INITIALIZER |
| Static initialiser for pthread_cond_t objects. | |
| #define | PTHREAD_MUTEX_INITIALIZER _PTHREAD_MUTEX_INITIALIZER |
| Static initialiser for pthread_mutex_t objects. | |
| #define | pthread_cleanup_push(_rtn, _arg) |
| Push a cleanup handler onto the calling thread's cleanup stack. | |
| #define | pthread_cleanup_pop(_ex) |
| Pop a cleanup handler from the calling thread's cleanup stack. | |
Functions | |
| int | pthread_kill (pthread_t thread, int sig) |
| Send a signal to a specific thread. | |
| int | pthread_sigmask (int how, const sigset_t *ZRESTRICT set, sigset_t *ZRESTRICT oset) |
| Examine and change blocked signals for the calling thread. | |
| int | pthread_attr_destroy (pthread_attr_t *attr) |
| Destroy a thread attributes object. | |
| int | pthread_attr_getdetachstate (const pthread_attr_t *attr, int *detachstate) |
| Get the detach state attribute of a thread attributes object. | |
| int | pthread_attr_getschedparam (const pthread_attr_t *ZRESTRICT attr, struct sched_param *ZRESTRICT param) |
| Get the scheduling parameter attribute of a thread attributes object. | |
| int | pthread_attr_init (pthread_attr_t *attr) |
| Initialise a thread attributes object with default values. | |
| int | pthread_attr_setdetachstate (pthread_attr_t *attr, int detachstate) |
| Set the detach state attribute of a thread attributes object. | |
| int | pthread_attr_setschedparam (pthread_attr_t *ZRESTRICT attr, const struct sched_param *ZRESTRICT param) |
| Set the scheduling parameter attribute of a thread attributes object. | |
| int | pthread_cancel (pthread_t thread) |
| Send a cancellation request to a thread. | |
| int | pthread_cond_broadcast (pthread_cond_t *cond) |
| Broadcast a condition variable, waking all waiting threads. | |
| int | pthread_cond_destroy (pthread_cond_t *cond) |
| Destroy a condition variable. | |
| int | pthread_cond_init (pthread_cond_t *ZRESTRICT cond, const pthread_condattr_t *ZRESTRICT attr) |
| Initialise a condition variable. | |
| int | pthread_cond_signal (pthread_cond_t *cond) |
| Signal a condition variable, waking at least one waiting thread. | |
| int | pthread_cond_timedwait (pthread_cond_t *ZRESTRICT cond, pthread_mutex_t *ZRESTRICT mutex, const struct timespec *ZRESTRICT abstime) |
| Wait on a condition variable with an absolute timeout (CLOCK_REALTIME). | |
| int | pthread_cond_wait (pthread_cond_t *ZRESTRICT cond, pthread_mutex_t *ZRESTRICT mutex) |
| Wait on a condition variable. | |
| int | pthread_condattr_destroy (pthread_condattr_t *attr) |
| Destroy a condition variable attributes object. | |
| int | pthread_condattr_init (pthread_condattr_t *attr) |
| Initialise a condition variable attributes object with default values. | |
| int | pthread_create (pthread_t *ZRESTRICT thread, const pthread_attr_t *ZRESTRICT attr, void *(*start_routine)(void *), void *ZRESTRICT arg) |
| Create a new thread. | |
| int | pthread_detach (pthread_t thread) |
| Detach a thread, releasing its resources automatically on termination. | |
| int | pthread_equal (pthread_t t1, pthread_t t2) |
| Compare two thread IDs. | |
| void | pthread_exit (void *value_ptr) |
| Terminate the calling thread. | |
| void * | pthread_getspecific (pthread_key_t key) |
| Get the thread-specific value associated with a key. | |
| int | pthread_join (pthread_t thread, void **value_ptr) |
| Wait for a thread to terminate and retrieve its exit status. | |
| int | pthread_key_create (pthread_key_t *key, void(*destructor)(void *)) |
| Create a thread-specific data key. | |
| int | pthread_key_delete (pthread_key_t key) |
| Delete a thread-specific data key. | |
| int | pthread_mutex_destroy (pthread_mutex_t *mutex) |
| Destroy a mutex. | |
| int | pthread_mutex_init (pthread_mutex_t *ZRESTRICT mutex, const pthread_mutexattr_t *ZRESTRICT attr) |
| Initialise a mutex. | |
| int | pthread_mutex_lock (pthread_mutex_t *mutex) |
| Lock a mutex, blocking until it is available. | |
| int | pthread_mutex_timedlock (pthread_mutex_t *ZRESTRICT mutex, const struct timespec *ZRESTRICT abstime) |
| Lock a mutex with an absolute timeout. | |
| int | pthread_mutex_trylock (pthread_mutex_t *mutex) |
| Try to lock a mutex without blocking. | |
| int | pthread_mutex_unlock (pthread_mutex_t *mutex) |
| Unlock a mutex. | |
| int | pthread_mutexattr_destroy (pthread_mutexattr_t *attr) |
| Destroy a mutex attributes object. | |
| int | pthread_mutexattr_init (pthread_mutexattr_t *attr) |
| Initialise a mutex attributes object with default values. | |
| int | pthread_once (pthread_once_t *once_control, void(*init_routine)(void)) |
| Ensure a one-time initialisation routine is called exactly once. | |
| pthread_t | pthread_self (void) |
| Return the thread ID of the calling thread. | |
| int | pthread_setcancelstate (int state, int *oldstate) |
| Set the cancellability state of the calling thread. | |
| int | pthread_setcanceltype (int type, int *oldtype) |
| Set the cancellability type of the calling thread. | |
| int | pthread_setspecific (pthread_key_t key, const void *value) |
| Set the thread-specific value associated with a key. | |
| void | pthread_testcancel (void) |
| Create a cancellation point in the calling thread. | |
| int | sched_yield (void) |
| Yield the processor to another thread of equal or higher priority. | |
POSIX Threads Base option group.
| #define PTHREAD_CANCEL_ASYNCHRONOUS 1 |
| #define PTHREAD_CANCEL_DEFERRED 0 |
| #define PTHREAD_CANCEL_DISABLE 1 |
| #define PTHREAD_CANCEL_ENABLE 0 |
| #define PTHREAD_CANCELED ((void *)-1) |
Value returned by pthread_join() for a cancelled thread.
| #define pthread_cleanup_pop | ( | _ex | ) |
Pop a cleanup handler from the calling thread's cleanup stack.
| _ex | If non-zero, the handler is executed before being removed. |
| #define pthread_cleanup_push | ( | _rtn, | |
| _arg | |||
| ) |
Push a cleanup handler onto the calling thread's cleanup stack.
The handler _rtn is called with _arg when the thread exits or calls pthread_cleanup_pop() with a non-zero argument.
| #define PTHREAD_COND_INITIALIZER _PTHREAD_COND_INITIALIZER |
| #define PTHREAD_CREATE_DETACHED 1 |
| #define PTHREAD_CREATE_JOINABLE 0 |
| #define PTHREAD_MUTEX_INITIALIZER _PTHREAD_MUTEX_INITIALIZER |
| #define PTHREAD_ONCE_INIT _PTHREAD_ONCE_INITIALIZER |
| #define PTHREAD_PRIO_NONE 0 |
| int pthread_attr_destroy | ( | pthread_attr_t * | attr | ) |
| int pthread_attr_getdetachstate | ( | const pthread_attr_t * | attr, |
| int * | detachstate | ||
| ) |
| int pthread_attr_getschedparam | ( | const pthread_attr_t *ZRESTRICT | attr, |
| struct sched_param *ZRESTRICT | param | ||
| ) |
| int pthread_attr_init | ( | pthread_attr_t * | attr | ) |
| int pthread_attr_setdetachstate | ( | pthread_attr_t * | attr, |
| int | detachstate | ||
| ) |
| int pthread_attr_setschedparam | ( | pthread_attr_t *ZRESTRICT | attr, |
| const struct sched_param *ZRESTRICT | param | ||
| ) |
| int pthread_cancel | ( | pthread_t | thread | ) |
| int pthread_cond_broadcast | ( | pthread_cond_t * | cond | ) |
| int pthread_cond_destroy | ( | pthread_cond_t * | cond | ) |
| int pthread_cond_init | ( | pthread_cond_t *ZRESTRICT | cond, |
| const pthread_condattr_t *ZRESTRICT | attr | ||
| ) |
| int pthread_cond_signal | ( | pthread_cond_t * | cond | ) |
| int pthread_cond_timedwait | ( | pthread_cond_t *ZRESTRICT | cond, |
| pthread_mutex_t *ZRESTRICT | mutex, | ||
| const struct timespec *ZRESTRICT | abstime | ||
| ) |
| int pthread_cond_wait | ( | pthread_cond_t *ZRESTRICT | cond, |
| pthread_mutex_t *ZRESTRICT | mutex | ||
| ) |
| int pthread_condattr_destroy | ( | pthread_condattr_t * | attr | ) |
| int pthread_condattr_init | ( | pthread_condattr_t * | attr | ) |
| int pthread_create | ( | pthread_t *ZRESTRICT | thread, |
| const pthread_attr_t *ZRESTRICT | attr, | ||
| void *(*)(void *) | start_routine, | ||
| void *ZRESTRICT | arg | ||
| ) |
| int pthread_detach | ( | pthread_t | thread | ) |
| int pthread_equal | ( | pthread_t | t1, |
| pthread_t | t2 | ||
| ) |
| void pthread_exit | ( | void * | value_ptr | ) |
| void * pthread_getspecific | ( | pthread_key_t | key | ) |
| int pthread_join | ( | pthread_t | thread, |
| void ** | value_ptr | ||
| ) |
| int pthread_key_create | ( | pthread_key_t * | key, |
| void(*)(void *) | destructor | ||
| ) |
| int pthread_key_delete | ( | pthread_key_t | key | ) |
| int pthread_kill | ( | pthread_t | thread, |
| int | sig | ||
| ) |
| int pthread_mutex_destroy | ( | pthread_mutex_t * | mutex | ) |
| int pthread_mutex_init | ( | pthread_mutex_t *ZRESTRICT | mutex, |
| const pthread_mutexattr_t *ZRESTRICT | attr | ||
| ) |
| int pthread_mutex_lock | ( | pthread_mutex_t * | mutex | ) |
| int pthread_mutex_timedlock | ( | pthread_mutex_t *ZRESTRICT | mutex, |
| const struct timespec *ZRESTRICT | abstime | ||
| ) |
| int pthread_mutex_trylock | ( | pthread_mutex_t * | mutex | ) |
| int pthread_mutex_unlock | ( | pthread_mutex_t * | mutex | ) |
| int pthread_mutexattr_destroy | ( | pthread_mutexattr_t * | attr | ) |
| int pthread_mutexattr_init | ( | pthread_mutexattr_t * | attr | ) |
| int pthread_once | ( | pthread_once_t * | once_control, |
| void(*)(void) | init_routine | ||
| ) |
| pthread_t pthread_self | ( | void | ) |
| int pthread_setcancelstate | ( | int | state, |
| int * | oldstate | ||
| ) |
| int pthread_setcanceltype | ( | int | type, |
| int * | oldtype | ||
| ) |
| int pthread_setspecific | ( | pthread_key_t | key, |
| const void * | value | ||
| ) |
| void pthread_testcancel | ( | void | ) |
| int sched_yield | ( | void | ) |
Yield the processor to another thread of equal or higher priority.