pthread.h header reference
[POSIX Threads module]

The source code of this header can be browsed online.

Members  

Types  

Functions  

Variables  

Macros  

Members detail  

#define CONTEXT_LOCAL_PTHREAD_GET(th, n)  

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)  

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  

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)  

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)  

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  

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  

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  

This macro is declared in pthread.h source file, line 208.

canceled thread exit value

Preprocessor condition: defined( CONFIG_PTHREAD )

#define PTHREAD_CANCEL_ASYNCHRONOUS  

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  

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  

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  

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  

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  

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  

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  

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  

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  

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_  

This macro is declared in pthread.h source file, line 23.

#define PTHREAD_KEYS_MAX  

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  

This macro is declared in pthread.h source file, line 321.

Default mutex type identifier

Preprocessor condition: defined( CONFIG_PTHREAD )

#define PTHREAD_MUTEX_ERRORCHECK  

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  

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  

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  

This macro is declared in pthread.h source file, line 315.

Normal mutex type identifier

Preprocessor condition: defined( CONFIG_PTHREAD )

#define PTHREAD_MUTEX_RECURSIVE  

This macro is declared in pthread.h source file, line 319.

Recurvive mutex type identifier

Preprocessor condition: defined( CONFIG_PTHREAD )

#define PTHREAD_ONCE_INIT  

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  

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  

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  

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  

This macro is declared in pthread.h source file, line 115.

Preprocessor condition: defined( CONFIG_PTHREAD )

#define _PTHREAD_ATTRFLAG_DETACHED  

This macro is declared in pthread.h source file, line 117.

Preprocessor condition: defined( CONFIG_PTHREAD )

#define _PTHREAD_ATTRFLAG_STACK  

This macro is declared in pthread.h source file, line 116.

Preprocessor condition: defined( CONFIG_PTHREAD )

const void * _key_values[CONFIG_PTHREAD_KEYS_MAX]  

This variable is declared in pthread.h source file, line 821.

Preprocessor condition: defined( CONFIG_PTHREAD )

error_t _pthread_barrier_normal_destroy(pthread_barrier_t *barrier)  

This is available when CONFIG_PTHREAD_BARRIER is defined.

error_t _pthread_barrier_normal_wait(pthread_barrier_t *barrier)  

This is available when CONFIG_PTHREAD_BARRIER is defined.

struct _pthread_barrier_func_s barrier_normal_funcs  

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)  

this function adds a cpu affinity attribute

This is available when CONFIG_PTHREAD_ATTRIBUTES is defined.

error_t pthread_attr_destroy(pthread_attr_t *attr)  

this function destroys a new pthread attribute

This is available when CONFIG_PTHREAD_ATTRIBUTES is defined.

error_t pthread_attr_init(pthread_attr_t *attr)  

this function creates a new pthread attribute

This is available when CONFIG_PTHREAD_ATTRIBUTES is defined.

error_t pthread_attr_setdetachstate(pthread_attr_t *attr, uint8_t state)  

this function set initial thread state

This is available when CONFIG_PTHREAD_ATTRIBUTES is defined.

error_t pthread_attr_setstack(pthread_attr_t *attr, void *stack_buf, size_t stack_size)  

this function sets stack buffer and size attribute

This is available when CONFIG_PTHREAD_ATTRIBUTES is defined.

error_t pthread_attr_setstacksize(pthread_attr_t *attr, size_t stack_size)  

this function sets stack size attribute

This is available when CONFIG_PTHREAD_ATTRIBUTES is defined.

typedef struct pthread_attr_s pthread_attr_t  

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)  

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)  

This is available when CONFIG_PTHREAD_BARRIER is defined.

typedef struct pthread_barrier_s pthread_barrier_t  

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)  

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)  

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)  

This is available when CONFIG_PTHREAD_BARRIER_ATTR is defined.

typedef struct pthread_barrierattr_s pthread_barrierattr_t  

This typedef is declared in pthread.h source file, line 566.

Preprocessor condition: defined( CONFIG_PTHREAD )

error_t pthread_cancel(pthread_t thread)  

This is available when CONFIG_PTHREAD_CANCEL is defined.

#define pthread_cleanup_pop(execute)  

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_)  

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)  

This is available when CONFIG_PTHREAD_COND is defined.

error_t pthread_cond_destroy(pthread_cond_t *cond)  

This is available when CONFIG_PTHREAD_COND is defined.

error_t pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr)  

This is available when CONFIG_PTHREAD_COND is defined.

error_t pthread_cond_signal(pthread_cond_t *cond)  

This is available when CONFIG_PTHREAD_COND is defined.

typedef struct pthread_cond_s pthread_cond_t  

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)  

This is available when CONFIG_PTHREAD_COND_TIME is defined.

error_t pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex)  

This is available when CONFIG_PTHREAD_COND is defined.

typedef struct pthread_condattr_s pthread_condattr_t  

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)  

this function creates a new pthread

error_t pthread_detach(pthread_t thread)  

