pthread.h header reference
[POSIX Threads module]
The source code of this header can be browsed online.
Members [link]
Types [link]
- typedef [...] pthread_attr_t
- typedef [...] pthread_barrier_t
- typedef [...] pthread_barrierattr_t
- typedef [...] pthread_cond_t
- typedef [...] pthread_condattr_t
- typedef [...] pthread_key_t
- typedef [...] pthread_mutex_t
- typedef [...] pthread_mutexattr_t
- typedef [...] pthread_once_t
- typedef [...] pthread_rwlock_t
- typedef [...] pthread_rwlockattr_t
- typedef [...] pthread_spinlock_t
- typedef void *(pthread_start_routine_t)(void *arg)
- enum pthread_state_e
- typedef [...] * pthread_t
- typedef void (__pthread_cleanup_fcn_t)(void *)
- struct __pthread_cleanup_s
- struct _pthread_barrier_func_s
- struct pthread_attr_s
- struct pthread_barrier_s
- struct pthread_barrierattr_s
- struct pthread_cond_s
- struct pthread_mutex_s
- struct pthread_mutexattr_s
- struct pthread_once_s
- struct pthread_s
- struct rwlock_s
Functions [link]
- error_t _pthread_barrier_normal_destroy(pthread_barrier_t *barrier)
- error_t _pthread_barrier_normal_wait(pthread_barrier_t *barrier)
- error_t pthread_attr_affinity(pthread_attr_t *attr, cpu_id_t cpu)
- error_t pthread_attr_destroy(pthread_attr_t *attr)
- error_t pthread_attr_init(pthread_attr_t *attr)
- error_t pthread_attr_setdetachstate(pthread_attr_t *attr, uint8_t state)
- error_t pthread_attr_setstack(pthread_attr_t *attr, void *stack_buf, size_t stack_size)
- error_t pthread_attr_setstacksize(pthread_attr_t *attr, size_t stack_size)
- error_t pthread_barrier_destroy(pthread_barrier_t *barrier)
- error_t pthread_barrier_init(pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count)
- error_t pthread_barrier_wait(pthread_barrier_t *barrier)
- error_t pthread_barrierattr_init(pthread_barrierattr_t *attr)
- error_t pthread_barrierattr_settype(pthread_barrierattr_t *attr, int_fast8_t type)
- error_t pthread_cancel(pthread_t thread)
- error_t pthread_cond_broadcast(pthread_cond_t *cond)
- error_t pthread_cond_destroy(pthread_cond_t *cond)
- error_t pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr)
- error_t pthread_cond_signal(pthread_cond_t *cond)
- error_t pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *abstime)
- error_t pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex)
- error_t pthread_create(pthread_t *thread, const pthread_attr_t *attr, pthread_start_routine_t *start_routine, void *arg)
- error_t pthread_detach(pthread_t thread)
- error_t pthread_equal(pthread_t t1, pthread_t t2)
- void pthread_exit(void *retval)
- void * pthread_getspecific(pthread_key_t key)
- error_t pthread_join(pthread_t thread, void **value_ptr)
- error_t pthread_key_create(pthread_key_t *key, void (*destructor)(void *) )
- error_t pthread_key_delete(pthread_key_t key)
- error_t pthread_mutex_destroy(pthread_mutex_t *mutex)
- error_t pthread_mutex_init(pthread_mutex_t *mutex, const pthread_mutexattr_t *attr)
- error_t pthread_mutex_lock(pthread_mutex_t *mutex)
- error_t pthread_mutex_lock(pthread_mutex_t *mutex)
- error_t pthread_mutex_trylock(pthread_mutex_t *mutex)
- error_t pthread_mutex_trylock(pthread_mutex_t *mutex)
- error_t pthread_mutex_unlock(pthread_mutex_t *mutex)
- error_t pthread_mutex_unlock(pthread_mutex_t *mutex)
- error_t pthread_mutexattr_destroy(pthread_mutexattr_t *attr)
- error_t pthread_mutexattr_init(pthread_mutexattr_t *attr)
- error_t pthread_mutexattr_settype(pthread_mutexattr_t *attr, int_fast8_t type)
- error_t pthread_once(pthread_once_t *once, void (*func)() )
- error_t pthread_rwlock_destroy(pthread_rwlock_t *rwlock)
- error_t pthread_rwlock_init(pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr)
- error_t pthread_rwlock_rdlock(pthread_rwlock_t *rwlock)
- error_t pthread_rwlock_tryrdlock(pthread_rwlock_t *rwlock)
- error_t pthread_rwlock_trywrlock(pthread_rwlock_t *rwlock)
- error_t pthread_rwlock_unlock(pthread_rwlock_t *rwlock)
- error_t pthread_rwlock_wrlock(pthread_rwlock_t *rwlock)
- pthread_t pthread_self(void )
- error_t pthread_setcancelstate(int_fast8_t state, int_fast8_t *oldstate)
- error_t pthread_setcanceltype(int_fast8_t type, int_fast8_t *oldtype)
- error_t pthread_setspecific(pthread_key_t key, const void *value)
- error_t pthread_spin_destroy(pthread_spinlock_t *spinlock)
- error_t pthread_spin_init(pthread_spinlock_t *spinlock, bool_t pshared)
- error_t pthread_spin_lock(pthread_spinlock_t *spinlock)
- error_t pthread_spin_trylock(pthread_spinlock_t *spinlock)
- error_t pthread_spin_unlock(pthread_spinlock_t *spinlock)
- void pthread_testcancel(void )
- void pthread_yield(void )
- error_t __pthread_mutex_normal_lock(pthread_mutex_t *mutex)
- error_t __pthread_mutex_normal_trylock(pthread_mutex_t *mutex)
- error_t __pthread_mutex_normal_unlock(pthread_mutex_t *mutex)
Variables [link]
- const void * _key_values[CONFIG_PTHREAD_KEYS_MAX]
- struct _pthread_barrier_func_s barrier_normal_funcs
- struct __pthread_cleanup_s * __pthread_cleanup_list
- pthread_t __pthread_current
- pthread_mutexattr_t __pthread_mutex_attr_errorcheck
- pthread_mutexattr_t __pthread_mutex_attr_normal
- pthread_mutexattr_t __pthread_mutex_attr_recursive
Macros [link]
- CONTEXT_LOCAL_PTHREAD_GET
- CONTEXT_LOCAL_PTHREAD_SET
- PTHREAD_BARRIER_INITIALIZER
- PTHREAD_BARRIER_INITIALIZER
- PTHREAD_BARRIER_SERIAL_THREAD
- PTHREAD_CANCELED
- PTHREAD_CANCEL_ASYNCHRONOUS
- PTHREAD_CANCEL_DEFERRED
- PTHREAD_CANCEL_DISABLE
- PTHREAD_CANCEL_ENABLE
- PTHREAD_COND_INITIALIZER
- PTHREAD_CREATE_DETACHED
- PTHREAD_CREATE_JOINABLE
- PTHREAD_DESTRUCTOR_ITERATIONS
- PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
- PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
- PTHREAD_KEYS_MAX
- PTHREAD_MUTEX_DEFAULT
- PTHREAD_MUTEX_ERRORCHECK
- PTHREAD_MUTEX_INITIALIZER
- PTHREAD_MUTEX_INITIALIZER
- PTHREAD_MUTEX_NORMAL
- PTHREAD_MUTEX_RECURSIVE
- PTHREAD_ONCE_INIT
- PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
- PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
- PTHREAD_RWLOCK_INITIALIZER
- pthread_cleanup_pop
- pthread_cleanup_push
Members detail [link]
#define CONTEXT_LOCAL_PTHREAD_GET(th, n) [link]
This macro is declared in pthread.h source file, line 77.
this macro read a context local variable for the given pthread
Preprocessor condition: defined( CONFIG_PTHREAD )
#define CONTEXT_LOCAL_PTHREAD_SET(th, n, v) [link]
This macro is declared in pthread.h source file, line 73.
this macro set a context local variable for the given pthread
Preprocessor condition: defined( CONFIG_PTHREAD )
#define PTHREAD_BARRIER_DEFAULT [link]
This macro is declared in pthread.h source file, line 606.
Preprocessor condition: defined( CONFIG_PTHREAD ) and defined( CONFIG_PTHREAD_BARRIER_ATTR )
#define PTHREAD_BARRIER_INITIALIZER(n) [link]
This macro is declared in pthread.h source file, line 670.
normal rwlock object static initializer
Alternate declarations with same identifier: [1], [2].
Preprocessor condition: defined( CONFIG_PTHREAD ) and defined( CONFIG_PTHREAD_BARRIER_ATTR )
#define PTHREAD_BARRIER_INITIALIZER(n) [link]
This macro is declared in pthread.h source file, line 680.
normal rwlock object static initializer
Alternate declarations with same identifier: [1], [2].
Preprocessor condition: defined( CONFIG_PTHREAD ) and not defined( CONFIG_PTHREAD_BARRIER_ATTR )
#define PTHREAD_BARRIER_SERIAL_THREAD [link]
This macro is declared in pthread.h source file, line 665.
this macro may be returned by pthread_barrier_wait
Preprocessor condition: defined( CONFIG_PTHREAD )
#define PTHREAD_BARRIER_SPIN [link]
This macro is declared in pthread.h source file, line 609.
Preprocessor condition: defined( CONFIG_PTHREAD ) and defined( CONFIG_PTHREAD_BARRIER_ATTR ) and defined( CONFIG_PTHREAD_BARRIER_SPIN )
#define PTHREAD_CANCELED [link]
This macro is declared in pthread.h source file, line 208.
canceled thread exit value
Preprocessor condition: defined( CONFIG_PTHREAD )
#define PTHREAD_CANCEL_ASYNCHRONOUS [link]
This macro is declared in pthread.h source file, line 216.
this macro may be used with pthread_setcanceltype
Preprocessor condition: defined( CONFIG_PTHREAD )
#define PTHREAD_CANCEL_DEFERRED [link]
This macro is declared in pthread.h source file, line 215.
this macro may be used with pthread_setcanceltype
Preprocessor condition: defined( CONFIG_PTHREAD )
#define PTHREAD_CANCEL_DISABLE [link]
This macro is declared in pthread.h source file, line 211.
this macro may be used with pthread_setcancelstate
Preprocessor condition: defined( CONFIG_PTHREAD )
#define PTHREAD_CANCEL_ENABLE [link]
This macro is declared in pthread.h source file, line 212.
this macro may be used with pthread_setcancelstate
Preprocessor condition: defined( CONFIG_PTHREAD )
#define PTHREAD_COND_INITIALIZER [link]
This macro is declared in pthread.h source file, line 492.
normal cond object static initializer
Preprocessor condition: defined( CONFIG_PTHREAD )
#define PTHREAD_CREATE_DETACHED [link]
This macro is declared in pthread.h source file, line 154.
Preprocessor condition: defined( CONFIG_PTHREAD )
See also pthread_attr_setdetachstate.
#define PTHREAD_CREATE_JOINABLE [link]
This macro is declared in pthread.h source file, line 156.
Preprocessor condition: defined( CONFIG_PTHREAD )
See also pthread_attr_setdetachstate.
#define PTHREAD_DESTRUCTOR_ITERATIONS [link]
This macro is declared in pthread.h source file, line 787.
this macro is the maximum number of iterations for destructor calling
Preprocessor condition: defined( CONFIG_PTHREAD )
#define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP [link]
This macro is declared in pthread.h source file, line 345.
this macro is error checking mutex object static initializer
Alternate declarations with same identifier: [1], [2].
Preprocessor condition: defined( CONFIG_PTHREAD ) and defined( CONFIG_PTHREAD_MUTEX_ATTR )
#define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP [link]
This macro is declared in pthread.h source file, line 361.
Documentation from alternate declaration:
this macro is error checking mutex object static initializer
Alternate declarations with same identifier: [1], [2].
Preprocessor condition: defined( CONFIG_PTHREAD ) and not defined( CONFIG_PTHREAD_MUTEX_ATTR )
#define PTHREAD_H_ [link]
#define PTHREAD_KEYS_MAX [link]
This macro is declared in pthread.h source file, line 784.
this macro is the maximum number of keys in the system.
Preprocessor condition: defined( CONFIG_PTHREAD )
#define PTHREAD_MUTEX_DEFAULT [link]
This macro is declared in pthread.h source file, line 321.
Default mutex type identifier
Preprocessor condition: defined( CONFIG_PTHREAD )
#define PTHREAD_MUTEX_ERRORCHECK [link]
This macro is declared in pthread.h source file, line 317.
Error checking mutex type identifier
Preprocessor condition: defined( CONFIG_PTHREAD )
#define PTHREAD_MUTEX_INITIALIZER [link]
This macro is declared in pthread.h source file, line 331.
this macro is the normal mutex object static initializer
Alternate declarations with same identifier: [1], [2].
Preprocessor condition: defined( CONFIG_PTHREAD ) and defined( CONFIG_PTHREAD_MUTEX_ATTR )
#define PTHREAD_MUTEX_INITIALIZER [link]
This macro is declared in pthread.h source file, line 353.
Documentation from alternate declaration:
this macro is the normal mutex object static initializer
Alternate declarations with same identifier: [1], [2].
Preprocessor condition: defined( CONFIG_PTHREAD ) and not defined( CONFIG_PTHREAD_MUTEX_ATTR )
#define PTHREAD_MUTEX_NORMAL [link]
This macro is declared in pthread.h source file, line 315.
Normal mutex type identifier
Preprocessor condition: defined( CONFIG_PTHREAD )
#define PTHREAD_MUTEX_RECURSIVE [link]
This macro is declared in pthread.h source file, line 319.
Recurvive mutex type identifier
Preprocessor condition: defined( CONFIG_PTHREAD )
#define PTHREAD_ONCE_INIT [link]
This macro is declared in pthread.h source file, line 744.
this macro is the POSIX type definition for PTHREAD_ONCE_INIT
Preprocessor condition: defined( CONFIG_PTHREAD )
#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP [link]
This macro is declared in pthread.h source file, line 338.
this macro is the recurvive mutex object static initializer
Alternate declarations with same identifier: [1], [2].
Preprocessor condition: defined( CONFIG_PTHREAD ) and defined( CONFIG_PTHREAD_MUTEX_ATTR )
#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP [link]
This macro is declared in pthread.h source file, line 358.
Documentation from alternate declaration:
this macro is the recurvive mutex object static initializer
Alternate declarations with same identifier: [1], [2].
Preprocessor condition: defined( CONFIG_PTHREAD ) and not defined( CONFIG_PTHREAD_MUTEX_ATTR )
#define PTHREAD_RWLOCK_INITIALIZER [link]
This macro is declared in pthread.h source file, line 559.
normal rwlock object static initializer
Preprocessor condition: defined( CONFIG_PTHREAD )
#define _PTHREAD_ATTRFLAG_AFFINITY [link]
This macro is declared in pthread.h source file, line 115.
Preprocessor condition: defined( CONFIG_PTHREAD )
#define _PTHREAD_ATTRFLAG_DETACHED [link]
This macro is declared in pthread.h source file, line 117.
Preprocessor condition: defined( CONFIG_PTHREAD )
#define _PTHREAD_ATTRFLAG_STACK [link]
This macro is declared in pthread.h source file, line 116.
Preprocessor condition: defined( CONFIG_PTHREAD )
const void * _key_values[CONFIG_PTHREAD_KEYS_MAX] [link]
This constant is declared in pthread.h source file, line 821.
Preprocessor condition: defined( CONFIG_PTHREAD )
error_t _pthread_barrier_normal_destroy(pthread_barrier_t *barrier) [link]
This function is declared in pthread.h source file, line 640.
This is available when CONFIG_PTHREAD_BARRIER is defined.
Preprocessor condition: defined( CONFIG_PTHREAD )
error_t _pthread_barrier_normal_wait(pthread_barrier_t *barrier) [link]
This function is declared in pthread.h source file, line 642.
This is available when CONFIG_PTHREAD_BARRIER is defined.
Preprocessor condition: defined( CONFIG_PTHREAD )
struct _pthread_barrier_func_s barrier_normal_funcs [link]
This variable is declared in pthread.h source file, line 605.
Preprocessor condition: defined( CONFIG_PTHREAD ) and defined( CONFIG_PTHREAD_BARRIER_ATTR )
error_t pthread_attr_affinity(pthread_attr_t *attr, cpu_id_t cpu) [link]
This function is declared in pthread.h source file, line 144.
this function adds a cpu affinity attribute
This is available when CONFIG_PTHREAD_ATTRIBUTES is defined.
Preprocessor condition: defined( CONFIG_PTHREAD )
error_t pthread_attr_destroy(pthread_attr_t *attr) [link]
This function is declared in pthread.h source file, line 140.
this function destroys a new pthread attribute
This is available when CONFIG_PTHREAD_ATTRIBUTES is defined.
Preprocessor condition: defined( CONFIG_PTHREAD )
error_t pthread_attr_init(pthread_attr_t *attr) [link]
This function is declared in pthread.h source file, line 136.
this function creates a new pthread attribute
This is available when CONFIG_PTHREAD_ATTRIBUTES is defined.
Preprocessor condition: defined( CONFIG_PTHREAD )
error_t pthread_attr_setdetachstate(pthread_attr_t *attr, uint8_t state) [link]
This function is declared in pthread.h source file, line 161.
this function set initial thread state
This is available when CONFIG_PTHREAD_ATTRIBUTES is defined.
Preprocessor condition: defined( CONFIG_PTHREAD )
error_t pthread_attr_setstack(pthread_attr_t *attr, void *stack_buf, size_t stack_size) [link]
This function is declared in pthread.h source file, line 148.
this function sets stack buffer and size attribute
This is available when CONFIG_PTHREAD_ATTRIBUTES is defined.
Preprocessor condition: defined( CONFIG_PTHREAD )
error_t pthread_attr_setstacksize(pthread_attr_t *attr, size_t stack_size) [link]
This function is declared in pthread.h source file, line 152.
this function sets stack size attribute
This is available when CONFIG_PTHREAD_ATTRIBUTES is defined.
Preprocessor condition: defined( CONFIG_PTHREAD )
typedef struct pthread_attr_s pthread_attr_t [link]
This typedef is declared in pthread.h source file, line 59.
Preprocessor condition: defined( CONFIG_PTHREAD )
error_t pthread_barrier_destroy(pthread_barrier_t *barrier) [link]
This function is declared in pthread.h source file, line 653.
This is available when CONFIG_PTHREAD_BARRIER is defined.
Preprocessor condition: defined( CONFIG_PTHREAD )
error_t pthread_barrier_init(pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count) [link]
This function is declared in pthread.h source file, line 637.
This is available when CONFIG_PTHREAD_BARRIER is defined.
Preprocessor condition: defined( CONFIG_PTHREAD )
typedef struct pthread_barrier_s pthread_barrier_t [link]
This typedef is declared in pthread.h source file, line 632.
Preprocessor condition: defined( CONFIG_PTHREAD )
error_t pthread_barrier_wait(pthread_barrier_t *barrier) [link]
This function is declared in pthread.h source file, line 663.
This is available when CONFIG_PTHREAD_BARRIER is defined.
Preprocessor condition: defined( CONFIG_PTHREAD )
error_t pthread_barrierattr_init(pthread_barrierattr_t *attr) [link]
This function is declared in pthread.h source file, line 628.
this function initialize a barrier attribute object
This is available when CONFIG_PTHREAD_BARRIER_ATTR is defined.
Preprocessor condition: defined( CONFIG_PTHREAD ) and defined( CONFIG_PTHREAD_BARRIER_ATTR )
error_t pthread_barrierattr_settype(pthread_barrierattr_t *attr, int_fast8_t type) [link]
This function is declared in pthread.h source file, line 621.
This is available when CONFIG_PTHREAD_BARRIER_ATTR is defined.
Preprocessor condition: defined( CONFIG_PTHREAD ) and defined( CONFIG_PTHREAD_BARRIER_ATTR )
typedef struct pthread_barrierattr_s pthread_barrierattr_t [link]
This typedef is declared in pthread.h source file, line 566.
Preprocessor condition: defined( CONFIG_PTHREAD )
This function is declared in pthread.h source file, line 276.
This is available when CONFIG_PTHREAD_CANCEL is defined.
Preprocessor condition: defined( CONFIG_PTHREAD )
#define pthread_cleanup_pop(execute) [link]
This macro is declared in pthread.h source file, line 252.
this macro must be matched with pthread_cleanup_push
Preprocessor condition: defined( CONFIG_PTHREAD )
#define pthread_cleanup_push(routine_, arg_) [link]
This macro is declared in pthread.h source file, line 235.
this macro must be matched with pthread_cleanup_pop
Preprocessor condition: defined( CONFIG_PTHREAD )
error_t pthread_cond_broadcast(pthread_cond_t *cond) [link]
This function is declared in pthread.h source file, line 474.
This is available when CONFIG_PTHREAD_COND is defined.
Preprocessor condition: defined( CONFIG_PTHREAD )
error_t pthread_cond_destroy(pthread_cond_t *cond) [link]
This function is declared in pthread.h source file, line 470.
This is available when CONFIG_PTHREAD_COND is defined.
Preprocessor condition: defined( CONFIG_PTHREAD )
error_t pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr) [link]
This function is declared in pthread.h source file, line 466.
This is available when CONFIG_PTHREAD_COND is defined.
Preprocessor condition: defined( CONFIG_PTHREAD )
error_t pthread_cond_signal(pthread_cond_t *cond) [link]
This function is declared in pthread.h source file, line 478.
This is available when CONFIG_PTHREAD_COND is defined.
Preprocessor condition: defined( CONFIG_PTHREAD )
typedef struct pthread_cond_s pthread_cond_t [link]
This typedef is declared in pthread.h source file, line 460.
Preprocessor condition: defined( CONFIG_PTHREAD )
error_t pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *abstime) [link]
This function is declared in pthread.h source file, line 486.
This is available when CONFIG_PTHREAD_COND_TIME is defined.
Preprocessor condition: defined( CONFIG_PTHREAD )
error_t pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex) [link]
This function is declared in pthread.h source file, line 490.
This is available when CONFIG_PTHREAD_COND is defined.
Preprocessor condition: defined( CONFIG_PTHREAD )
typedef struct pthread_condattr_s pthread_condattr_t [link]
This typedef is declared in pthread.h source file, line 461.
Preprocessor condition: defined( CONFIG_PTHREAD )
error_t pthread_create(pthread_t *thread, const pthread_attr_t *attr, pthread_start_routine_t *start_routine, void *arg) [link]
This function is declared in pthread.h source file, line 166.
this function creates a new pthread
Preprocessor condition: defined( CONFIG_PTHREAD )
This function is declared in pthread.h source file, line 197.
this function detachs a pthread
This is available when CONFIG_PTHREAD_JOIN is defined.
Preprocessor condition: defined( CONFIG_PTHREAD )
This function is declared in pthread.h source file, line 192.
this function compare two thread objects
This is available when CONFIG_PTHREAD is defined.
Preprocessor condition: defined( CONFIG_PTHREAD )
void pthread_exit(void *retval) [link]
This function is declared in pthread.h source file, line 170.
this function ends pthread execution
Preprocessor condition: defined( CONFIG_PTHREAD )
void * pthread_getspecific(pthread_key_t key) [link]
This function is declared in pthread.h source file, line 837.
this function retrieves data associated to key in the current thread.
Parameter list:
- key: Key handle to retrieve
The return value is Value associated to key, NULL if none
This is available when CONFIG_PTHREAD_KEYS is defined.
Preprocessor condition: defined( CONFIG_PTHREAD )
This function is declared in pthread.h source file, line 202.
this function waits for thread termination
This is available when CONFIG_PTHREAD_JOIN is defined.
Preprocessor condition: defined( CONFIG_PTHREAD )
error_t pthread_key_create(pthread_key_t *key, void (*destructor)(void *) ) [link]
This function is declared in pthread.h source file, line 808.
this function creates a new key and associates an optional destructor to the keyed data. If there cannot be any more key allocated in the system, an error is signaled.
Each non-NULL destructor will be called once for each exitting thread with non-NULL keyed data. Destructor must still pthread_key_delete the data. If some keyed data is still non-NULL after deletion, the whole deletion process is started again; at most PTHREAD_DESTRUCTOR_ITERATIONS times.
Parameter list:
- key: Key handle to fill
- destructor: Optional destructor function; NULL if not needed
The return value is 0 if done, -EAGAIN if no key is available any more
This is available when CONFIG_PTHREAD_KEYS is defined.
Preprocessor condition: defined( CONFIG_PTHREAD )
error_t pthread_key_delete(pthread_key_t key) [link]
This function is declared in pthread.h source file, line 819.
this function deletes a key. The destructor optionnaly attached to this key is not called, it is up to the application to free data attached to this key.
Parameter list:
- key: Key handle to delete
The return value is 0 if done
This is available when CONFIG_PTHREAD_KEYS is defined.
Preprocessor condition: defined( CONFIG_PTHREAD )
typedef size_t pthread_key_t [link]
This typedef is declared in pthread.h source file, line 790.
Preprocessor condition: defined( CONFIG_PTHREAD )
error_t pthread_mutex_destroy(pthread_mutex_t *mutex) [link]
This function is declared in pthread.h source file, line 376.
this function destroy a mutex
This is available when CONFIG_PTHREAD_MUTEX is defined.
Preprocessor condition: defined( CONFIG_PTHREAD )
error_t pthread_mutex_init(pthread_mutex_t *mutex, const pthread_mutexattr_t *attr) [link]
This function is declared in pthread.h source file, line 371.
this function initializes a mutex
This is available when CONFIG_PTHREAD_MUTEX is defined.
Preprocessor condition: defined( CONFIG_PTHREAD )
error_t pthread_mutex_lock(pthread_mutex_t *mutex) [link]
This function is declared in pthread.h source file, line 392.
this function takes a mutex
This is available when CONFIG_PTHREAD is defined.
Alternate declarations with same identifier: [1], [2].
Preprocessor condition: defined( CONFIG_PTHREAD ) and defined( CONFIG_PTHREAD_MUTEX_ATTR )
error_t pthread_mutex_lock(pthread_mutex_t *mutex) [link]
This function is declared in pthread.h source file, line 433.
This is available when CONFIG_PTHREAD_MUTEX is defined.
Alternate declarations with same identifier: [1], [2].
Preprocessor condition: defined( CONFIG_PTHREAD ) and not defined( CONFIG_PTHREAD_MUTEX_ATTR )
typedef struct pthread_mutex_s pthread_mutex_t [link]
This typedef is declared in pthread.h source file, line 302.
Preprocessor condition: defined( CONFIG_PTHREAD )
error_t pthread_mutex_trylock(pthread_mutex_t *mutex) [link]
This function is declared in pthread.h source file, line 399.
this function tries to take a mutex
This is available when CONFIG_PTHREAD is defined.
Alternate declarations with same identifier: [1], [2].
Preprocessor condition: defined( CONFIG_PTHREAD ) and defined( CONFIG_PTHREAD_MUTEX_ATTR )
error_t pthread_mutex_trylock(pthread_mutex_t *mutex) [link]
This function is declared in pthread.h source file, line 439.
This is available when CONFIG_PTHREAD_MUTEX is defined.
Alternate declarations with same identifier: [1], [2].
Preprocessor condition: defined( CONFIG_PTHREAD ) and not defined( CONFIG_PTHREAD_MUTEX_ATTR )
error_t pthread_mutex_unlock(pthread_mutex_t *mutex) [link]
This function is declared in pthread.h source file, line 406.
this function free a mutex
This is available when CONFIG_PTHREAD is defined.
Alternate declarations with same identifier: [1], [2].
Preprocessor condition: defined( CONFIG_PTHREAD ) and defined( CONFIG_PTHREAD_MUTEX_ATTR )
error_t pthread_mutex_unlock(pthread_mutex_t *mutex) [link]
This function is declared in pthread.h source file, line 445.
This is available when CONFIG_PTHREAD_MUTEX is defined.
Alternate declarations with same identifier: [1], [2].
Preprocessor condition: defined( CONFIG_PTHREAD ) and not defined( CONFIG_PTHREAD_MUTEX_ATTR )
error_t pthread_mutexattr_destroy(pthread_mutexattr_t *attr) [link]
This function is declared in pthread.h source file, line 425.
this function destroy a mutex attribute object
This is available when CONFIG_PTHREAD_MUTEX_ATTR is defined.
Preprocessor condition: defined( CONFIG_PTHREAD ) and defined( CONFIG_PTHREAD_MUTEX_ATTR )
error_t pthread_mutexattr_init(pthread_mutexattr_t *attr) [link]
This function is declared in pthread.h source file, line 418.
this function initialize a mutex attribute object
This is available when CONFIG_PTHREAD_MUTEX_ATTR is defined.
Preprocessor condition: defined( CONFIG_PTHREAD ) and defined( CONFIG_PTHREAD_MUTEX_ATTR )
error_t pthread_mutexattr_settype(pthread_mutexattr_t *attr, int_fast8_t type) [link]
This function is declared in pthread.h source file, line 411.
this function sets the mutek type
This is available when CONFIG_PTHREAD_MUTEX_ATTR is defined.
Preprocessor condition: defined( CONFIG_PTHREAD ) and defined( CONFIG_PTHREAD_MUTEX_ATTR )
typedef struct pthread_mutexattr_s pthread_mutexattr_t [link]
This typedef is declared in pthread.h source file, line 282.
Preprocessor condition: defined( CONFIG_PTHREAD )
error_t pthread_once(pthread_once_t *once, void (*func)() ) [link]
This function is declared in pthread.h source file, line 778.
this function calls a given function only once according to the flag variable once.
once must have beed initialized with PTHREAD_ONCE_INIT.
Parameter list:
- once: Flag variable used to ensure call is made only once
- func: Function to call once
The return value is 0 when done
This is available when CONFIG_PTHREAD_ONCE is defined.
Preprocessor condition: defined( CONFIG_PTHREAD )
typedef struct pthread_once_s pthread_once_t [link]
This typedef is declared in pthread.h source file, line 742.
this typedef is the POSIX type definition for pthread_once_t
Preprocessor condition: defined( CONFIG_PTHREAD )
error_t pthread_rwlock_destroy(pthread_rwlock_t *rwlock) [link]
This function is declared in pthread.h source file, line 514.
This is available when CONFIG_PTHREAD_RWLOCK is defined.
Preprocessor condition: defined( CONFIG_PTHREAD )
error_t pthread_rwlock_init(pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr) [link]
This function is declared in pthread.h source file, line 521.
This is available when CONFIG_PTHREAD_RWLOCK is defined.
Preprocessor condition: defined( CONFIG_PTHREAD )
error_t pthread_rwlock_rdlock(pthread_rwlock_t *rwlock) [link]
This function is declared in pthread.h source file, line 530.
This is available when CONFIG_PTHREAD_RWLOCK is defined.
Preprocessor condition: defined( CONFIG_PTHREAD )
This typedef is declared in pthread.h source file, line 508.
Preprocessor condition: defined( CONFIG_PTHREAD )
error_t pthread_rwlock_tryrdlock(pthread_rwlock_t *rwlock) [link]
This function is declared in pthread.h source file, line 536.
This is available when CONFIG_PTHREAD_RWLOCK is defined.
Preprocessor condition: defined( CONFIG_PTHREAD )
error_t pthread_rwlock_trywrlock(pthread_rwlock_t *rwlock) [link]
This function is declared in pthread.h source file, line 551.
This is available when CONFIG_PTHREAD_RWLOCK is defined.
Preprocessor condition: defined( CONFIG_PTHREAD )
error_t pthread_rwlock_unlock(pthread_rwlock_t *rwlock) [link]
This function is declared in pthread.h source file, line 557.
This is available when CONFIG_PTHREAD_RWLOCK is defined.
Preprocessor condition: defined( CONFIG_PTHREAD )
error_t pthread_rwlock_wrlock(pthread_rwlock_t *rwlock) [link]
This function is declared in pthread.h source file, line 545.
This is available when CONFIG_PTHREAD_RWLOCK is defined.
Preprocessor condition: defined( CONFIG_PTHREAD )
typedef struct pthread_rwlockattr_s pthread_rwlockattr_t [link]
This typedef is declared in pthread.h source file, line 507.
Preprocessor condition: defined( CONFIG_PTHREAD )
This function is declared in pthread.h source file, line 177.
this function returns current pthread
This is available when CONFIG_PTHREAD is defined.
Preprocessor condition: defined( CONFIG_PTHREAD )
error_t pthread_setcancelstate(int_fast8_t state, int_fast8_t *oldstate) [link]
This function is declared in pthread.h source file, line 269.
This is available when CONFIG_PTHREAD_CANCEL is defined.
Preprocessor condition: defined( CONFIG_PTHREAD )
error_t pthread_setcanceltype(int_fast8_t type, int_fast8_t *oldtype) [link]
This function is declared in pthread.h source file, line 273.
This is available when CONFIG_PTHREAD_CANCEL is defined.
Preprocessor condition: defined( CONFIG_PTHREAD )
error_t pthread_setspecific(pthread_key_t key, const void *value) [link]
This function is declared in pthread.h source file, line 854.
this function sets data to associate to key in the current thread.
Parameter list:
- key: Key handle to set
- value: Value associated to key, NULL if resetting needed
This is available when CONFIG_PTHREAD_KEYS is defined.
Preprocessor condition: defined( CONFIG_PTHREAD )
error_t pthread_spin_destroy(pthread_spinlock_t *spinlock) [link]
This function is declared in pthread.h source file, line 708.
This is available when CONFIG_PTHREAD_SPIN is defined.
Preprocessor condition: defined( CONFIG_PTHREAD )
error_t pthread_spin_init(pthread_spinlock_t *spinlock, bool_t pshared) [link]
This function is declared in pthread.h source file, line 701.
This is available when CONFIG_PTHREAD_SPIN is defined.
Preprocessor condition: defined( CONFIG_PTHREAD )
error_t pthread_spin_lock(pthread_spinlock_t *spinlock) [link]
This function is declared in pthread.h source file, line 715.
This is available when CONFIG_PTHREAD_SPIN is defined.
Preprocessor condition: defined( CONFIG_PTHREAD )
error_t pthread_spin_trylock(pthread_spinlock_t *spinlock) [link]
This function is declared in pthread.h source file, line 721.
This is available when CONFIG_PTHREAD_SPIN is defined.
Preprocessor condition: defined( CONFIG_PTHREAD )
error_t pthread_spin_unlock(pthread_spinlock_t *spinlock) [link]
This function is declared in pthread.h source file, line 728.
This is available when CONFIG_PTHREAD_SPIN is defined.
Preprocessor condition: defined( CONFIG_PTHREAD )
This typedef is declared in pthread.h source file, line 693.
Preprocessor condition: defined( CONFIG_PTHREAD )
typedef void *(pthread_start_routine_t)(void *arg) [link]
This typedef is declared in pthread.h source file, line 53.
Preprocessor condition: defined( CONFIG_PTHREAD )
enum pthread_state_e [link]
This enum is declared in pthread.h source file, line 82.
Preprocessor condition: defined( CONFIG_PTHREAD )
Identifier | Description |
---|---|
_PTHREAD_STATE_DETACHED | thread is marked as detached |
_PTHREAD_STATE_JOINABLE | thread is joinable |
_PTHREAD_STATE_CANCELED | thread has been canceled |
_PTHREAD_STATE_NOCANCEL | thread ignore cancel |
_PTHREAD_STATE_CANCELASYNC | thread use asynchronous cancelation |
_PTHREAD_STATE_TIMEDWAIT | thread can be woken up by timer callback |
_PTHREAD_STATE_TIMEOUT | thread timed wait has reached timeout |
This typedef is declared in pthread.h source file, line 56.
Preprocessor condition: defined( CONFIG_PTHREAD )
void pthread_testcancel(void ) [link]
This function is declared in pthread.h source file, line 265.
This is available when CONFIG_PTHREAD_CANCEL is defined.
Preprocessor condition: defined( CONFIG_PTHREAD )
void pthread_yield(void ) [link]
This function is declared in pthread.h source file, line 185.
this function switchs to next thread
This is available when CONFIG_PTHREAD is defined.
Preprocessor condition: defined( CONFIG_PTHREAD )
typedef void (__pthread_cleanup_fcn_t)(void *) [link]
This typedef is declared in pthread.h source file, line 220.
This typedef is for internal use only.
Preprocessor condition: defined( CONFIG_PTHREAD )
struct __pthread_cleanup_s * __pthread_cleanup_list [link]
This variable is declared in pthread.h source file, line 233.
cleanup context linked list
This variable is for internal use only.
Preprocessor condition: defined( CONFIG_PTHREAD )
struct __pthread_cleanup_s [link]
This struct is declared in pthread.h source file, line 225.
cancelation cleanup context
This is available when CONFIG_PTHREAD_CANCEL is defined.
This struct is for internal use only.
Preprocessor condition: defined( CONFIG_PTHREAD )
Field | Description |
---|---|
__pthread_cleanup_fcn_t * fcn; | |
void * arg; | |
struct __pthread_cleanup_s * prev; |
This variable is declared in pthread.h source file, line 67.
pointer to current thread
This variable is for internal use only.
Preprocessor condition: defined( CONFIG_PTHREAD )
pthread_mutexattr_t __pthread_mutex_attr_errorcheck [link]
This variable is declared in pthread.h source file, line 326.
This variable is for internal use only.
Preprocessor condition: defined( CONFIG_PTHREAD )
pthread_mutexattr_t __pthread_mutex_attr_normal [link]
This variable is declared in pthread.h source file, line 325.
This variable is for internal use only.
Preprocessor condition: defined( CONFIG_PTHREAD )
pthread_mutexattr_t __pthread_mutex_attr_recursive [link]
This variable is declared in pthread.h source file, line 327.
This variable is for internal use only.
Preprocessor condition: defined( CONFIG_PTHREAD )
error_t __pthread_mutex_normal_lock(pthread_mutex_t *mutex) [link]
This function is declared in pthread.h source file, line 379.
This function is for internal use only.
Preprocessor condition: defined( CONFIG_PTHREAD )
error_t __pthread_mutex_normal_trylock(pthread_mutex_t *mutex) [link]
This function is declared in pthread.h source file, line 381.
This function is for internal use only.
Preprocessor condition: defined( CONFIG_PTHREAD )
error_t __pthread_mutex_normal_unlock(pthread_mutex_t *mutex) [link]
This function is declared in pthread.h source file, line 383.
This function is for internal use only.
Preprocessor condition: defined( CONFIG_PTHREAD )
struct _pthread_barrier_func_s [link]
This struct is declared in pthread.h source file, line 599.
pointers to wait action depends on type
This struct is for internal use only.
Preprocessor condition: defined( CONFIG_PTHREAD ) and defined( CONFIG_PTHREAD_BARRIER_ATTR )
Field | Description |
---|---|
error_t (*barrier_init)(struct pthread_barrier_s *barrier, unsigned int count) ; | |
error_t (*barrier_wait)(struct pthread_barrier_s *barrier) ; | |
error_t (*barrier_destroy)(struct pthread_barrier_s *barrier) ; |
struct pthread_attr_s [link]
This struct is declared in pthread.h source file, line 122.
pthread attributes structure
This struct is for internal use only.
Preprocessor condition: defined( CONFIG_PTHREAD )
Field | Description |
---|---|
uint8_t flags; | |
cpu_id_t cpucount; | |
cpu_id_t cpulist[CONFIG_ARCH_LAST_CPU_ID+1]; | |
void * stack_buf; | |
size_t stack_size; |
See also pthread_attr_t.
struct pthread_barrier_s [link]
This struct is declared in pthread.h source file, line 570.
This struct is for internal use only.
Preprocessor condition: defined( CONFIG_PTHREAD )
Field | Description |
---|---|
const struct _pthread_barrier_func_s * funcs; | |
union <anonymous> { | |
struct <anonymous> { | |
int_fast32_t count; | |
sched_queue_root_t wait; | blocked threads waiting for read |
} normal; | |
struct <anonymous> { | |
int_fast32_t max_count; | |
atomic_t count; | |
uint8_t padding[CONFIG_CPU_CACHE_LINE]; | The padding is here to avoid cache line conflicts between count and release |
uint8_t release; | |
} spin; | |
}; |
See also pthread_barrier_t.
struct pthread_barrierattr_s [link]
This struct is declared in pthread.h source file, line 615.
barrier attributes structure
This struct is for internal use only.
Preprocessor condition: defined( CONFIG_PTHREAD ) and defined( CONFIG_PTHREAD_BARRIER_ATTR )
Field | Description |
---|---|
const struct _pthread_barrier_func_s * funcs; |
See also pthread_barrierattr_t.
struct pthread_cond_s [link]
This struct is declared in pthread.h source file, line 455.
This struct is for internal use only.
Preprocessor condition: defined( CONFIG_PTHREAD )
Field | Description |
---|---|
sched_queue_root_t wait; | blocked threads wait queue |
See also pthread_cond_t.
struct pthread_mutex_s [link]
This struct is declared in pthread.h source file, line 286.
Mutex object structure
This struct is for internal use only.
Preprocessor condition: defined( CONFIG_PTHREAD )
Field | Description |
---|---|
uint_fast8_t count; | mutex counter |
const struct pthread_mutexattr_s * attr; | mutex attributes |
struct sched_context_s * owner; | owner thread |
sched_queue_root_t wait; | blocked threads wait queue |
See also pthread_mutex_t.
struct pthread_mutexattr_s [link]
This struct is declared in pthread.h source file, line 306.
mutex attributes structure
This struct is for internal use only.
Preprocessor condition: defined( CONFIG_PTHREAD )
Field | Description |
---|---|
struct <anonymous> { | pointers to lock/trylock/unlock actions depends on type |
error_t (*mutex_lock)(pthread_mutex_t *mutex) ; | |
error_t (*mutex_trylock)(pthread_mutex_t *mutex) ; | |
error_t (*mutex_unlock)(pthread_mutex_t *mutex) ; | |
} type; |
See also pthread_mutexattr_t.
struct pthread_once_s [link]
This struct is declared in pthread.h source file, line 736.
This struct is for internal use only.
Preprocessor condition: defined( CONFIG_PTHREAD )
Field | Description |
---|---|
pthread_mutex_t lock; | |
bool_t done; |
See also pthread_once_t.
struct pthread_s [link]
This struct is declared in pthread.h source file, line 94.
pthread descriptor structure
This struct is for internal use only.
Preprocessor condition: defined( CONFIG_PTHREAD )
Field | Description |
---|---|
struct context_s ctx; | context |
struct sched_context_s sched_ctx; | |
enum pthread_state_e state; | |
lock_t lock; | |
struct pthread_s * joined; | pointer to thread waiting for termination |
void * joined_retval; | joined thread exit value |
void * arg; | start routine argument |
pthread_start_routine_t * start_routine; | start routine pointer |
See also pthread_t.
[link]
This struct is declared in pthread.h source file, line 505.
This struct is for internal use only.
Field | Description |
---|---|
int_fast8_t count; | lock counter: count < 0 is write locked, count > 0 is read locked. |
sched_queue_root_t wait_rd; | blocked threads waiting for read |
sched_queue_root_t wait_wr; | blocked threads waiting for write |
See also pthread_rwlock_t.