Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

board/arm/nrf52: fix use up_interrupt_context to is_nesting_interrupt #13895

Merged
merged 2 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion boards/arm/nrf52/nrf52840-dk/src/nrf52_highpri.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ static struct highpri_s g_highpri;
* Private Functions
****************************************************************************/

static inline_function bool is_nesting_interrupt(void)
{
return up_current_regs() != NULL;
}

/****************************************************************************
* Name: timer_handler
*
Expand Down Expand Up @@ -126,7 +131,7 @@ void timer_handler(void)

/* Check if we are in an interrupt handle */

if (up_interrupt_context())
xiaoxiang781216 marked this conversation as resolved.
Show resolved Hide resolved
if (is_nesting_interrupt())
{
g_highpri.handler++;
}
Expand Down
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
Loading