]> granicus.if.org Git - esp-idf/commit
freertos/fix SMP bug with Idle task clean up
authorDarian Leung <darian@espressif.com>
Thu, 23 Nov 2017 14:35:54 +0000 (22:35 +0800)
committerDarian Leung <darian@espressif.com>
Tue, 5 Dec 2017 10:13:56 +0000 (18:13 +0800)
commit38afa32cfb23f41eaab20f5037ef88b41d30acb1
tree082172d43ba27be10c4be064b493a57a6e58cbad
parent0554bc59a272cfedd0dee93e6538b105acee0476
freertos/fix SMP bug with Idle task clean up

This commit backports vTaskDelete() behavior from FreeRTOS v9.0.0  which
allows for the immediate freeing of task memory if the task being deleted
is not currently running and not pinned to the other core. This commit also
fixes a bug in prvCheckTasksWaitingTermination which prevented the
Idle Task from cleaning up all tasks awaiting deletion. Each iteration of the Idle
Task should traverse the xTasksWaitingTermination list and clean up all tasks
not pinned to the other core. The previous implementation would cause
prvCheckTasksWaitingTermination to return when encountering a task
pinned to the other core whilst traversing the xTasksWaitingTermination list.

The test case for vTaskDelete() has been updated to test for the bugfix and
backported deletion behavior.
components/freertos/tasks.c
components/freertos/test/test_freertos_task_delete.c
docs/api-guides/freertos-smp.rst
tools/unit-test-app/main/app_main.c