1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _LINUX_SCHED_RCUPDATE_WAIT_H
3 #define _LINUX_SCHED_RCUPDATE_WAIT_H
6 * RCU synchronization types and methods:
9 #include <linux/rcupdate.h>
10 #include <linux/completion.h>
13 * Structure allowing asynchronous waiting on RCU.
15 struct rcu_synchronize {
17 struct completion completion;
19 void wakeme_after_rcu(struct rcu_head *head);
21 void __wait_rcu_gp(bool checktiny, int n, call_rcu_func_t *crcu_array,
22 struct rcu_synchronize *rs_array);
24 #define _wait_rcu_gp(checktiny, ...) \
26 call_rcu_func_t __crcu_array[] = { __VA_ARGS__ }; \
27 struct rcu_synchronize __rs_array[ARRAY_SIZE(__crcu_array)]; \
28 __wait_rcu_gp(checktiny, ARRAY_SIZE(__crcu_array), \
29 __crcu_array, __rs_array); \
32 #define wait_rcu_gp(...) _wait_rcu_gp(false, __VA_ARGS__)
34 #endif /* _LINUX_SCHED_RCUPDATE_WAIT_H */