Not logged in
Log in now
Create an account
Subscribe to LWN
LWN.net Weekly Edition for May 23, 2013
An "enum" for Python 3
An unexpected perf feature
LWN.net Weekly Edition for May 16, 2013
A look at the PyPy 2.0 release
The obvious name is raw_spinlock, as opposed to cooked_spinlock. There ie great UNIX tradition in this.
The obvious name ...
Posted Aug 6, 2009 9:28 UTC (Thu) by eliezert (subscriber, #35757)
Posted Aug 6, 2009 18:03 UTC (Thu) by cpeterso (guest, #305)
Posted Aug 10, 2009 14:44 UTC (Mon) by kjp (subscriber, #39639)
Of course, I do think it would be better to rename the spinlock itself if it no longer does that....
I guess to facilitate the changeover you could have atomic_lock or busywait_lock (spin is a bit redundant) and mutex, and only very old code would need a typdef for the now non existant 'spinlock' type.
Posted Aug 7, 2009 0:40 UTC (Fri) by Kamilion (subscriber, #42576)
And there's always the alarm-clock connotation, someone always manages to mash the snooze button.
Posted Aug 7, 2009 1:08 UTC (Fri) by martinfick (subscriber, #4455)
If I understand the naming dilemma, the problem is that the old spin_locks which will not be renamed are in fact becoming sleep locks. If your naming convention is adopted, you would have spin_locks which sleep, and snooze_locks which spin!
So, raw_spinlock or real_spinlock seem more appropriate to me.
Posted Aug 10, 2009 18:08 UTC (Mon) by kjp (subscriber, #39639)
Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds