diff options
Diffstat (limited to 'include/linux/srcu.h')
-rw-r--r-- | include/linux/srcu.h | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/include/linux/srcu.h b/include/linux/srcu.h index c495b2d51569..e432cc92c73d 100644 --- a/include/linux/srcu.h +++ b/include/linux/srcu.h | |||
@@ -56,45 +56,11 @@ struct srcu_struct { }; | |||
56 | 56 | ||
57 | void call_srcu(struct srcu_struct *ssp, struct rcu_head *head, | 57 | void call_srcu(struct srcu_struct *ssp, struct rcu_head *head, |
58 | void (*func)(struct rcu_head *head)); | 58 | void (*func)(struct rcu_head *head)); |
59 | void _cleanup_srcu_struct(struct srcu_struct *ssp, bool quiesced); | 59 | void cleanup_srcu_struct(struct srcu_struct *ssp); |
60 | int __srcu_read_lock(struct srcu_struct *ssp) __acquires(ssp); | 60 | int __srcu_read_lock(struct srcu_struct *ssp) __acquires(ssp); |
61 | void __srcu_read_unlock(struct srcu_struct *ssp, int idx) __releases(ssp); | 61 | void __srcu_read_unlock(struct srcu_struct *ssp, int idx) __releases(ssp); |
62 | void synchronize_srcu(struct srcu_struct *ssp); | 62 | void synchronize_srcu(struct srcu_struct *ssp); |
63 | 63 | ||
64 | /** | ||
65 | * cleanup_srcu_struct - deconstruct a sleep-RCU structure | ||
66 | * @ssp: structure to clean up. | ||
67 | * | ||
68 | * Must invoke this after you are finished using a given srcu_struct that | ||
69 | * was initialized via init_srcu_struct(), else you leak memory. | ||
70 | */ | ||
71 | static inline void cleanup_srcu_struct(struct srcu_struct *ssp) | ||
72 | { | ||
73 | _cleanup_srcu_struct(ssp, false); | ||
74 | } | ||
75 | |||
76 | /** | ||
77 | * cleanup_srcu_struct_quiesced - deconstruct a quiesced sleep-RCU structure | ||
78 | * @ssp: structure to clean up. | ||
79 | * | ||
80 | * Must invoke this after you are finished using a given srcu_struct that | ||
81 | * was initialized via init_srcu_struct(), else you leak memory. Also, | ||
82 | * all grace-period processing must have completed. | ||
83 | * | ||
84 | * "Completed" means that the last synchronize_srcu() and | ||
85 | * synchronize_srcu_expedited() calls must have returned before the call | ||
86 | * to cleanup_srcu_struct_quiesced(). It also means that the callback | ||
87 | * from the last call_srcu() must have been invoked before the call to | ||
88 | * cleanup_srcu_struct_quiesced(), but you can use srcu_barrier() to help | ||
89 | * with this last. Violating these rules will get you a WARN_ON() splat | ||
90 | * (with high probability, anyway), and will also cause the srcu_struct | ||
91 | * to be leaked. | ||
92 | */ | ||
93 | static inline void cleanup_srcu_struct_quiesced(struct srcu_struct *ssp) | ||
94 | { | ||
95 | _cleanup_srcu_struct(ssp, true); | ||
96 | } | ||
97 | |||
98 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 64 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
99 | 65 | ||
100 | /** | 66 | /** |