nuttx/arch/mips
Daniel P. Carvalho d4097a27e2 arch/mips/pic32mx: record the running task on interrupt exit.
pic32mx_decodeirq() saves the interrupted context into
g_running_tasks[this_cpu()]->xcp.regs on entry, but nothing updates
g_running_tasks[] after a context switch: every interrupt saves the
context into the Idle task's TCB, and once a task exits (up_exit() sets
the entry to NULL) no context is saved at all and the next context
switch restores stale registers.

Set g_running_tasks[this_cpu()] to this_task() before returning, as
pic32mz_decodeirq() does.  This is the same bug that crashed the
PIC32MZ-W1 when the netinit thread exited.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Daniel P. Carvalho <danieloak@gmail.com>
2026-10-08 09:28:21 -03:00
..
include arch/mips/jz4780: Add HDMI EDID parsing and dynamic display modes 2026-08-29 11:08:25 -03:00
src arch/mips/pic32mx: record the running task on interrupt exit. 2026-10-08 09:28:21 -03:00
Kconfig !sched/arch/libc: Give fork() and vfork() their real, separate semantics. 2026-08-10 08:57:30 -03:00