aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/rcupdate.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/rcupdate.h')
-rw-r--r--include/linux/rcupdate.h28
1 files changed, 13 insertions, 15 deletions
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index 6fe0363724e9..24440f4bf476 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -52,11 +52,6 @@ struct rcu_head {
52}; 52};
53 53
54/* Exported common interfaces */ 54/* Exported common interfaces */
55#ifdef CONFIG_TREE_PREEMPT_RCU
56extern void synchronize_rcu(void);
57#else /* #ifdef CONFIG_TREE_PREEMPT_RCU */
58#define synchronize_rcu synchronize_sched
59#endif /* #else #ifdef CONFIG_TREE_PREEMPT_RCU */
60extern void synchronize_rcu_bh(void); 55extern void synchronize_rcu_bh(void);
61extern void synchronize_sched(void); 56extern void synchronize_sched(void);
62extern void rcu_barrier(void); 57extern void rcu_barrier(void);
@@ -67,17 +62,16 @@ extern int sched_expedited_torture_stats(char *page);
67 62
68/* Internal to kernel */ 63/* Internal to kernel */
69extern void rcu_init(void); 64extern void rcu_init(void);
70extern void rcu_scheduler_starting(void);
71extern int rcu_needs_cpu(int cpu);
72extern int rcu_scheduler_active;
73 65
74#if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU) 66#if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU)
75#include <linux/rcutree.h> 67#include <linux/rcutree.h>
68#elif defined(CONFIG_TINY_RCU)
69#include <linux/rcutiny.h>
76#else 70#else
77#error "Unknown RCU implementation specified to kernel configuration" 71#error "Unknown RCU implementation specified to kernel configuration"
78#endif 72#endif
79 73
80#define RCU_HEAD_INIT { .next = NULL, .func = NULL } 74#define RCU_HEAD_INIT { .next = NULL, .func = NULL }
81#define RCU_HEAD(head) struct rcu_head head = RCU_HEAD_INIT 75#define RCU_HEAD(head) struct rcu_head head = RCU_HEAD_INIT
82#define INIT_RCU_HEAD(ptr) do { \ 76#define INIT_RCU_HEAD(ptr) do { \
83 (ptr)->next = NULL; (ptr)->func = NULL; \ 77 (ptr)->next = NULL; (ptr)->func = NULL; \
@@ -129,12 +123,6 @@ static inline void rcu_read_lock(void)
129 rcu_read_acquire(); 123 rcu_read_acquire();
130} 124}
131 125
132/**
133 * rcu_read_unlock - marks the end of an RCU read-side critical section.
134 *
135 * See rcu_read_lock() for more information.
136 */
137
138/* 126/*
139 * So where is rcu_write_lock()? It does not exist, as there is no 127 * So where is rcu_write_lock()? It does not exist, as there is no
140 * way for writers to lock out RCU readers. This is a feature, not 128 * way for writers to lock out RCU readers. This is a feature, not
@@ -144,6 +132,12 @@ static inline void rcu_read_lock(void)
144 * used as well. RCU does not care how the writers keep out of each 132 * used as well. RCU does not care how the writers keep out of each
145 * others' way, as long as they do so. 133 * others' way, as long as they do so.
146 */ 134 */
135
136/**
137 * rcu_read_unlock - marks the end of an RCU read-side critical section.
138 *
139 * See rcu_read_lock() for more information.
140 */
147static inline void rcu_read_unlock(void) 141static inline void rcu_read_unlock(void)
148{ 142{
149 rcu_read_release(); 143 rcu_read_release();
@@ -196,6 +190,8 @@ static inline void rcu_read_lock_sched(void)
196 __acquire(RCU_SCHED); 190 __acquire(RCU_SCHED);
197 rcu_read_acquire(); 191 rcu_read_acquire();
198} 192}
193
194/* Used by lockdep and tracing: cannot be traced, cannot call lockdep. */
199static inline notrace void rcu_read_lock_sched_notrace(void) 195static inline notrace void rcu_read_lock_sched_notrace(void)
200{ 196{
201 preempt_disable_notrace(); 197 preempt_disable_notrace();
@@ -213,6 +209,8 @@ static inline void rcu_read_unlock_sched(void)
213 __release(RCU_SCHED); 209 __release(RCU_SCHED);
214 preempt_enable(); 210 preempt_enable();
215} 211}
212
213/* Used by lockdep and tracing: cannot be traced, cannot call lockdep. */
216static inline notrace void rcu_read_unlock_sched_notrace(void) 214static inline notrace void rcu_read_unlock_sched_notrace(void)
217{ 215{
218 __release(RCU_SCHED); 216 __release(RCU_SCHED);