mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
7a4e1fee99
Previously, xTaskIncrementTick() would always trigger a yield (i.e., return pdTRUE) when called on core 1. This would mean core 1 would call vTaskSwitchContext() on every tick, leading to uneccesary CPU overhead. This commit fixes xTaskIncrementTick() in the following ways: - Clearly mark IDF additions in xTaskIncrementTick() - Moved esp_vApplicationTickHook() to be called direclty in xPortSysTickHandler() in order to simplify xTaskIncrementTick(). - Only core 0 calls xTaskIncrementTick() in order to simplify the function's logic. Core 0 is solely responsible for managing xTickCount and xPendedTicks - All other cores call xTaskIncrementTickOtherCores() instead which is a simplified version of xTaskIncrementTick() and handles the following: - Check if core 0 has unblocked a higher priority task to run - Check if the current core requires time slicing - Call vApplicationTickHook() |
||
---|---|---|
.. | ||
freertos |