xiaoxiang781216 commented on code in PR #14578: URL: https://github.com/apache/nuttx/pull/14578#discussion_r1855170734
########## include/nuttx/spinlock.h: ########## @@ -291,6 +291,7 @@ static inline_function void spin_lock(FAR volatile spinlock_t *lock) /* Lock without trace note */ spin_lock_wo_note(lock); + sched_lock_wo_note(); Review Comment: spin_lock_wo_note need schedlock too ########## include/nuttx/spinlock.h: ########## @@ -353,6 +354,8 @@ spin_trylock_wo_note(FAR volatile spinlock_t *lock) } SP_DMB(); + sched_lock_wo_note(); Review Comment: lose sched lock note in spin_trylock ########## sched/irq/irq_csection.c: ########## @@ -232,7 +232,7 @@ irqstate_t enter_critical_section(void) DEBUGASSERT((g_cpu_irqset & (1 << cpu)) == 0); - spin_lock(&g_cpu_irqlock); + spin_lock_wo_note(&g_cpu_irqlock); Review Comment: ok ########## drivers/note/noterpmsg_driver.c: ########## @@ -85,6 +86,8 @@ struct noterpmsg_driver_s g_noterpmsg_driver = }, }; +static spinlock_t g_note_driver_lock = SP_UNLOCKED; Review Comment: move into noterpmsg_driver_s ########## include/nuttx/spinlock.h: ########## @@ -721,6 +725,7 @@ void spin_unlock_irqrestore_wo_note(FAR volatile spinlock_t *lock, } up_irq_restore(flags); + sched_unlock_wo_note(); Review Comment: rwlock need update too ########## include/nuttx/spinlock.h: ########## @@ -721,6 +725,7 @@ void spin_unlock_irqrestore_wo_note(FAR volatile spinlock_t *lock, } up_irq_restore(flags); + sched_unlock_wo_note(); } #else # define spin_unlock_irqrestore_wo_note(l, f) ((void)(l), up_irq_restore(f)) Review Comment: up case need lock/unlock sched lock too -- 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