TaiJuWu commented on code in PR #10605: URL: https://github.com/apache/nuttx/pull/10605#discussion_r1347583921
########## sched/semaphore/spinlock.c: ########## @@ -187,16 +225,36 @@ spinlock_t spin_trylock(FAR volatile spinlock_t *lock) * ****************************************************************************/ -spinlock_t spin_trylock_wo_note(FAR volatile spinlock_t *lock) +bool spin_trylock_wo_note(FAR volatile spinlock_t *lock) { - if (up_testset(lock) == SP_LOCKED) +#ifdef CONFIG_TICKET_SPINLOCK + uint16_t ticket = atomic_load(&lock->tickets.next); + + spinlock_t old = { - SP_DSB(); - return SP_LOCKED; + { Review Comment: @xiaoxiang781216 nxstyle seems not to consider this case. -- 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