|
|
Subscribe / Log in / New account

Spinlock naming resolved

Spinlock naming resolved

Posted Dec 17, 2009 22:40 UTC (Thu) by tglx (subscriber, #31301)
Parent article: Spinlock naming resolved

Just for clarification:

We renamed the architecture implementations from raw_spinlock to arch_spinlock. This freed the raw_spinlock name space for the "real" spinlocks.

So the new scheme is:

spinlock - the weakest one, which might sleep in RT

raw_spinlock - spinlock which always spins even on RT

arch_spinlock - the hardware level architecture dependent implementation

We have separate functions for all three types as well, which follow the same name space conventions. spin_*(), raw_spin_*() and arch_spin_*().

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(&spinlock) will result in a warning as well as spin_lock(&raw_spinlock). The warning in mainline is harmless as the data structures are identical, but on RT it's going to fatal.

Thanks,

tglx


to post comments


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds