From 9cd1c81149ab7e26db706ca60fe34fd8fbd6e451 Mon Sep 17 00:00:00 2001 From: chenxiaoyi Date: Wed, 13 Nov 2024 16:47:45 +0800 Subject: [PATCH] xtensa: use up_interrupt_context() to determine if in interrupt context Signed-off-by: chenxiaoyi --- arch/xtensa/src/common/xtensa_switchcontext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/xtensa/src/common/xtensa_switchcontext.c b/arch/xtensa/src/common/xtensa_switchcontext.c index a98e3e1069c37..453f3671930a0 100644 --- a/arch/xtensa/src/common/xtensa_switchcontext.c +++ b/arch/xtensa/src/common/xtensa_switchcontext.c @@ -59,7 +59,7 @@ void up_switch_context(struct tcb_s *tcb, struct tcb_s *rtcb) { /* Are we in an interrupt handler? */ - if (!up_current_regs()) + if (!up_interrupt_context()) { /* Switch context to the context of the task at the head of the * ready to run list.