]> begriffs open source - freertos/commit
Pend a yield in portPRE_TASK_DELETE_HOOK (#1132)
authorGaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
Thu, 29 Aug 2024 15:51:35 +0000 (21:21 +0530)
committerGitHub <noreply@github.com>
Thu, 29 Aug 2024 15:51:35 +0000 (08:51 -0700)
commit6dab25ae4e2d4212b76dec01737fcdb2d257af50
tree722dda1e0d32f101a6f186f0351aa4ccbe76d21b
parente6d8308fde19860e4b86c2dfd7a404ff0304a237
Pend a yield in portPRE_TASK_DELETE_HOOK (#1132)

When a task deletes itself, it calls portPRE_TASK_DELETE_HOOK which
translates to vPortCloseRunningThread on the Windows port.
vPortCloseRunningThread never returns and as a result,
taskYIELD_WITHIN_API in vTaskDelete does not get called. As a result,
the next task is not scheduled when configUSE_PREEMPTION is set to 0.

This change records that a yield is pending so that the next tick
interrupt switches out the task that was deleted.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
portable/MSVC-MingW/port.c