Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d1ab824be43842ae7429ab1df37153e1cebb4d32
Commit:     d1ab824be43842ae7429ab1df37153e1cebb4d32
Parent:     b5e618181a927210f8be1d3d2249d31904ba358d
Author:     Michael Ellerman <[EMAIL PROTECTED]>
AuthorDate: Tue May 8 00:30:22 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue May 8 11:15:11 2007 -0700

    Document SPIN_LOCK_UNLOCKED/RW_LOCK_UNLOCKED deprecation
    
    Apparently it's not cool anymore to use SPIN/RW_LOCK_UNLOCKED.  There's
    some mention of this in Documentation/spinlocks.txt, but that only talks
    about dynamic initialisation.
    
    A comment in the code mentioning the preferred usage would be good IMHO.
    
    [EMAIL PROTECTED]: add reason for deprecation]
    Signed-off-by: Michael Ellerman <[EMAIL PROTECTED]>
    Acked-by: Ingo Molnar <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 include/linux/spinlock_types.h |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/include/linux/spinlock_types.h b/include/linux/spinlock_types.h
index dc5fb69..210549b 100644
--- a/include/linux/spinlock_types.h
+++ b/include/linux/spinlock_types.h
@@ -85,6 +85,12 @@ typedef struct {
                                RW_DEP_MAP_INIT(lockname) }
 #endif
 
+/*
+ * SPIN_LOCK_UNLOCKED and RW_LOCK_UNLOCKED defeat lockdep state tracking and
+ * are hence deprecated.
+ * Please use DEFINE_SPINLOCK()/DEFINE_RWLOCK() or
+ * __SPIN_LOCK_UNLOCKED()/__RW_LOCK_UNLOCKED() as appropriate.
+ */
 #define SPIN_LOCK_UNLOCKED     __SPIN_LOCK_UNLOCKED(old_style_spin_init)
 #define RW_LOCK_UNLOCKED       __RW_LOCK_UNLOCKED(old_style_rw_init)
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to