this function detachs a pthread

This is available when CONFIG_PTHREAD_JOIN is defined.

error_t pthread_equal(pthread_t t1, pthread_t t2)  

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)  

this function ends pthread execution

void * pthread_getspecific(pthread_key_t key)  

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 )

error_t pthread_join(pthread_t thread, void **value_ptr)  

this function waits for thread termination

This is available when CONFIG_PTHREAD_JOIN is defined.

error_t pthread_key_create(pthread_key_t *key, void (*destructor)(void *) )  

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.

error_t pthread_key_delete(pthread_key_t key)  

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.

typedef size_t pthread_key_t  

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)  

this function destroy a mutex

This is available when CONFIG_PTHREAD_MUTEX is defined.

error_t pthread_mutex_init(pthread_mutex_t *mutex, const pthread_mutexattr_t *attr)  

this function initializes a mutex

This is available when CONFIG_PTHREAD_MUTEX is defined.

error_t pthread_mutex_lock(pthread_mutex_t *mutex)  

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)  

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  

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)  

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)  

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)  

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)  

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)  

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)  

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)  

this function sets the mutek type

This is available when CONFIG_PTHREAD_MUTEX_ATTR is defined.

typedef struct pthread_mutexattr_s pthread_mutexattr_t  

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)() )  

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  

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)  

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)  

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)  

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 )

typedef struct rwlock_s pthread_rwlock_t  

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)  

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)  

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)  

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)  

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  

This typedef is declared in pthread.h source file, line 507.

Preprocessor condition: defined( CONFIG_PTHREAD )

pthread_t pthread_self(void )  

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)  

This is available when CONFIG_PTHREAD_CANCEL is defined.

error_t pthread_setcanceltype(int_fast8_t type, int_fast8_t *oldtype)  

This is available when CONFIG_PTHREAD_CANCEL is defined.

error_t pthread_setspecific(pthread_key_t key, const void *value)  

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)  

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)  

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)  

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)  

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)  

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 )

typedef lock_t pthread_spinlock_t  

This typedef is declared in pthread.h source file, line 693.

Preprocessor condition: defined( CONFIG_PTHREAD )

typedef void *(pthread_start_routine_t)(void *arg)   

This typedef is declared in pthread.h source file, line 53.

Preprocessor condition: defined( CONFIG_PTHREAD )

enum pthread_state_e  

This enum is declared in pthread.h source file, line 82.

Preprocessor condition: defined( CONFIG_PTHREAD )

IdentifierDescription
_PTHREAD_STATE_DETACHEDthread is marked as detached
_PTHREAD_STATE_JOINABLEthread is joinable
_PTHREAD_STATE_CANCELEDthread has been canceled
_PTHREAD_STATE_NOCANCELthread ignore cancel
_PTHREAD_STATE_CANCELASYNCthread use asynchronous cancelation
_PTHREAD_STATE_TIMEDWAITthread can be woken up by timer callback
_PTHREAD_STATE_TIMEOUTthread timed wait has reached timeout

typedef struct pthread_s * pthread_t  

This typedef is declared in pthread.h source file, line 56.

Preprocessor condition: defined( CONFIG_PTHREAD )

void pthread_testcancel(void )  

This is available when CONFIG_PTHREAD_CANCEL is defined.

void pthread_yield(void )  

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 *)   

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  

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  

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 )

FieldDescription
__pthread_cleanup_fcn_t * fcn;
void * arg;
struct __pthread_cleanup_s * prev;

pthread_t __pthread_current  

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  

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  

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  

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)  

This function is for internal use only.

error_t __pthread_mutex_normal_trylock(pthread_mutex_t *mutex)  

This function is for internal use only.

error_t __pthread_mutex_normal_unlock(pthread_mutex_t *mutex)  

This function is for internal use only.

struct _pthread_barrier_func_s  

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 )

FieldDescription
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  

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 )

FieldDescription
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  

This struct is declared in pthread.h source file, line 570.

This struct is for internal use only.

Preprocessor condition: defined( CONFIG_PTHREAD )

FieldDescription
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  

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 )

FieldDescription
const struct _pthread_barrier_func_s * funcs;

See also pthread_barrierattr_t.

struct pthread_cond_s  

This struct is declared in pthread.h source file, line 455.

This struct is for internal use only.

Preprocessor condition: defined( CONFIG_PTHREAD )

FieldDescription
sched_queue_root_t wait;blocked threads wait queue

See also pthread_cond_t.

struct pthread_mutex_s  

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 )

FieldDescription
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  

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 )

FieldDescription
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  

This struct is declared in pthread.h source file, line 736.

This struct is for internal use only.

Preprocessor condition: defined( CONFIG_PTHREAD )

FieldDescription
pthread_mutex_t lock;
bool_t done;

See also pthread_once_t.

struct pthread_s  

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 )

FieldDescription
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.

Valid XHTML 1.0 StrictGenerated by diaxen on Wed Oct 17 21:18:39 2018 using MkDoc