xtensa: use up_interrupt_context() to determine if in interrupt context

Signed-off-by: chenxiaoyi <chenxiaoyi@xiaomi.com>
This commit is contained in:
chenxiaoyi 2024-11-13 16:47:45 +08:00 committed by Xiang Xiao
parent e2a9c84260
commit 9cd1c81149

View file

@ -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.