C++ Library, mos@ua
0.9
cpplib-mos
|
POSIX threads library wrapper module. More...
#include <pthread.h>
Go to the source code of this file.
Functions | |
Thread handling | |
int | thread_equal (pthread_t t1, pthread_t t2) |
pthread_equal wrapper function. More... | |
void | thread_create (pthread_t *t, pthread_attr_t *attr, void *(*thread_main)(void *), void *arg) |
pthread_create wrapper function. More... | |
pthread_t | thread_self () |
pthread_self wrapper function. More... | |
void | thread_sched_yield (void) |
sched_yield wrapper function. More... | |
void | thread_exit (void *retval) |
pthread_exit wrapper function. More... | |
void | thread_detach (pthread_t thread) |
pthread_detach wrapper function. More... | |
void | thread_join (pthread_t t, void **result) |
pthread_join wrapper function. More... | |
Mutexes | |
Variable type: Initialization of mutexes can be static or dynamic. In static initialization the following initialization macros are suggested:
Dynamic initialization is done by mutex_init() and mutex_destroy(). | |
void | mutex_init (pthread_mutex_t *pmtx, pthread_mutexattr_t *attr) |
pthread_mutex_init wrapper function. More... | |
void | mutex_destroy (pthread_mutex_t *pmtx) |
pthread_mutex_destroy wrapper function. More... | |
void | mutex_lock (pthread_mutex_t *pmtx) |
pthread_mutex_lock wrapper function. More... | |
int | mutex_trylock (pthread_mutex_t *pmtx) |
pthread_mutex_trylock wrapper function. More... | |
void | mutex_unlock (pthread_mutex_t *pmtx) |
pthread_mutex_unlock wrapper function. More... | |
Condition variables | |
Variable type: Initialization of condition variables can be static or dynamic. In static initialization the following initialization macros should be used:
Dynamic initialization is done by cond_init() and cond_destroy(). | |
void | cond_init (pthread_cond_t *pcvar, pthread_condattr_t *attr) |
pthread_cond_init wrapper function. More... | |
void | cond_destroy (pthread_cond_t *pcvar) |
pthread_cond_destroy wrapper function. More... | |
void | cond_wait (pthread_cond_t *pcvar, pthread_mutex_t *pmtx) |
pthread_cond_wait wrapper function. More... | |
int | cond_timedwait (pthread_cond_t *pcvar, pthread_mutex_t *pmtx, const struct timespec *abstime) |
pthread_cond_timedwait wrapper function. More... | |
void | cond_signal (pthread_cond_t *pcvar) |
pthread_cond_signal wrapper function. More... | |
void | cond_broadcast (pthread_cond_t *pcvar) |
pthread_cond_broadcast wrapper function. More... | |
One-time initialization | |
Variable type: POSIX thread library support a mechanism that ensures a one-time execution of a function. It does it through
| |
void | thread_once (pthread_once_t *once_control, void(*init_routine)(void)) |
pthread_once wrapper function. More... | |
Thread-specific data | |
void | thread_key_create (pthread_key_t *key, void(*destr_function)(void *)) |
pthread_key_create wrapper function. More... | |
void | thread_key_delete (pthread_key_t key) |
pthread_key_delete wrapper function. More... | |
void | thread_setspecific (pthread_key_t key, void *pointer) |
pthread_setspecific wrapper function. More... | |
void * | thread_getspecific (pthread_key_t key) |
pthread_getspecific wrapper function. More... | |
Mutex attributes | |
void | mutexattr_init (pthread_mutexattr_t *attr) |
pthread_mutexattr_init wrapper function. More... | |
void | mutexattr_destroy (pthread_mutexattr_t *attr) |
pthread_mutexattr_destroy wrapper function. More... | |
void | mutexattr_settype (pthread_mutexattr_t *attr, int type) |
pthread_mutexattr_settype wrapper function. More... | |
void | mutexattr_gettype (const pthread_mutexattr_t *attr, int *kind) |
pthread_mutexattr_gettype wrapper function. More... | |
Condition variables attributes | |
void | condattr_init (pthread_condattr_t *attr) |
pthread_condattr_init wrapper function. More... | |
void | condattr_destroy (pthread_condattr_t *attr) |
pthread_condattr_destroy wrapper function. More... | |
Thread attributes | |
void | thread_attr_init (pthread_attr_t *attr) |
pthread_attr_init wrapper function. More... | |
void | thread_attr_destroy (pthread_attr_t *attr) |
pthread_attr_destroy wrapper function. More... | |
void | thread_attr_setdetachstate (pthread_attr_t *attr, int detachstate) |
pthread_attr_setdetachstate wrapper function. More... | |
void | thread_attr_getdetachstate (const pthread_attr_t *attr, int *pdetachstate) |
pthread_attr_getdetachstate wrapper function. More... | |
Cancellation | |
void | thread_cancel (pthread_t thread) |
pthread_cancel wrapper function. More... | |
void | thread_setcancelstate (int state, int *oldstate) |
pthread_setcancelstate wrapper function. More... | |
void | thread_setcanceltype (int type, int *oldtype) |
pthread_setcanceltype wrapper function. More... | |
void | thread_testcancel (void) |
pthread_testcancel wrapper function. More... | |
POSIX threads library wrapper module.