hujun260 commented on code in PR #14578: URL: https://github.com/apache/nuttx/pull/14578#discussion_r1853193035
########## drivers/note/noterpmsg_driver.c: ########## @@ -178,15 +181,15 @@ static bool noterpmsg_transfer(FAR struct noterpmsg_driver_s *drv, static void noterpmsg_work(FAR void *priv) { FAR struct noterpmsg_driver_s *drv = priv; - irqstate_t flags = enter_critical_section(); + irqstate_t flags = spin_lock_irqsave(&g_note_driver_lock); if (!noterpmsg_transfer(drv, false)) { work_queue(HPWORK, &drv->work, noterpmsg_work, drv, NOTE_RPMSG_WORK_DELAY); } - leave_critical_section(flags); + spin_unlock_irqrestore(&g_note_driver_lock, flags); Review Comment: done ########## drivers/note/noterpmsg_driver.c: ########## @@ -178,15 +181,15 @@ static bool noterpmsg_transfer(FAR struct noterpmsg_driver_s *drv, static void noterpmsg_work(FAR void *priv) { FAR struct noterpmsg_driver_s *drv = priv; - irqstate_t flags = enter_critical_section(); + irqstate_t flags = spin_lock_irqsave(&g_note_driver_lock); Review Comment: done ########## drivers/note/noterpmsg_driver.c: ########## @@ -85,6 +86,8 @@ struct noterpmsg_driver_s g_noterpmsg_driver = }, }; +volatile spinlock_t g_note_driver_lock = SP_UNLOCKED; 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