26 #ifndef _FREERTOS_POSIX_INTERNAL_H_ 27 #define _FREERTOS_POSIX_INTERNAL_H_ 35 #include "iot_doubly_linked_list.h" 40 #if posixconfigENABLE_PTHREAD_MUTEXATTR_T == 1 41 typedef struct pthread_mutexattr_internal
44 } pthread_mutexattr_internal_t;
47 #if posixconfigENABLE_PTHREAD_MUTEX_T == 1 52 typedef struct pthread_mutex_internal
54 BaseType_t xIsInitialized;
55 StaticSemaphore_t xMutex;
56 TaskHandle_t xTaskOwner;
57 pthread_mutexattr_internal_t xAttr;
58 } pthread_mutex_internal_t;
63 #define FREERTOS_POSIX_MUTEX_INITIALIZER \ 64 ( ( ( pthread_mutex_internal_t ) \ 66 .xIsInitialized = pdFALSE, \ 67 .xMutex = { { 0 } }, \ 69 .xAttr = { .iType = 0 } \ 75 #if posixconfigENABLE_PTHREAD_COND_T == 1 80 typedef struct pthread_cond_internal
82 BaseType_t xIsInitialized;
83 StaticSemaphore_t xCondWaitSemaphore;
84 unsigned iWaitingThreads;
85 } pthread_cond_internal_t;
91 #define FREERTOS_POSIX_COND_INITIALIZER \ 92 ( ( ( pthread_cond_internal_t ) \ 94 .xIsInitialized = pdFALSE, \ 95 .xCondWaitSemaphore = { { 0 } }, \ 96 .iWaitingThreads = 0 \ 103 #if posixconfigENABLE_SEM_T == 1 110 StaticSemaphore_t xSemaphore;
115 #if posixconfigENABLE_PTHREAD_BARRIER_T == 1 120 typedef struct pthread_barrier_internal
122 unsigned uThreadCount;
124 StaticSemaphore_t xThreadCountSemaphore;
125 StaticEventGroup_t xBarrierEventGroup;
126 } pthread_barrier_internal_t;