aboutsummaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2004-10-27 18:33:04 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-10-27 18:33:04 -0700
commitc83ff1d2b7be6651f369b3687f88f3cf9236b4f6 (patch)
tree16c45d8d0e77ccafdb04acc450af91200ac3ab15 /ipc
parent41b873ffb13f241b7b046dfff5f03df172458595 (diff)
downloadhistory-c83ff1d2b7be6651f369b3687f88f3cf9236b4f6.tar.gz
[PATCH] Lock initializer unifying (Core)
To make spinlock/rwlock initialization consistent all over the kernel, this patch converts explicit lock-initializers into spin_lock_init() and rwlock_init() calls. Currently, spinlocks and rwlocks are initialized in two different ways: lock = SPIN_LOCK_UNLOCKED spin_lock_init(&lock) rwlock = RW_LOCK_UNLOCKED rwlock_init(&rwlock) this patch converts all explicit lock initializations to spin_lock_init() or rwlock_init(). (Besides consistency this also helps automatic lock validators and debugging code.) The conversion was done with a script, it was verified manually and it was reviewed, compiled and tested as far as possible on x86, ARM, PPC. There is no runtime overhead or actual code change resulting out of this patch, because spin_lock_init() and rwlock_init() are macros and are thus equivalent to the explicit initialization method. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'ipc')
-rw-r--r--ipc/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ipc/util.c b/ipc/util.c
index 62be4a26fe882a..e00c35f7b2b805 100644
--- a/ipc/util.c
+++ b/ipc/util.c
@@ -193,7 +193,7 @@ found:
if(ids->seq > ids->seq_max)
ids->seq = 0;
- new->lock = SPIN_LOCK_UNLOCKED;
+ spin_lock_init(&new->lock);
new->deleted = 0;
rcu_read_lock();
spin_lock(&new->lock);