aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rcupdate.c
diff options
context:
space:
mode:
authorNick Piggin <nickpiggin@yahoo.com.au>2006-01-08 04:02:19 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-08 23:13:48 -0500
commit095975da26dba21698582e91e96be10f7417333f (patch)
treece1ffac556d394ef56a18faa97d38f79b07f31e2 /kernel/rcupdate.c
parenta57004e1afb6ee03c509f1b1ec74a000682ab93b (diff)
[PATCH] rcu file: use atomic primitives
Use atomic_inc_not_zero for rcu files instead of special case rcuref. Signed-off-by: Nick Piggin <npiggin@suse.de> Cc: "Paul E. McKenney" <paulmck@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/rcupdate.c')
-rw-r--r--kernel/rcupdate.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/kernel/rcupdate.c b/kernel/rcupdate.c
index 0a669bd2f6d1..30b0bba03859 100644
--- a/kernel/rcupdate.c
+++ b/kernel/rcupdate.c
@@ -46,7 +46,6 @@
46#include <linux/percpu.h> 46#include <linux/percpu.h>
47#include <linux/notifier.h> 47#include <linux/notifier.h>
48#include <linux/rcupdate.h> 48#include <linux/rcupdate.h>
49#include <linux/rcuref.h>
50#include <linux/cpu.h> 49#include <linux/cpu.h>
51 50
52/* Definition for rcupdate control block. */ 51/* Definition for rcupdate control block. */
@@ -74,19 +73,6 @@ DEFINE_PER_CPU(struct rcu_data, rcu_bh_data) = { 0L };
74static DEFINE_PER_CPU(struct tasklet_struct, rcu_tasklet) = {NULL}; 73static DEFINE_PER_CPU(struct tasklet_struct, rcu_tasklet) = {NULL};
75static int maxbatch = 10000; 74static int maxbatch = 10000;
76 75
77#ifndef __HAVE_ARCH_CMPXCHG
78/*
79 * We use an array of spinlocks for the rcurefs -- similar to ones in sparc
80 * 32 bit atomic_t implementations, and a hash function similar to that
81 * for our refcounting needs.
82 * Can't help multiprocessors which donot have cmpxchg :(
83 */
84
85spinlock_t __rcuref_hash[RCUREF_HASH_SIZE] = {
86 [0 ... (RCUREF_HASH_SIZE-1)] = SPIN_LOCK_UNLOCKED
87};
88#endif
89
90/** 76/**
91 * call_rcu - Queue an RCU callback for invocation after a grace period. 77 * call_rcu - Queue an RCU callback for invocation after a grace period.
92 * @head: structure to be used for queueing the RCU updates. 78 * @head: structure to be used for queueing the RCU updates.