diff --git a/arch/arm/src/common/arm_switchcontext.c b/arch/arm/src/common/arm_switchcontext.c index f342da9ebc7..ab266f29fb8 100644 --- a/arch/arm/src/common/arm_switchcontext.c +++ b/arch/arm/src/common/arm_switchcontext.c @@ -61,7 +61,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()) { /* Update scheduler parameters */ diff --git a/arch/arm64/src/common/arm64_switchcontext.c b/arch/arm64/src/common/arm64_switchcontext.c index 28b6014f149..78b9784e702 100644 --- a/arch/arm64/src/common/arm64_switchcontext.c +++ b/arch/arm64/src/common/arm64_switchcontext.c @@ -61,7 +61,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()) { /* Yes, then we have to do things differently. * Just copy the current_regs into the OLD rtcb. diff --git a/arch/risc-v/src/common/riscv_switchcontext.c b/arch/risc-v/src/common/riscv_switchcontext.c index fe3db42d0ef..d7df00ef86b 100644 --- a/arch/risc-v/src/common/riscv_switchcontext.c +++ b/arch/risc-v/src/common/riscv_switchcontext.c @@ -63,7 +63,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()) { /* Yes, then we have to do things differently. * Just copy the current_regs into the OLD rtcb. diff --git a/arch/sim/src/sim/sim_switchcontext.c b/arch/sim/src/sim/sim_switchcontext.c index 106af71e3ab..fc8d9d703df 100644 --- a/arch/sim/src/sim/sim_switchcontext.c +++ b/arch/sim/src/sim/sim_switchcontext.c @@ -64,7 +64,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()) { /* Yes, then we have to do things differently. * Just copy the current_regs into the OLD rtcb. diff --git a/arch/x86_64/src/common/x86_64_switchcontext.c b/arch/x86_64/src/common/x86_64_switchcontext.c index 16f14171401..d876f20a30e 100644 --- a/arch/x86_64/src/common/x86_64_switchcontext.c +++ b/arch/x86_64/src/common/x86_64_switchcontext.c @@ -65,7 +65,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()) { /* Yes, then we have to do things differently. * Just copy the g_current_regs into the OLD rtcb. diff --git a/boards/arm/cxd56xx/common/src/cxd56_crashdump.c b/boards/arm/cxd56xx/common/src/cxd56_crashdump.c index fc99e88090c..c3c37a164c9 100644 --- a/boards/arm/cxd56xx/common/src/cxd56_crashdump.c +++ b/boards/arm/cxd56xx/common/src/cxd56_crashdump.c @@ -155,12 +155,7 @@ void board_crashdump(uintptr_t sp, struct tcb_s *tcb, pdump->info.pid = tcb->pid; - /* If current_regs is not NULL then we are in an interrupt context - * and the user context is in current_regs else we are running in - * the users context - */ - - if (up_current_regs()) + if (up_interrupt_context()) { #if CONFIG_ARCH_INTERRUPTSTACK > 3 pdump->info.stacks.interrupt.sp = sp; diff --git a/boards/arm/stm32/nucleo-f429zi/src/stm32_bbsram.c b/boards/arm/stm32/nucleo-f429zi/src/stm32_bbsram.c index 0b2e362525f..9f4c643368f 100644 --- a/boards/arm/stm32/nucleo-f429zi/src/stm32_bbsram.c +++ b/boards/arm/stm32/nucleo-f429zi/src/stm32_bbsram.c @@ -426,12 +426,7 @@ void board_crashdump(uintptr_t sp, struct tcb_s *tcb, pdump->info.pid = tcb->pid; - /* If current_regs is not NULL then we are in an interrupt context - * and the user context is in current_regs else we are running in - * the users context - */ - - if (up_current_regs()) + if (up_interrupt_context()) { pdump->info.stacks.interrupt.sp = sp; pdump->info.flags |= (REGS_PRESENT | USERSTACK_PRESENT | diff --git a/boards/arm/stm32f7/nucleo-144/src/stm32_bbsram.c b/boards/arm/stm32f7/nucleo-144/src/stm32_bbsram.c index 5ea551dd901..9e11adaaa69 100644 --- a/boards/arm/stm32f7/nucleo-144/src/stm32_bbsram.c +++ b/boards/arm/stm32f7/nucleo-144/src/stm32_bbsram.c @@ -426,12 +426,7 @@ void board_crashdump(uintptr_t sp, struct tcb_s *tcb, pdump->info.pid = tcb->pid; - /* If current_regs is not NULL then we are in an interrupt context - * and the user context is in current_regs else we are running in - * the users context - */ - - if (up_current_regs()) + if (up_interrupt_context()) { pdump->info.stacks.interrupt.sp = sp; pdump->info.flags |= (REGS_PRESENT | USERSTACK_PRESENT | diff --git a/boards/renesas/rx65n/rx65n-grrose/src/rx65n_sbram.c b/boards/renesas/rx65n/rx65n-grrose/src/rx65n_sbram.c index 09a32bbccc6..881c785040f 100644 --- a/boards/renesas/rx65n/rx65n-grrose/src/rx65n_sbram.c +++ b/boards/renesas/rx65n/rx65n-grrose/src/rx65n_sbram.c @@ -380,12 +380,7 @@ void board_crashdump(uintptr_t sp, struct tcb_s *tcb, pdump->info.pid = tcb->pid; - /* If current_regs is not NULL then we are in an interrupt context - * and the user context is in current_regs else we are running in - * the users context - */ - - if (up_current_regs()) + if (up_interrupt_context()) { pdump->info.stacks.interrupt.sp = sp; pdump->info.flags |= (REGS_PRESENT | USERSTACK_PRESENT | diff --git a/boards/renesas/rx65n/rx65n-rsk2mb/src/rx65n_sbram.c b/boards/renesas/rx65n/rx65n-rsk2mb/src/rx65n_sbram.c index f4f24219ed9..f5918bb850c 100644 --- a/boards/renesas/rx65n/rx65n-rsk2mb/src/rx65n_sbram.c +++ b/boards/renesas/rx65n/rx65n-rsk2mb/src/rx65n_sbram.c @@ -378,12 +378,7 @@ void board_crashdump(uintptr_t sp, struct tcb_s *tcb, pdump->info.pid = tcb->pid; - /* If current_regs is not NULL then we are in an interrupt context - * and the user context is in current_regs else we are running in - * the users context - */ - - if (up_current_regs()) + if (up_interrupt_context()) { pdump->info.stacks.interrupt.sp = sp; pdump->info.flags |= (REGS_PRESENT | USERSTACK_PRESENT |