mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-10 01:48:29 -04:00
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:
parent
87b0de79df
commit
8d4d575be9
@ -140,6 +140,9 @@ void IRAM_ATTR Scheduler::thread_create_trampoline(void *ctx)
|
|||||||
AP_HAL::MemberProc *t = (AP_HAL::MemberProc *)ctx;
|
AP_HAL::MemberProc *t = (AP_HAL::MemberProc *)ctx;
|
||||||
(*t)();
|
(*t)();
|
||||||
free(t);
|
free(t);
|
||||||
|
|
||||||
|
// delete the calling task
|
||||||
|
vTaskDelete(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user