anchao commented on PR #15705: URL: https://github.com/apache/nuttx/pull/15705#issuecomment-2635565273
> boot time is a very short phase in the whole life cycle. If you really want to squeeze the performance(I doubt), you can still call spin_lock_irqsave_preempt. > > The major debate between us is whether the short api(spin_lock, spin_lock_irqsave) should hold the sched lock. My prefer is that the default form should be safe and useable in the most case, and the adavanced but dangerous api should give a long name and use carefully. My point is that the API naming and implementation content should be as consistent as possible, rather than including the operation of `sched_lock` in `spin_lock_irqsave` > This case already demo that you agree that holding spinlock alone without either sched_lock or irq_disable isn't safe and should be avoid as much as possible. But it can obviously improve performance -- 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