hujun260 commented on code in PR #14865: URL: https://github.com/apache/nuttx/pull/14865#discussion_r1855753675
########## arch/arm/include/arm/irq.h: ########## @@ -239,40 +231,17 @@ static inline irqstate_t up_irq_enable(void) int up_cpu_index(void) noinstrument_function; #endif /* CONFIG_ARCH_HAVE_MULTICPU */ -noinstrument_function -static inline_function uint32_t *up_current_regs(void) -{ -#ifdef CONFIG_SMP - return (uint32_t *)g_current_regs[up_cpu_index()]; -#else - return (uint32_t *)g_current_regs[0]; -#endif -} - -noinstrument_function -static inline_function void up_set_current_regs(uint32_t *regs) -{ -#ifdef CONFIG_SMP - g_current_regs[up_cpu_index()] = regs; -#else - g_current_regs[0] = regs; -#endif -} - noinstrument_function static inline_function bool up_interrupt_context(void) { #ifdef CONFIG_SMP irqstate_t flags = up_irq_save(); -#endif - - bool ret = up_current_regs() != NULL; - -#ifdef CONFIG_SMP + bool ret = g_interrupt_context[up_cpu_index()]; Review Comment: We cannot see the definition of this_cpu here, because irq.h cannot include nuttx/sched.h. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org