EasyManua.ls Logo

Espressif ESP32-S2 - Page 843

Espressif ESP32-S2
1695 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 2. API Reference
pthread_mutexattr_gettype() / pthread_mutexattr_settype()
Static initializer constant PTHREAD_MUTEX_INITIALIZER is supported, but the non-standard static initializer
constants for other mutex types are not supported.
Note: These functions can be called from tasks created using either pthread or FreeRTOS APIs
Condition Variables
pthread_cond_init() - The attr argument is not implemented and is ignored.
pthread_cond_destroy()
pthread_cond_signal()
pthread_cond_broadcast()
pthread_cond_wait()
pthread_cond_timedwait()
Static initializer constant PTHREAD_COND_INITIALIZER is supported.
The resolution of pthread_cond_timedwait() timeouts is the RTOS tick period (see CON-
FIG_FREERTOS_HZ). Timeouts may be delayed up to one tick period after the requested timeout.
Note: These functions can be called from tasks created using either pthread or FreeRTOS APIs
Read/Write Locks
pthread_rwlock_init() - The attr argument is not implemented and is ignored.
pthread_rwlock_destroy()
pthread_rwlock_rdlock()
pthread_rwlock_wrlock()
pthread_rwlock_unlock()
Static initializer constant PTHREAD_RWLOCK_INITIALIZER is supported.
Note: These functions can be called from tasks created using either pthread or FreeRTOS APIs. Note also that the
current pthread reader-writer-locks implementation is based on the condition variable API. The performance is not
optimal when locking only for a minimal amount of time like e.g. accessing a simple variable. In these cases with
minimal locking time, a simple mutex might be faster.
Thread-Specific Data
pthread_key_create() - The destr_function argument is supported and will be called if a thread
function exits normally, calls pthread_exit(), or if the underlying task is deleted directly using the FreeR-
TOS function vTaskDelete().
pthread_key_delete()
pthread_setspecific() / pthread_getspecific()
Note: These functions can be called from tasks created using either pthread or FreeRTOS APIs
Note: There are other options for thread local storage in ESP-IDF, including options with higher performance. See
Thread Local Storage.
Espressif Systems 832
Submit Document Feedback
Release v4.4

Table of Contents