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 <buxiasen@xiaomi.com>
This commit is contained in:
buxiasen 2024-10-08 16:47:30 +08:00 committed by Xiang Xiao
parent 431b848c79
commit 77d1f78996

View File

@ -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++;
}