pthread: Fix pthread_cond_timedwait returning early from timeout
The reason timeouts would sometimes happen before the abstime deadline was due to rounding errors converting the timeout to milliseconds, and also because vTaskDelay(1) only delays until the next tick which is less than one full tick period. Closes https://github.com/espressif/esp-idf/issues/6901
This commit is contained in:
@@ -94,6 +94,8 @@ Condition Variables
|
||||
|
||||
Static initializer constant ``PTHREAD_COND_INITIALIZER`` is supported.
|
||||
|
||||
* The resolution of ``pthread_cond_timedwait()`` timeouts is the RTOS tick period (see :ref:`CONFIG_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
|
||||
|
||||
Thread-Specific Data
|
||||
|
||||
Reference in New Issue
Block a user