kopia lustrzana https://github.com/espressif/esp-idf
f7b859ac84
Causes test added in parent commit to pass. This race happens if the deleted task is running on the other CPU, and is already spinning in a critical section waiting for xTaskQueueMutex because it's about to be blocked for a resource. The "deleted" task would end up blocked, possibly indefinitely, and never actually deleted or its resources cleaned up by the idle tasks. Details: vTaskDelete() adds the target task to the xTasksWaitingTermination list, expecting it to be yielded off CPU and then cleaned up later. However as soon as vTaskDelete() releases xTaskQueueMutex, the target task runs and moves itself to the xDelayedTaskList1. Because interrupts are already disabled on that CPU, the "yield" to the other CPU sent by the vTaskDelete() comes afterward so doesn't help. |
||
---|---|---|
.. | ||
include/freertos | ||
port | ||
test | ||
CMakeLists.txt | ||
FreeRTOS-openocd.c | ||
History.txt | ||
Kconfig | ||
component.mk | ||
croutine.c | ||
event_groups.c | ||
freertos_v8_compat.c | ||
license.txt | ||
linker.lf | ||
list.c | ||
queue.c | ||
sdkconfig.rename | ||
stream_buffer.c | ||
tasks.c | ||
timers.c |