ia64/xen-unstable

view patches/linux-2.6.16.13/rcu_needs_cpu.patch @ 11154:bb37d167c82e

[XEND] xc_save/xc_restore open the libxc interface independently
of their parent. This is required now that the interface fd is
marked for close-on-exec.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Tue Aug 15 19:04:43 2006 +0100 (2006-08-15)
parents c230dbe793d6
children
line source
1 --- ../pristine-linux-2.6.16.13/kernel/rcupdate.c 2006-05-02 22:38:44.000000000 +0100
2 +++ ./kernel/rcupdate.c 2006-06-09 20:27:45.000000000 +0100
3 @@ -485,6 +485,20 @@ int rcu_pending(int cpu)
4 __rcu_pending(&rcu_bh_ctrlblk, &per_cpu(rcu_bh_data, cpu));
5 }
7 +/*
8 + * Check to see if any future RCU-related work will need to be done
9 + * by the current CPU, even if none need be done immediately, returning
10 + * 1 if so. This function is part of the RCU implementation; it is -not-
11 + * an exported member of the RCU API.
12 + */
13 +int rcu_needs_cpu(int cpu)
14 +{
15 + struct rcu_data *rdp = &per_cpu(rcu_data, cpu);
16 + struct rcu_data *rdp_bh = &per_cpu(rcu_bh_data, cpu);
17 +
18 + return (!!rdp->curlist || !!rdp_bh->curlist || rcu_pending(cpu));
19 +}
20 +
21 void rcu_check_callbacks(int cpu, int user)
22 {
23 if (user ||
24 --- ../pristine-linux-2.6.16.13/include/linux/rcupdate.h 2006-05-02 22:38:44.000000000 +0100
25 +++ ./include/linux/rcupdate.h 2006-06-09 20:28:57.000000000 +0100
26 @@ -134,6 +134,7 @@ static inline void rcu_bh_qsctr_inc(int
27 }
29 extern int rcu_pending(int cpu);
30 +extern int rcu_needs_cpu(int cpu);
32 /**
33 * rcu_read_lock - mark the beginning of an RCU read-side critical section.