diff options
author | Boqun Feng <boqun.feng@gmail.com> | 2015-07-29 01:29:38 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2015-10-06 14:08:05 -0400 |
commit | b6a4ae766e3133a4db73fabc81e522d1601cb623 (patch) | |
tree | 24f5e9c33b0f89e7e2addd66e32d0e1ca3d16efa /include | |
parent | 84778472e1b6a27a8931712c40e8cf31143c8f6c (diff) |
rcu: Use rcu_callback_t in call_rcu*() and friends
As we now have rcu_callback_t typedefs as the type of rcu callbacks, we
should use it in call_rcu*() and friends as the type of parameters. This
could save us a few lines of code and make it clear which function
requires an rcu callbacks rather than other callbacks as its argument.
Besides, this can also help cscope to generate a better database for
code reading.
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/rcupdate.h | 10 | ||||
-rw-r--r-- | include/linux/rcutiny.h | 2 | ||||
-rw-r--r-- | include/linux/rcutree.h | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 581abf848566..d63bb77dab35 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
@@ -160,7 +160,7 @@ void do_trace_rcu_torture_read(const char *rcutorturename, | |||
160 | * more than one CPU). | 160 | * more than one CPU). |
161 | */ | 161 | */ |
162 | void call_rcu(struct rcu_head *head, | 162 | void call_rcu(struct rcu_head *head, |
163 | void (*func)(struct rcu_head *head)); | 163 | rcu_callback_t func); |
164 | 164 | ||
165 | #else /* #ifdef CONFIG_PREEMPT_RCU */ | 165 | #else /* #ifdef CONFIG_PREEMPT_RCU */ |
166 | 166 | ||
@@ -191,7 +191,7 @@ void call_rcu(struct rcu_head *head, | |||
191 | * memory ordering guarantees. | 191 | * memory ordering guarantees. |
192 | */ | 192 | */ |
193 | void call_rcu_bh(struct rcu_head *head, | 193 | void call_rcu_bh(struct rcu_head *head, |
194 | void (*func)(struct rcu_head *head)); | 194 | rcu_callback_t func); |
195 | 195 | ||
196 | /** | 196 | /** |
197 | * call_rcu_sched() - Queue an RCU for invocation after sched grace period. | 197 | * call_rcu_sched() - Queue an RCU for invocation after sched grace period. |
@@ -213,7 +213,7 @@ void call_rcu_bh(struct rcu_head *head, | |||
213 | * memory ordering guarantees. | 213 | * memory ordering guarantees. |
214 | */ | 214 | */ |
215 | void call_rcu_sched(struct rcu_head *head, | 215 | void call_rcu_sched(struct rcu_head *head, |
216 | void (*func)(struct rcu_head *rcu)); | 216 | rcu_callback_t func); |
217 | 217 | ||
218 | void synchronize_sched(void); | 218 | void synchronize_sched(void); |
219 | 219 | ||
@@ -274,7 +274,7 @@ do { \ | |||
274 | * See the description of call_rcu() for more detailed information on | 274 | * See the description of call_rcu() for more detailed information on |
275 | * memory ordering guarantees. | 275 | * memory ordering guarantees. |
276 | */ | 276 | */ |
277 | void call_rcu_tasks(struct rcu_head *head, void (*func)(struct rcu_head *head)); | 277 | void call_rcu_tasks(struct rcu_head *head, rcu_callback_t func); |
278 | void synchronize_rcu_tasks(void); | 278 | void synchronize_rcu_tasks(void); |
279 | void rcu_barrier_tasks(void); | 279 | void rcu_barrier_tasks(void); |
280 | 280 | ||
@@ -1065,7 +1065,7 @@ static inline notrace void rcu_read_unlock_sched_notrace(void) | |||
1065 | #define __kfree_rcu(head, offset) \ | 1065 | #define __kfree_rcu(head, offset) \ |
1066 | do { \ | 1066 | do { \ |
1067 | BUILD_BUG_ON(!__is_kfree_rcu_offset(offset)); \ | 1067 | BUILD_BUG_ON(!__is_kfree_rcu_offset(offset)); \ |
1068 | kfree_call_rcu(head, (void (*)(struct rcu_head *))(unsigned long)(offset)); \ | 1068 | kfree_call_rcu(head, (rcu_callback_t)(unsigned long)(offset)); \ |
1069 | } while (0) | 1069 | } while (0) |
1070 | 1070 | ||
1071 | /** | 1071 | /** |
diff --git a/include/linux/rcutiny.h b/include/linux/rcutiny.h index ff968b7af3a4..c8a0722f77ea 100644 --- a/include/linux/rcutiny.h +++ b/include/linux/rcutiny.h | |||
@@ -83,7 +83,7 @@ static inline void synchronize_sched_expedited(void) | |||
83 | } | 83 | } |
84 | 84 | ||
85 | static inline void kfree_call_rcu(struct rcu_head *head, | 85 | static inline void kfree_call_rcu(struct rcu_head *head, |
86 | void (*func)(struct rcu_head *rcu)) | 86 | rcu_callback_t func) |
87 | { | 87 | { |
88 | call_rcu(head, func); | 88 | call_rcu(head, func); |
89 | } | 89 | } |
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h index 5abec82f325e..60d15a080d7c 100644 --- a/include/linux/rcutree.h +++ b/include/linux/rcutree.h | |||
@@ -48,7 +48,7 @@ void synchronize_rcu_bh(void); | |||
48 | void synchronize_sched_expedited(void); | 48 | void synchronize_sched_expedited(void); |
49 | void synchronize_rcu_expedited(void); | 49 | void synchronize_rcu_expedited(void); |
50 | 50 | ||
51 | void kfree_call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *rcu)); | 51 | void kfree_call_rcu(struct rcu_head *head, rcu_callback_t func); |
52 | 52 | ||
53 | /** | 53 | /** |
54 | * synchronize_rcu_bh_expedited - Brute-force RCU-bh grace period | 54 | * synchronize_rcu_bh_expedited - Brute-force RCU-bh grace period |