Files
PX4-Autopilot/platforms
Eric Katzfey 67e8a34802 fix(qurt): reclaim task slots after normal exit (#29826)
Returning from a QuRT task bypasses px4_task_exit(), while normal module
shutdown does not call px4_task_join(). Repeated starts and stops therefore
leak task descriptors and eventually exhaust the 24-slot task table.

Route task returns through px4_task_exit() and reap exiting threads before
spawning another task. Keep each slot reserved until pthread_join()
completes, serialize competing joiners without holding the task mutex
across the join, and reject cancellation of tasks waiting on these joins.

Use monotonically increasing task handles so a late join, delete, or signal
cannot act on a replacement task after its table slot has been reused.

Ported from modalai/px4-firmware commit
1fe92691127df29e72af05f99d462c62428d3994 without code changes.


Assisted-by: Codex

Signed-off-by: Eric Katzfey <eric.katzfey@modalai.com>
2026-11-19 09:40:29 -05:00
..
…