This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 846cb7d432b13d62c1497f478cfc948118f72091 Author: buxiasen <[email protected]> AuthorDate: Tue Oct 8 16:47:30 2024 +0800 board/arm/stm32: highpri up_interrupt_context to is_nesting_interrupt up_interrupt_context indicates that we self inside interrupt/handler mode, replaced to private function is_nesting_interrupt to make less confused. Signed-off-by: buxiasen <[email protected]> --- boards/arm/stm32/viewtool-stm32f107/src/stm32_highpri.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/boards/arm/stm32/viewtool-stm32f107/src/stm32_highpri.c b/boards/arm/stm32/viewtool-stm32f107/src/stm32_highpri.c index 07c1c5262a..c095fc3284 100644 --- a/boards/arm/stm32/viewtool-stm32f107/src/stm32_highpri.c +++ b/boards/arm/stm32/viewtool-stm32f107/src/stm32_highpri.c @@ -103,6 +103,11 @@ static struct highpri_s g_highpri; * Private Functions ****************************************************************************/ +static inline_function bool is_nesting_interrupt(void) +{ + return up_current_regs() != NULL; +} + /**************************************************************************** * Name: tim6_handler * @@ -128,7 +133,7 @@ void tim6_handler(void) /* Check if we are in an interrupt handle */ - if (up_interrupt_context()) + if (is_nesting_interrupt()) { g_highpri.handler++; }
