mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Document SPIN_LOCK_UNLOCKED/RW_LOCK_UNLOCKED deprecation
@ 2007-04-18  1:40 Michael Ellerman
  2007-04-18  6:13 ` Ingo Molnar
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Ellerman @ 2007-04-18  1:40 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, gud, mingo, arjan, milindchoudhary

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.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---

 include/linux/spinlock_types.h |    5 +++++
 1 file changed, 5 insertions(+)

Index: powerpc/include/linux/spinlock_types.h
===================================================================
--- powerpc.orig/include/linux/spinlock_types.h
+++ powerpc/include/linux/spinlock_types.h
@@ -85,6 +85,11 @@ typedef struct {
 				RW_DEP_MAP_INIT(lockname) }
 #endif
 
+/*
+ * SPIN_LOCK_UNLOCKED and RW_LOCK_UNLOCKED are 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)
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-04-18  6:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-18  1:40 [PATCH] Document SPIN_LOCK_UNLOCKED/RW_LOCK_UNLOCKED deprecation Michael Ellerman
2007-04-18  6:13 ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome