aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/rcutree.h
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
commitc71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch)
treeecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /include/linux/rcutree.h
parentea53c912f8a86a8567697115b6a0d8152beee5c8 (diff)
parent6a00f206debf8a5c8899055726ad127dbeeed098 (diff)
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts: litmus/sched_cedf.c
Diffstat (limited to 'include/linux/rcutree.h')
-rw-r--r--include/linux/rcutree.h70
1 files changed, 16 insertions, 54 deletions
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h
index c0ed1c056f29..e65d06634dd8 100644
--- a/include/linux/rcutree.h
+++ b/include/linux/rcutree.h
@@ -30,64 +30,35 @@
30#ifndef __LINUX_RCUTREE_H 30#ifndef __LINUX_RCUTREE_H
31#define __LINUX_RCUTREE_H 31#define __LINUX_RCUTREE_H
32 32
33struct notifier_block; 33extern void rcu_init(void);
34
35extern void rcu_sched_qs(int cpu);
36extern void rcu_bh_qs(int cpu);
37extern void rcu_note_context_switch(int cpu); 34extern void rcu_note_context_switch(int cpu);
38extern int rcu_needs_cpu(int cpu); 35extern int rcu_needs_cpu(int cpu);
39 36extern void rcu_cpu_stall_reset(void);
40#ifdef CONFIG_TREE_PREEMPT_RCU
41
42extern void __rcu_read_lock(void);
43extern void __rcu_read_unlock(void);
44extern void synchronize_rcu(void);
45extern void exit_rcu(void);
46 37
47/* 38/*
48 * Defined as macro as it is a very low level header 39 * Note a virtualization-based context switch. This is simply a
49 * included from areas that don't even know about current 40 * wrapper around rcu_note_context_switch(), which allows TINY_RCU
41 * to save a few bytes.
50 */ 42 */
51#define rcu_preempt_depth() (current->rcu_read_lock_nesting) 43static inline void rcu_virt_note_context_switch(int cpu)
52
53#else /* #ifdef CONFIG_TREE_PREEMPT_RCU */
54
55static inline void __rcu_read_lock(void)
56{ 44{
57 preempt_disable(); 45 rcu_note_context_switch(cpu);
58} 46}
59 47
60static inline void __rcu_read_unlock(void) 48#ifdef CONFIG_TREE_PREEMPT_RCU
61{
62 preempt_enable();
63}
64 49
65#define synchronize_rcu synchronize_sched 50extern void exit_rcu(void);
66 51
67static inline void exit_rcu(void) 52#else /* #ifdef CONFIG_TREE_PREEMPT_RCU */
68{
69}
70 53
71static inline int rcu_preempt_depth(void) 54static inline void exit_rcu(void)
72{ 55{
73 return 0;
74} 56}
75 57
76#endif /* #else #ifdef CONFIG_TREE_PREEMPT_RCU */ 58#endif /* #else #ifdef CONFIG_TREE_PREEMPT_RCU */
77 59
78static inline void __rcu_read_lock_bh(void)
79{
80 local_bh_disable();
81}
82static inline void __rcu_read_unlock_bh(void)
83{
84 local_bh_enable();
85}
86
87extern void call_rcu_sched(struct rcu_head *head,
88 void (*func)(struct rcu_head *rcu));
89extern void synchronize_rcu_bh(void); 60extern void synchronize_rcu_bh(void);
90extern void synchronize_sched(void); 61extern void synchronize_sched_expedited(void);
91extern void synchronize_rcu_expedited(void); 62extern void synchronize_rcu_expedited(void);
92 63
93static inline void synchronize_rcu_bh_expedited(void) 64static inline void synchronize_rcu_bh_expedited(void)
@@ -95,27 +66,18 @@ static inline void synchronize_rcu_bh_expedited(void)
95 synchronize_sched_expedited(); 66 synchronize_sched_expedited();
96} 67}
97 68
98extern void rcu_check_callbacks(int cpu, int user); 69extern void rcu_barrier(void);
99 70
71extern unsigned long rcutorture_testseq;
72extern unsigned long rcutorture_vernum;
100extern long rcu_batches_completed(void); 73extern long rcu_batches_completed(void);
101extern long rcu_batches_completed_bh(void); 74extern long rcu_batches_completed_bh(void);
102extern long rcu_batches_completed_sched(void); 75extern long rcu_batches_completed_sched(void);
76
103extern void rcu_force_quiescent_state(void); 77extern void rcu_force_quiescent_state(void);
104extern void rcu_bh_force_quiescent_state(void); 78extern void rcu_bh_force_quiescent_state(void);
105extern void rcu_sched_force_quiescent_state(void); 79extern void rcu_sched_force_quiescent_state(void);
106 80
107#ifdef CONFIG_NO_HZ
108void rcu_enter_nohz(void);
109void rcu_exit_nohz(void);
110#else /* CONFIG_NO_HZ */
111static inline void rcu_enter_nohz(void)
112{
113}
114static inline void rcu_exit_nohz(void)
115{
116}
117#endif /* CONFIG_NO_HZ */
118
119/* A context switch is a grace period for RCU-sched and RCU-bh. */ 81/* A context switch is a grace period for RCU-sched and RCU-bh. */
120static inline int rcu_blocking_is_gp(void) 82static inline int rcu_blocking_is_gp(void)
121{ 83{