hujun260 commented on code in PR #15324: URL: https://github.com/apache/nuttx/pull/15324#discussion_r1896784417
########## sched/irq/irq_attach.c: ########## @@ -67,13 +68,13 @@ int irq_to_ndx(int irq) { DEBUGASSERT(g_irqmap_count < CONFIG_ARCH_NUSER_INTERRUPTS); - irqstate_t flags = spin_lock_irqsave(NULL); + irqstate_t flags = spin_lock_irqsave(&g_irq_attach_lock); Review Comment: Due to the involvement of multiple global variables (g_irqmap[irq], g_irqmap_count) and their associated modification and conditional checks, I haven't found a suitable method to achieve atomic operations. ########## sched/mqueue/mq_msgfree.c: ########## @@ -69,9 +69,9 @@ void nxmq_free_msg(FAR struct mqueue_msg_s *mqmsg) * list from interrupt handlers. */ - flags = spin_lock_irqsave(NULL); + flags = spin_lock_irqsave(&g_msg_lock); Review Comment: done -- 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