33 #ifndef _FREERTOS_POSIX_PTHREAD_H_ 34 #define _FREERTOS_POSIX_PTHREAD_H_ 45 #define PTHREAD_CREATE_DETACHED 0 46 #define PTHREAD_CREATE_JOINABLE 1 56 #define PTHREAD_BARRIER_SERIAL_THREAD ( -2 ) 62 #ifndef PTHREAD_MUTEX_NORMAL 63 #define PTHREAD_MUTEX_NORMAL 0 65 #ifndef PTHREAD_MUTEX_ERRORCHECK 66 #define PTHREAD_MUTEX_ERRORCHECK 1 68 #ifndef PTHREAD_MUTEX_RECURSIVE 69 #define PTHREAD_MUTEX_RECURSIVE 2 71 #ifndef PTHREAD_MUTEX_DEFAULT 72 #define PTHREAD_MUTEX_DEFAULT PTHREAD_MUTEX_NORMAL 86 #if posixconfigENABLE_PTHREAD_COND_T == 1 87 #define PTHREAD_COND_INITIALIZER FREERTOS_POSIX_COND_INITIALIZER 90 #if posixconfigENABLE_PTHREAD_MUTEX_T == 1 91 #define PTHREAD_MUTEX_INITIALIZER FREERTOS_POSIX_MUTEX_INITIALIZER 133 size_t * stacksize );
246 void * ( *startroutine )(
void * ),
int pthread_attr_destroy(pthread_attr_t *attr)
Destroy the thread attributes object.
Definition: FreeRTOS_POSIX_pthread.c:136
int pthread_cond_broadcast(pthread_cond_t *cond)
Broadcast a condition.
Definition: FreeRTOS_POSIX_pthread_cond.c:105
void pthread_exit(void *value_ptr)
Thread termination.
Definition: FreeRTOS_POSIX_pthread.c:393
int pthread_mutex_unlock(pthread_mutex_t *mutex)
Unlock a mutex.
Definition: FreeRTOS_POSIX_pthread_mutex.c:276
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:70
int pthread_mutexattr_gettype(const pthread_mutexattr_t *attr, int *type)
Get the mutex type attribute.
Definition: FreeRTOS_POSIX_pthread_mutex.c:330
int pthread_mutexattr_init(pthread_mutexattr_t *attr)
Initialize the mutex attributes object.
Definition: FreeRTOS_POSIX_pthread_mutex.c:342
int pthread_mutex_init(pthread_mutex_t *mutex, const pthread_mutexattr_t *attr)
Initialize a mutex.
Definition: FreeRTOS_POSIX_pthread_mutex.c:112
int pthread_cond_destroy(pthread_cond_t *cond)
Destroy condition variables.
Definition: FreeRTOS_POSIX_pthread_cond.c:141
PthreadMutexAttrType_t pthread_mutexattr_t
Used to identify a mutex attribute object.
Definition: types.h:145
int pthread_create(pthread_t *thread, const pthread_attr_t *attr, void *(*startroutine)(void *), void *arg)
Thread creation.
Definition: FreeRTOS_POSIX_pthread.c:285
Scheduling parameters required for implementation of each supported scheduling policy.
Definition: sched.h:48
int pthread_attr_init(pthread_attr_t *attr)
Initialize the thread attributes object.
Definition: FreeRTOS_POSIX_pthread.c:188
PthreadMutexType_t pthread_mutex_t
Used for mutexes.
Definition: types.h:135
int pthread_setschedparam(pthread_t thread, int policy, const struct sched_param *param)
Dynamic thread scheduling parameters access.
Definition: FreeRTOS_POSIX_pthread.c:487
int pthread_attr_getdetachstate(const pthread_attr_t *attr, int *detachstate)
Get detachstate attribute.
Definition: FreeRTOS_POSIX_pthread.c:145
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:252
int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex)
Wait on a condition.
Definition: FreeRTOS_POSIX_pthread_cond.c:290
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:215
int pthread_attr_getstacksize(const pthread_attr_t *attr, size_t *stacksize)
Get stacksize attribute.
Definition: FreeRTOS_POSIX_pthread.c:176
void * pthread_barrierattr_t
Used to define a barrier attributes object.
Definition: types.h:106
int pthread_attr_setschedparam(pthread_attr_t *attr, const struct sched_param *param)
Set schedparam attribute.
Definition: FreeRTOS_POSIX_pthread.c:220
int pthread_mutex_timedlock(pthread_mutex_t *mutex, const struct timespec *abstime)
Lock a mutex with timeout.
Definition: FreeRTOS_POSIX_pthread_mutex.c:177
int pthread_attr_getschedparam(const pthread_attr_t *attr, struct sched_param *param)
Get schedparam attribute.
Definition: FreeRTOS_POSIX_pthread.c:164
int pthread_mutexattr_destroy(pthread_mutexattr_t *attr)
Destroy the mutex attributes object.
Definition: FreeRTOS_POSIX_pthread_mutex.c:321
int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type)
Set the mutex type attribute.
Definition: FreeRTOS_POSIX_pthread_mutex.c:351
int pthread_cond_signal(pthread_cond_t *cond)
Signal a condition.
Definition: FreeRTOS_POSIX_pthread_cond.c:182
int pthread_mutex_lock(pthread_mutex_t *mutex)
Lock a mutex.
Definition: FreeRTOS_POSIX_pthread_mutex.c:170
int pthread_attr_setschedpolicy(pthread_attr_t *attr, int policy)
Set the schedpolicy attribute.
Definition: FreeRTOS_POSIX_pthread.c:253
int pthread_equal(pthread_t t1, pthread_t t2)
Compare thread IDs.
Definition: FreeRTOS_POSIX_pthread.c:385
void * pthread_condattr_t
Used to identify a condition attribute object.
Definition: types.h:125
int pthread_getschedparam(pthread_t thread, int *policy, struct sched_param *param)
Dynamic thread scheduling parameters access.
Definition: FreeRTOS_POSIX_pthread.c:370
pthread_t pthread_self(void)
Get the calling thread ID.
Definition: FreeRTOS_POSIX_pthread.c:478
int pthread_barrier_wait(pthread_barrier_t *barrier)
Synchronize at a barrier.
Definition: FreeRTOS_POSIX_pthread_barrier.c:120
PthreadBarrierType_t pthread_barrier_t
Used to identify a barrier.
Definition: types.h:99
PthreadCondType_t pthread_cond_t
Used for condition variables.
Definition: types.h:115
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:99
int pthread_join(pthread_t thread, void **retval)
Wait for thread termination.
Definition: FreeRTOS_POSIX_pthread.c:406
PthreadAttrType_t pthread_attr_t
Used to identify a thread attribute object.
Definition: types.h:89
int pthread_barrier_destroy(pthread_barrier_t *barrier)
Destroy a barrier object.
Definition: FreeRTOS_POSIX_pthread_barrier.c:57
void * pthread_t
Used to identify a thread.
Definition: types.h:155
int pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr)
Initialize condition variables.
Definition: FreeRTOS_POSIX_pthread_cond.c:153
int pthread_attr_setdetachstate(pthread_attr_t *attr, int detachstate)
Set detachstate attribute.
Definition: FreeRTOS_POSIX_pthread.c:198
int pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize)
Set stacksize attribute.
Definition: FreeRTOS_POSIX_pthread.c:265