esp-idf/components/freertos/FreeRTOS-Kernel
Darian Leung 1625a3aae2 freertos: Fix event group task list race condition
FreeRTOS synchronization primitives (e.g., queues, eventgroups) use various event lists (i.e., task lists) to track what
tasks are blocked on a current primitive. Usually these event lists are accessed via one of the event lists functions
(such as vTask[PlaceOn|RemoveFrom]UnorderedEventList()), which in turn ensure that the global task list spinlock
(xTaskQueueMutex) is taken when accessing these lists.

However, some functions in event_groups.c manually traverse their event lists. Thus if a tick interrupt occurs on
another core during traversal and that tick interrupt unblocks a task on the event list being traversed, the event list
will be corrupted.

This commit modifies the following event_groups.c functions so that they take the global task list lock before
traversing their event list.

- xEventGroupSetBits()
- vEventGroupDelete()
2022-06-30 20:12:26 +08:00
..
include/freertos freertos: Fix event group task list race condition 2022-06-30 20:12:26 +08:00
portable freertos: Xtensa FreeRTOS saves threadptr in solicited stack frame 2022-06-15 20:20:41 +08:00
croutine.c freertos: Add SPDX license identifiers and update xtensa port files 2022-02-03 17:08:14 +08:00
event_groups.c freertos: Fix event group task list race condition 2022-06-30 20:12:26 +08:00
GitHub-FreeRTOS-Kernel-Home.url freertos: update freertos folder structure to match upstream 2021-10-29 12:05:13 +08:00
History.txt freertos: update freertos folder structure to match upstream 2021-10-29 12:05:13 +08:00
LICENSE.md freertos: update freertos folder structure to match upstream 2021-10-29 12:05:13 +08:00
list.c freertos: Add SPDX license identifiers and update xtensa port files 2022-02-03 17:08:14 +08:00
queue.c freertos: Add SPDX license identifiers and update xtensa port files 2022-02-03 17:08:14 +08:00
Quick_Start_Guide.url freertos: update freertos folder structure to match upstream 2021-10-29 12:05:13 +08:00
stream_buffer.c freertos: Add SPDX license identifiers and update xtensa port files 2022-02-03 17:08:14 +08:00
tasks.c freertos: Fix event group task list race condition 2022-06-30 20:12:26 +08:00
timers.c freertos: Add SPDX license identifiers and update xtensa port files 2022-02-03 17:08:14 +08:00