33 #ifndef _FREERTOS_POSIX_PTHREAD_H_ 34 #define _FREERTOS_POSIX_PTHREAD_H_ 45 #define PTHREAD_CREATE_DETACHED 0 46 #define PTHREAD_CREATE_JOINABLE 1 55 #define PTHREAD_BARRIER_SERIAL_THREAD ( -2 ) 61 #ifndef PTHREAD_MUTEX_NORMAL 62 #define PTHREAD_MUTEX_NORMAL 0 64 #ifndef PTHREAD_MUTEX_ERRORCHECK 65 #define PTHREAD_MUTEX_ERRORCHECK 1 67 #ifndef PTHREAD_MUTEX_RECURSIVE 68 #define PTHREAD_MUTEX_RECURSIVE 2 70 #ifndef PTHREAD_MUTEX_DEFAULT 71 #define PTHREAD_MUTEX_DEFAULT PTHREAD_MUTEX_NORMAL 79 #define PTHREAD_COND_INITIALIZER FREERTOS_POSIX_COND_INITIALIZER 81 #if posixconfigENABLE_PTHREAD_MUTEX_T == 1 86 #define PTHREAD_MUTEX_INITIALIZER FREERTOS_POSIX_MUTEX_INITIALIZER 128 size_t * stacksize );
230 void *( *startroutine )(
void * ),
int pthread_attr_destroy(pthread_attr_t *attr)
Destroy the thread attributes object.
Definition: FreeRTOS_POSIX_pthread.c:131
void * pthread_barrier_t
Used to identify a barrier.
Definition: types.h:82
int pthread_cond_broadcast(pthread_cond_t *cond)
Broadcast a condition.
Definition: FreeRTOS_POSIX_pthread_cond.c:82
void pthread_exit(void *value_ptr)
Thread termination.
Definition: FreeRTOS_POSIX_pthread.c:381
int pthread_mutex_unlock(pthread_mutex_t *mutex)
Unlock a mutex.
Definition: FreeRTOS_POSIX_pthread_mutex.c:272
int pthread_barrier_init(pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned count)
Initialize a barrier object.
Definition: FreeRTOS_POSIX_pthread_barrier.c:83
int pthread_mutexattr_gettype(const pthread_mutexattr_t *attr, int *type)
Get the mutex type attribute.
Definition: FreeRTOS_POSIX_pthread_mutex.c:320
int pthread_mutexattr_init(pthread_mutexattr_t *attr)
Initialize the mutex attributes object.
Definition: FreeRTOS_POSIX_pthread_mutex.c:332
int pthread_mutex_init(pthread_mutex_t *mutex, const pthread_mutexattr_t *attr)
Initialize a mutex.
Definition: FreeRTOS_POSIX_pthread_mutex.c:113
int pthread_cond_destroy(pthread_cond_t *cond)
Destroy condition variables.
Definition: FreeRTOS_POSIX_pthread_cond.c:111
int pthread_create(pthread_t *thread, const pthread_attr_t *attr, void *(*startroutine)(void *), void *arg)
Thread creation.
Definition: FreeRTOS_POSIX_pthread.c:279
Scheduling parameters required for implementation of each supported scheduling policy.
Definition: sched.h:47
int pthread_attr_init(pthread_attr_t *attr)
Initialize the thread attributes object.
Definition: FreeRTOS_POSIX_pthread.c:180
int pthread_setschedparam(pthread_t thread, int policy, const struct sched_param *param)
Dynamic thread scheduling parameters access.
Definition: FreeRTOS_POSIX_pthread.c:475
int pthread_attr_getdetachstate(const pthread_attr_t *attr, int *detachstate)
Get detachstate attribute.
Definition: FreeRTOS_POSIX_pthread.c:144
void * pthread_cond_t
Used for condition variables. Enabled/disabled by posixconfigENABLE_PTHREAD_COND_T.
Definition: types.h:94
int pthread_mutex_trylock(pthread_mutex_t *mutex)
Attempt to lock a mutex. Fail immediately if mutex is already locked.
Definition: FreeRTOS_POSIX_pthread_mutex.c:248
int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex)
Wait on a condition.
Definition: FreeRTOS_POSIX_pthread_cond.c:246
int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *abstime)
Wait on a condition with a timeout.
Definition: FreeRTOS_POSIX_pthread_cond.c:192
int pthread_attr_getstacksize(const pthread_attr_t *attr, size_t *stacksize)
Get stacksize attribute.
Definition: FreeRTOS_POSIX_pthread.c:168
void * pthread_mutexattr_t
Used to identify a mutex attribute object. Enabled/disabled by posixconfigENABLE_PTHREAD_MUTEXATTR_T...
Definition: types.h:118
void * pthread_attr_t
Used to identify a thread attribute object. Enabled/disabled by posixconfigENABLE_PTHREAD_ATTR_T.
Definition: types.h:76
int pthread_attr_setschedparam(pthread_attr_t *attr, const struct sched_param *param)
Set schedparam attribute.
Definition: FreeRTOS_POSIX_pthread.c:228
int pthread_mutex_timedlock(pthread_mutex_t *mutex, const struct timespec *abstime)
Lock a mutex with timeout.
Definition: FreeRTOS_POSIX_pthread_mutex.c:183
int pthread_attr_getschedparam(const pthread_attr_t *attr, struct sched_param *param)
Get schedparam attribute.
Definition: FreeRTOS_POSIX_pthread.c:156
int pthread_mutexattr_destroy(pthread_mutexattr_t *attr)
Destroy the mutex attributes object.
Definition: FreeRTOS_POSIX_pthread_mutex.c:310
int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type)
Set the mutex type attribute.
Definition: FreeRTOS_POSIX_pthread_mutex.c:360
void * pthread_barrierattr_t
Used to define a barrier attributes object.
Definition: types.h:87
int pthread_cond_signal(pthread_cond_t *cond)
Signal a condition.
Definition: FreeRTOS_POSIX_pthread_cond.c:159
int pthread_mutex_lock(pthread_mutex_t *mutex)
Lock a mutex.
Definition: FreeRTOS_POSIX_pthread_mutex.c:176
int pthread_equal(pthread_t t1, pthread_t t2)
Compare thread IDs.
Definition: FreeRTOS_POSIX_pthread.c:373
int pthread_getschedparam(pthread_t thread, int *policy, struct sched_param *param)
Dynamic thread scheduling parameters access.
Definition: FreeRTOS_POSIX_pthread.c:359
pthread_t pthread_self(void)
Get the calling thread ID.
Definition: FreeRTOS_POSIX_pthread.c:466
int pthread_barrier_wait(pthread_barrier_t *barrier)
Synchronize at a barrier.
Definition: FreeRTOS_POSIX_pthread_barrier.c:152
int pthread_mutex_destroy(pthread_mutex_t *mutex)
Destroy a mutex.
Definition: FreeRTOS_POSIX_pthread_mutex.c:97
represents an elapsed time
Definition: time.h:78
int pthread_join(pthread_t thread, void **retval)
Wait for thread termination.
Definition: FreeRTOS_POSIX_pthread.c:394
void * pthread_mutex_t
Used for mutexes. Enabled/disabled by posixconfigENABLE_PTHREAD_MUTEX_T.
Definition: types.h:110
int pthread_barrier_destroy(pthread_barrier_t *barrier)
Destroy a barrier object.
Definition: FreeRTOS_POSIX_pthread_barrier.c:67
void * pthread_condattr_t
Used to identify a condition attribute object. Enabled/disabled by posixconfigENABLE_PTHREAD_CONDATTR...
Definition: types.h:102
int pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr)
Initialize condition variables.
Definition: FreeRTOS_POSIX_pthread_cond.c:125
int pthread_attr_setdetachstate(pthread_attr_t *attr, int detachstate)
Set detachstate attribute.
Definition: FreeRTOS_POSIX_pthread.c:208
void * pthread_t
Used to identify a thread. Enabled/disabled by posixconfigENABLE_PTHREAD_T.
Definition: types.h:126
int pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize)
Set stacksize attribute.
Definition: FreeRTOS_POSIX_pthread.c:259