esp-idf/components/freertos
Ivan Grokhotkov dc707d5933 freertos: ensure interrupts are disabled before enabling tick timer
xPortStartScheduler calls vPortSetupTimer -> _frxt_tick_timer_init,
which enables tick timer interrupt and sets up the first timeout.
From that point on, the interrupt can fire. If the interrupt happens
while _frxt_dispatch is running, the scheduler will enter an infinite
loop. This is because _frxt_dispatch isn't supposed to be preemptable,
and the tick interrupt will overwrite some of the registers used by
_frxt_dispatch.
Note that this situation doesn't practically occur on the real
hardware, where the execution of vPortSetupTimer and _frxt_dispatch
happens quickly enough. However it can be reproduced on an emulator
if the tick period is set to 1ms.

Add an explicit call to portDISABLE_INTERRUPTS in xPortStartScheduler
to guarantee that _frxt_dispatch doesn't run with interrupts enabled.
This is similar to the esprv_intc_int_set_threshold(1); call in
RISC-V version of port.c.
2021-12-30 18:00:59 +08:00
..
esp_additions rename processors to cores 2021-10-01 21:23:17 +08:00
include freertos: Add missing INCLUDE_ configurations for some functions 2021-12-21 10:54:28 +08:00
port freertos: ensure interrupts are disabled before enabling tick timer 2021-12-30 18:00:59 +08:00
test freertos: Add missing INCLUDE_ configurations for some functions 2021-12-21 10:54:28 +08:00
CMakeLists.txt freertos: updated the location of FreeRTOSConfig.h 2021-09-14 08:46:01 +05:30
component.mk freertos: updated the location of FreeRTOSConfig.h 2021-09-14 08:46:01 +05:30
croutine.c upgrade freertos version and history 2021-09-02 11:02:34 +08:00
event_groups.c freertos: Add portTRY_ENTRY_CRITICAL() and deprecate legacy spinlock fucntions 2021-11-22 18:42:10 +08:00
freertos_v8_compat.c freertos: add xQueueGenericReceive for backward compatibility 2020-11-27 19:08:42 +05:30
FreeRTOS-openocd.c freertos: fix defining uxTopUsedPriority for esp32s2beta 2019-10-29 16:38:48 +01:00
GitHub-FreeRTOS-Kernel-Home.url freertos: upgrade to 10.4.3 - missing files from upstream 2021-09-06 14:39:48 +08:00
History.txt upgrade freertos version and history 2021-09-02 11:02:34 +08:00
Kconfig freertos: add kconfig options for task snapshot functions 2021-09-01 15:13:48 +08:00
LICENSE.md freertos: upgrade to 10.4.3 - missing files from upstream 2021-09-06 14:39:48 +08:00
linker.lf freertos: upgrade to 10.4.3 - rename xaskRemoveFromUnorderedEventList 2021-10-01 13:28:42 +08:00
list.c freertos: upgrade to 10.4.3 -- extras 2021-09-09 11:54:47 +08:00
queue.c freertos: Add portTRY_ENTRY_CRITICAL() and deprecate legacy spinlock fucntions 2021-11-22 18:42:10 +08:00
Quick_Start_Guide.url freertos: upgrade to 10.4.3 - missing files from upstream 2021-09-06 14:39:48 +08:00
sdkconfig.rename freertos: always enable static allocation 2020-12-29 16:18:04 +01:00
stream_buffer.c Merge branch 'feature/freertos_try_enter_critical_v4.4' into 'release/v4.4' 2021-12-08 10:10:17 +00:00
tasks.c freertos: fix thread safety for checking scheduler state 2021-11-25 15:43:07 +05:30
timers.c freertos: Add portTRY_ENTRY_CRITICAL() and deprecate legacy spinlock fucntions 2021-11-22 18:42:10 +08:00