LWN: Comments on "Spinlock naming resolved" https://lwn.net/Articles/365863/ This is a special feed containing comments posted to the individual LWN article titled "Spinlock naming resolved". en-us Fri, 31 Oct 2025 09:47:53 +0000 Fri, 31 Oct 2025 09:47:53 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net Spinlock naming resolved https://lwn.net/Articles/367219/ https://lwn.net/Articles/367219/ tglx <div class="FormattedComment"> Just for clarification:<br> <p> We renamed the architecture implementations from raw_spinlock to arch_spinlock. This freed the raw_spinlock name space for the "real" spinlocks.<br> <p> So the new scheme is:<br> <p> spinlock - the weakest one, which might sleep in RT<br> <p> raw_spinlock - spinlock which always spins even on RT<br> <p> arch_spinlock - the hardware level architecture dependent implementation<br> <p> We have separate functions for all three types as well, which follow the same name space conventions. spin_*(), raw_spin_*() and arch_spin_*().<br> <p> With PREEMPT_RT=n (which is current mainline) the spinlock functions map to raw_spinlock functions, but the name space is kept separate even at the variable type level. raw_spin_lock(&amp;spinlock) will result in a warning as well as spin_lock(&amp;raw_spinlock). The warning in mainline is harmless as the data structures are identical, but on RT it's going to fatal.<br> <p> Thanks,<br> <p> tglx<br> <p> </div> Thu, 17 Dec 2009 22:40:27 +0000 Spinlock naming resolved https://lwn.net/Articles/366113/ https://lwn.net/Articles/366113/ knobunc <div class="FormattedComment"> The name also has the implication of an extreme form of a spinlock. Like archenemy and enemy.<br> </div> Thu, 10 Dec 2009 19:27:59 +0000