Skip to content

Commit

Permalink
board/arm/stm32: highpri up_interrupt_context to is_nesting_interrupt
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
jasonbu authored and xiaoxiang781216 committed Oct 8, 2024
1 parent 7cb9b07 commit 846cb7d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion boards/arm/stm32/viewtool-stm32f107/src/stm32_highpri.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand All @@ -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++;
}
Expand Down

0 comments on commit 846cb7d

Please sign in to comment.