AP_HAL_ESP32: ensure task is deleted if member proc returns

- FreeRTOS task functions must not return or exit.
- vTaskDelete(NULL) deletes the calling task.

Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>
This commit is contained in:
Rhys Mainwaring 2025-01-05 15:00:42 +00:00 committed by Thomas Watson
parent 87b0de79df
commit 8d4d575be9

View File

@ -140,6 +140,9 @@ void IRAM_ATTR Scheduler::thread_create_trampoline(void *ctx)
AP_HAL::MemberProc *t = (AP_HAL::MemberProc *)ctx;
(*t)();
free(t);
// delete the calling task
vTaskDelete(NULL);
}
/*