diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /include/linux/rcutree.h | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (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.h | 70 |
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 | ||
33 | struct notifier_block; | 33 | extern void rcu_init(void); |
34 | |||
35 | extern void rcu_sched_qs(int cpu); | ||
36 | extern void rcu_bh_qs(int cpu); | ||
37 | extern void rcu_note_context_switch(int cpu); | 34 | extern void rcu_note_context_switch(int cpu); |
38 | extern int rcu_needs_cpu(int cpu); | 35 | extern int rcu_needs_cpu(int cpu); |
39 | 36 | extern void rcu_cpu_stall_reset(void); | |
40 | #ifdef CONFIG_TREE_PREEMPT_RCU | ||
41 | |||
42 | extern void __rcu_read_lock(void); | ||
43 | extern void __rcu_read_unlock(void); | ||
44 | extern void synchronize_rcu(void); | ||
45 | extern 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) | 43 | static inline void rcu_virt_note_context_switch(int cpu) |
52 | |||
53 | #else /* #ifdef CONFIG_TREE_PREEMPT_RCU */ | ||
54 | |||
55 | static inline void __rcu_read_lock(void) | ||
56 | { | 44 | { |
57 | preempt_disable(); | 45 | rcu_note_context_switch(cpu); |
58 | } | 46 | } |
59 | 47 | ||
60 | static 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 | 50 | extern void exit_rcu(void); |
66 | 51 | ||
67 | static inline void exit_rcu(void) | 52 | #else /* #ifdef CONFIG_TREE_PREEMPT_RCU */ |
68 | { | ||
69 | } | ||
70 | 53 | ||
71 | static inline int rcu_preempt_depth(void) | 54 | static 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 | ||
78 | static inline void __rcu_read_lock_bh(void) | ||
79 | { | ||
80 | local_bh_disable(); | ||
81 | } | ||
82 | static inline void __rcu_read_unlock_bh(void) | ||
83 | { | ||
84 | local_bh_enable(); | ||
85 | } | ||
86 | |||
87 | extern void call_rcu_sched(struct rcu_head *head, | ||
88 | void (*func)(struct rcu_head *rcu)); | ||
89 | extern void synchronize_rcu_bh(void); | 60 | extern void synchronize_rcu_bh(void); |
90 | extern void synchronize_sched(void); | 61 | extern void synchronize_sched_expedited(void); |
91 | extern void synchronize_rcu_expedited(void); | 62 | extern void synchronize_rcu_expedited(void); |
92 | 63 | ||
93 | static inline void synchronize_rcu_bh_expedited(void) | 64 | static 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 | ||
98 | extern void rcu_check_callbacks(int cpu, int user); | 69 | extern void rcu_barrier(void); |
99 | 70 | ||
71 | extern unsigned long rcutorture_testseq; | ||
72 | extern unsigned long rcutorture_vernum; | ||
100 | extern long rcu_batches_completed(void); | 73 | extern long rcu_batches_completed(void); |
101 | extern long rcu_batches_completed_bh(void); | 74 | extern long rcu_batches_completed_bh(void); |
102 | extern long rcu_batches_completed_sched(void); | 75 | extern long rcu_batches_completed_sched(void); |
76 | |||
103 | extern void rcu_force_quiescent_state(void); | 77 | extern void rcu_force_quiescent_state(void); |
104 | extern void rcu_bh_force_quiescent_state(void); | 78 | extern void rcu_bh_force_quiescent_state(void); |
105 | extern void rcu_sched_force_quiescent_state(void); | 79 | extern void rcu_sched_force_quiescent_state(void); |
106 | 80 | ||
107 | #ifdef CONFIG_NO_HZ | ||
108 | void rcu_enter_nohz(void); | ||
109 | void rcu_exit_nohz(void); | ||
110 | #else /* CONFIG_NO_HZ */ | ||
111 | static inline void rcu_enter_nohz(void) | ||
112 | { | ||
113 | } | ||
114 | static 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. */ |
120 | static inline int rcu_blocking_is_gp(void) | 82 | static inline int rcu_blocking_is_gp(void) |
121 | { | 83 | { |