aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/spinlocks.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/spinlocks.txt')
-rw-r--r--Documentation/spinlocks.txt20
1 files changed, 11 insertions, 9 deletions
diff --git a/Documentation/spinlocks.txt b/Documentation/spinlocks.txt
index a661d684768e..471e75389778 100644
--- a/Documentation/spinlocks.txt
+++ b/Documentation/spinlocks.txt
@@ -1,7 +1,12 @@
1UPDATE March 21 2005 Amit Gud <gud@eth.net> 1SPIN_LOCK_UNLOCKED and RW_LOCK_UNLOCKED defeat lockdep state tracking and
2are hence deprecated.
2 3
3Macros SPIN_LOCK_UNLOCKED and RW_LOCK_UNLOCKED are deprecated and will be 4Please use DEFINE_SPINLOCK()/DEFINE_RWLOCK() or
4removed soon. So for any new code dynamic initialization should be used: 5__SPIN_LOCK_UNLOCKED()/__RW_LOCK_UNLOCKED() as appropriate for static
6initialization.
7
8Dynamic initialization, when necessary, may be performed as
9demonstrated below.
5 10
6 spinlock_t xxx_lock; 11 spinlock_t xxx_lock;
7 rwlock_t xxx_rw_lock; 12 rwlock_t xxx_rw_lock;
@@ -15,12 +20,9 @@ removed soon. So for any new code dynamic initialization should be used:
15 20
16 module_init(xxx_init); 21 module_init(xxx_init);
17 22
18Reasons for deprecation 23The following discussion is still valid, however, with the dynamic
19 - it hurts automatic lock validators 24initialization of spinlocks or with DEFINE_SPINLOCK, etc., used
20 - it becomes intrusive for the realtime preemption patches 25instead of SPIN_LOCK_UNLOCKED.
21
22Following discussion is still valid, however, with the dynamic initialization
23of spinlocks instead of static.
24 26
25----------------------- 27-----------------------
26 28