summaryrefslogtreecommitdiff
path: root/common_modules/module_manager/utilities/module_binary_to_c_array.c
diff options
context:
space:
mode:
authorFrédéric Desbiens <[email protected]>2026-09-08 15:42:39 -0400
committerGitHub <[email protected]>2026-09-08 15:42:39 -0400
commit945f5f5caa7e2ba39a6ff5d90dda60b116c94a49 (patch)
treeeedb1aa8322c92a9192d4db4c3261f2ca3650b75 /common_modules/module_manager/utilities/module_binary_to_c_array.c
parent29afcc394667660edd9e53cc17e6232b9e60aa96 (diff)
Moved the ARC ISR enter callout onto the system stack (#700)
_tx_thread_context_save() calls _tx_execution_isr_enter when TX_ENABLE_EXECUTION_CHANGE_NOTIFY is defined. On the path where an interrupt preempted a running thread, that call was made before the switch to the system stack, so the 32-byte call frame and the whole stack footprint of the callout were taken from the interrupted thread's stack, on top of the 160-byte interrupt frame the port had already allocated there. The callout is supplied by the application, so its stack usage is not bounded by ThreadX, and it is charged to every thread that happens to be running when an interrupt arrives. The two other callout sites in the same routine, the nested save and the idle system save, already run on the system stack, as does the _tx_execution_isr_exit call in _tx_thread_context_restore. _tx_thread_schedule was reordered in 6.1.9 so that _tx_execution_thread_enter runs on the system stack rather than the thread stack; the same reorder was never applied to the context save. The switch to the system stack now happens before the callout in the ARCv2_EM, ARC_HS and SMP ARC_HS ports. _tx_thread_context_fast_save is unchanged because the fast interrupt path never switches stacks by design. Fixes #149 Assisted-by: Copilot (Opus 5) <[email protected]>
Diffstat (limited to 'common_modules/module_manager/utilities/module_binary_to_c_array.c')
0 files changed, 0 insertions, 0 deletions