From 76b848e38c79a78fa878f468541d7f7e1db465c9 Mon Sep 17 00:00:00 2001 From: Andy Ross Date: Thu, 28 Oct 2021 12:58:02 -0700 Subject: [PATCH] arch/sparc: Add hook for CONFIG_SCHED_THREAD_USAGE accounting in ISRs Call into z_thread_usage_stop() before ISR entry to avoid including interrupt handling totals in thread usage stats. Signed-off-by: Andy Ross --- arch/sparc/core/interrupt_trap.S | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/sparc/core/interrupt_trap.S b/arch/sparc/core/interrupt_trap.S index 8c9b9086038..d900fc3cc76 100644 --- a/arch/sparc/core/interrupt_trap.S +++ b/arch/sparc/core/interrupt_trap.S @@ -145,6 +145,11 @@ __sparc_trap_interrupt: nop nop +#ifdef CONFIG_SCHED_THREAD_USAGE + call z_sched_usage_stop + nop +#endif + #ifdef CONFIG_TRACING_ISR call sys_trace_isr_enter nop