jlaitine commented on code in PR #16673:
URL: https://github.com/apache/nuttx/pull/16673#discussion_r2246916335


##########
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:
   No, it doesn't do the same thing. Bumping the irqcount doesn't prevent the 
leave_critical_section from disabling the local interrupts. It simply sets the 
up_irq_restore(flags); in the end... And this is the only thing needed here, 
keep the irqs disabled for this cpu.



-- 
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

Reply via email to