From 0b1f774519e571add2572f0ef884df28c732bb0a Mon Sep 17 00:00:00 2001 From: wangchengdong Date: Fri, 26 Sep 2025 15:52:51 +0800 Subject: [PATCH] arch/tricore: Fix tricore arch build error Fix the tircore arch build error introduced by PR17060 Signed-off-by: Chengdong Wang --- arch/tricore/src/common/tricore_doirq.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/tricore/src/common/tricore_doirq.c b/arch/tricore/src/common/tricore_doirq.c index ebb2e49d938..1f0d080af6a 100644 --- a/arch/tricore/src/common/tricore_doirq.c +++ b/arch/tricore/src/common/tricore_doirq.c @@ -47,6 +47,7 @@ IFX_INTERRUPT_INTERNAL(tricore_doirq, 0, 255) { struct tcb_s *running_task = g_running_tasks[this_cpu()]; + struct tcb_s *tcb; #ifdef CONFIG_SUPPRESS_INTERRUPTS PANIC(); @@ -87,7 +88,7 @@ IFX_INTERRUPT_INTERNAL(tricore_doirq, 0, 255) if (regs != up_current_regs()) { - running_task = this_task(); + tcb = this_task(); #ifdef CONFIG_ARCH_ADDRENV /* Make sure that the address environment for the previously @@ -101,14 +102,14 @@ IFX_INTERRUPT_INTERNAL(tricore_doirq, 0, 255) /* Update scheduler parameters */ - nxsched_switch_context(*running_task, tcb); + nxsched_switch_context(running_task, tcb); /* Record the new "running" task when context switch occurred. * g_running_tasks[] is only used by assertion logic for reporting * crashes. */ - g_running_tasks[this_cpu()] = running_task; + g_running_tasks[this_cpu()] = tcb; __mtcr(CPU_PCXI, (uintptr_t)up_current_regs()); __isync();