X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=Documentation%2Fspinlocks.txt;h=a661d684768e99c2cb9737b1e5f85925554f9235;hb=9c4e20bc1a413e879285ee78f3ffc713062bf0cd;hp=c6e24f82d34e6517781e67d721d342fbd0c483b9;hpb=daddc0d38b3571bed170afa273a49a0eba090c1e;p=linux-2.6.git diff --git a/Documentation/spinlocks.txt b/Documentation/spinlocks.txt index c6e24f82d..a661d6847 100644 --- a/Documentation/spinlocks.txt +++ b/Documentation/spinlocks.txt @@ -1,3 +1,29 @@ +UPDATE March 21 2005 Amit Gud + +Macros SPIN_LOCK_UNLOCKED and RW_LOCK_UNLOCKED are deprecated and will be +removed soon. So for any new code dynamic initialization should be used: + + spinlock_t xxx_lock; + rwlock_t xxx_rw_lock; + + static int __init xxx_init(void) + { + spin_lock_init(&xxx_lock); + rwlock_init(&xxx_rw_lock); + ... + } + + module_init(xxx_init); + +Reasons for deprecation + - it hurts automatic lock validators + - it becomes intrusive for the realtime preemption patches + +Following discussion is still valid, however, with the dynamic initialization +of spinlocks instead of static. + +----------------------- + On Fri, 2 Jan 1998, Doug Ledford wrote: > > I'm working on making the aic7xxx driver more SMP friendly (as well as