ia64/xen-unstable

view patches/linux-2.6.16.29/rcu_needs_cpu.patch @ 11540:041be3f6b38e

[linux patches] Update patches for linux-2.6.16.29.

Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
author Christian Limpach <Christian.Limpach@xensource.com>
date Tue Sep 19 14:26:47 2006 +0100 (2006-09-19)
parents patches/linux-2.6.16.13/rcu_needs_cpu.patch@c230dbe793d6
children
line source
1 diff -pruN ../orig-linux-2.6.16.29/include/linux/rcupdate.h ./include/linux/rcupdate.h
2 --- ../orig-linux-2.6.16.29/include/linux/rcupdate.h 2006-09-12 19:02:10.000000000 +0100
3 +++ ./include/linux/rcupdate.h 2006-09-19 14:05:39.000000000 +0100
4 @@ -134,6 +134,7 @@ static inline void rcu_bh_qsctr_inc(int
5 }
7 extern int rcu_pending(int cpu);
8 +extern int rcu_needs_cpu(int cpu);
10 /**
11 * rcu_read_lock - mark the beginning of an RCU read-side critical section.
12 diff -pruN ../orig-linux-2.6.16.29/kernel/rcupdate.c ./kernel/rcupdate.c
13 --- ../orig-linux-2.6.16.29/kernel/rcupdate.c 2006-09-12 19:02:10.000000000 +0100
14 +++ ./kernel/rcupdate.c 2006-09-19 14:05:39.000000000 +0100
15 @@ -485,6 +485,20 @@ int rcu_pending(int cpu)
16 __rcu_pending(&rcu_bh_ctrlblk, &per_cpu(rcu_bh_data, cpu));
17 }
19 +/*
20 + * Check to see if any future RCU-related work will need to be done
21 + * by the current CPU, even if none need be done immediately, returning
22 + * 1 if so. This function is part of the RCU implementation; it is -not-
23 + * an exported member of the RCU API.
24 + */
25 +int rcu_needs_cpu(int cpu)
26 +{
27 + struct rcu_data *rdp = &per_cpu(rcu_data, cpu);
28 + struct rcu_data *rdp_bh = &per_cpu(rcu_bh_data, cpu);
29 +
30 + return (!!rdp->curlist || !!rdp_bh->curlist || rcu_pending(cpu));
31 +}
32 +
33 void rcu_check_callbacks(int cpu, int user)
34 {
35 if (user ||