jlaitine commented on code in PR #16673: URL: https://github.com/apache/nuttx/pull/16673#discussion_r2247105017
########## arch/xtensa/src/common/xtensa_sigdeliver.c: ########## @@ -154,12 +154,11 @@ void xtensa_sig_deliver(void) */ board_autoled_off(LED_SIGNAL); + #ifdef CONFIG_SMP /* We need to keep the IRQ lock until task switching */ - rtcb->irqcount++; - leave_critical_section((regs[REG_PS])); - rtcb->irqcount--; + leave_critical_section(up_irq_save()); Review Comment: I submitted a separate PR on this: https://github.com/apache/nuttx/pull/16804 If you just call " leave_critical_section((regs[REG_PS]))", the leave_critical_section will set the irqflags to regs[REG_PS], in the end of leave_critical_section, regardless of the rtcb->irqcount... I just verified that it indeed does incorrectly enable the interrupts on the current CPU at that spot. -- 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