Commit | Line | Data |
---|---|---|
5e77fc1f | 1 | /* |
4477a870 | 2 | * urcu/map/urcu-bp.h |
5e77fc1f PM |
3 | * |
4 | * Userspace RCU header -- name mapping to allow multiple flavors to be | |
5 | * used in the same executable. | |
6 | * | |
7 | * Copyright (c) 2009 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | |
8 | * Copyright (c) 2009 Paul E. McKenney, IBM Corporation. | |
9 | * | |
10 | * LGPL-compatible code should include this header with : | |
11 | * | |
12 | * #define _LGPL_SOURCE | |
13 | * #include <urcu.h> | |
14 | * | |
15 | * This library is free software; you can redistribute it and/or | |
16 | * modify it under the terms of the GNU Lesser General Public | |
17 | * License as published by the Free Software Foundation; either | |
18 | * version 2.1 of the License, or (at your option) any later version. | |
19 | * | |
20 | * This library is distributed in the hope that it will be useful, | |
21 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
22 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
23 | * Lesser General Public License for more details. | |
24 | * | |
25 | * You should have received a copy of the GNU Lesser General Public | |
26 | * License along with this library; if not, write to the Free Software | |
27 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
28 | * | |
29 | * IBM's contributions to this file may be relicensed under LGPLv2 or later. | |
30 | */ | |
31 | ||
32 | /* Mapping macros to allow multiple flavors in a single binary. */ | |
33 | ||
4477a870 MD |
34 | #define rcu_read_lock urcu_bp_read_lock |
35 | #define _rcu_read_lock _urcu_bp_read_lock | |
36 | #define rcu_read_unlock urcu_bp_read_unlock | |
37 | #define _rcu_read_unlock _urcu_bp_read_unlock | |
38 | #define rcu_read_ongoing urcu_bp_read_ongoing | |
39 | #define _rcu_read_ongoing _urcu_bp_read_ongoing | |
40 | #define rcu_quiescent_state urcu_bp_quiescent_state | |
41 | #define _rcu_quiescent_state _urcu_bp_quiescent_state | |
42 | #define rcu_thread_offline urcu_bp_thread_offline | |
43 | #define rcu_thread_online urcu_bp_thread_online | |
44 | #define rcu_register_thread urcu_bp_register_thread | |
45 | #define rcu_unregister_thread urcu_bp_unregister_thread | |
46 | #define rcu_init urcu_bp_init | |
47 | #define rcu_exit urcu_bp_exit | |
48 | #define synchronize_rcu urcu_bp_synchronize_rcu | |
49 | #define rcu_reader urcu_bp_reader | |
50 | #define rcu_gp urcu_bp_gp | |
5e77fc1f | 51 | |
4477a870 MD |
52 | #define get_cpu_call_rcu_data urcu_bp_get_cpu_call_rcu_data |
53 | #define get_call_rcu_thread urcu_bp_get_call_rcu_thread | |
54 | #define create_call_rcu_data urcu_bp_create_call_rcu_data | |
55 | #define set_cpu_call_rcu_data urcu_bp_set_cpu_call_rcu_data | |
56 | #define get_default_call_rcu_data urcu_bp_get_default_call_rcu_data | |
57 | #define get_call_rcu_data urcu_bp_get_call_rcu_data | |
58 | #define get_thread_call_rcu_data urcu_bp_get_thread_call_rcu_data | |
59 | #define set_thread_call_rcu_data urcu_bp_set_thread_call_rcu_data | |
60 | #define create_all_cpu_call_rcu_data urcu_bp_create_all_cpu_call_rcu_data | |
61 | #define free_all_cpu_call_rcu_data urcu_bp_free_all_cpu_call_rcu_data | |
62 | #define call_rcu urcu_bp_call_rcu | |
63 | #define call_rcu_data_free urcu_bp_call_rcu_data_free | |
64 | #define call_rcu_before_fork urcu_bp_call_rcu_before_fork | |
65 | #define call_rcu_after_fork_parent urcu_bp_call_rcu_after_fork_parent | |
66 | #define call_rcu_after_fork_child urcu_bp_call_rcu_after_fork_child | |
67 | #define rcu_barrier urcu_bp_barrier | |
5e77fc1f | 68 | |
4477a870 MD |
69 | #define defer_rcu urcu_bp_defer_rcu |
70 | #define rcu_defer_register_thread urcu_bp_defer_register_thread | |
71 | #define rcu_defer_unregister_thread urcu_bp_defer_unregister_thread | |
72 | #define rcu_defer_barrier urcu_bp_defer_barrier | |
73 | #define rcu_defer_barrier_thread urcu_bp_defer_barrier_thread | |
74 | #define rcu_defer_exit urcu_bp_defer_exit | |
0376e7b2 | 75 | |
4477a870 | 76 | #define rcu_flavor urcu_bp_flavor |
541d828d | 77 | |
4477a870 MD |
78 | #define rcu_yield_active urcu_bp_yield_active |
79 | #define rcu_rand_yield urcu_bp_rand_yield | |
1de4df4b | 80 | |
d0ec0ed2 | 81 | #define urcu_register_rculfhash_atfork \ |
4477a870 | 82 | urcu_bp_register_rculfhash_atfork |
d0ec0ed2 | 83 | #define urcu_unregister_rculfhash_atfork \ |
4477a870 MD |
84 | urcu_bp_unregister_rculfhash_atfork |
85 | ||
86 | ||
e37faee1 MJ |
87 | /* Compat identifiers for prior undocumented multiflavor usage */ |
88 | #ifndef URCU_NO_COMPAT_IDENTIFIERS | |
89 | ||
90 | #define rcu_dereference_bp urcu_bp_dereference | |
91 | #define rcu_cmpxchg_pointer_bp urcu_bp_cmpxchg_pointer | |
92 | #define rcu_xchg_pointer_bp urcu_bp_xchg_pointer | |
93 | #define rcu_set_pointer_bp urcu_bp_set_pointer | |
94 | ||
95 | #define rcu_bp_before_fork urcu_bp_before_fork | |
96 | #define rcu_bp_after_fork_parent urcu_bp_after_fork_parent | |
97 | #define rcu_bp_after_fork_child urcu_bp_after_fork_child | |
98 | ||
99 | #define rcu_read_lock_bp urcu_bp_read_lock | |
100 | #define _rcu_read_lock_bp _urcu_bp_read_lock | |
101 | #define rcu_read_unlock_bp urcu_bp_read_unlock | |
102 | #define _rcu_read_unlock_bp _urcu_bp_read_unlock | |
103 | #define rcu_read_ongoing_bp urcu_bp_read_ongoing | |
104 | #define _rcu_read_ongoing_bp _urcu_bp_read_ongoing | |
105 | #define rcu_register_thread_bp urcu_bp_register_thread | |
106 | #define rcu_unregister_thread_bp urcu_bp_unregister_thread | |
107 | #define rcu_init_bp urcu_bp_init | |
108 | #define rcu_exit_bp urcu_bp_exit | |
109 | #define synchronize_rcu_bp urcu_bp_synchronize_rcu | |
110 | #define rcu_reader_bp urcu_bp_reader | |
111 | #define rcu_gp_bp urcu_bp_gp | |
112 | ||
113 | #define get_cpu_call_rcu_data_bp urcu_bp_get_cpu_call_rcu_data | |
114 | #define get_call_rcu_thread_bp urcu_bp_get_call_rcu_thread | |
115 | #define create_call_rcu_data_bp urcu_bp_create_call_rcu_data | |
116 | #define set_cpu_call_rcu_data_bp urcu_bp_set_cpu_call_rcu_data | |
117 | #define get_default_call_rcu_data_bp urcu_bp_get_default_call_rcu_data | |
118 | #define get_call_rcu_data_bp urcu_bp_get_call_rcu_data | |
119 | #define get_thread_call_rcu_data_bp urcu_bp_get_thread_call_rcu_data | |
120 | #define set_thread_call_rcu_data_bp urcu_bp_set_thread_call_rcu_data | |
121 | #define create_all_cpu_call_rcu_data_bp urcu_bp_create_all_cpu_call_rcu_data | |
122 | #define free_all_cpu_call_rcu_data_bp urcu_bp_free_all_cpu_call_rcu_data | |
123 | #define call_rcu_bp urcu_bp_call_rcu | |
124 | #define call_rcu_data_free_bp urcu_bp_call_rcu_data_free | |
125 | #define call_rcu_before_fork_bp urcu_bp_call_rcu_before_fork | |
126 | #define call_rcu_after_fork_parent_bp urcu_bp_call_rcu_after_fork_parent | |
127 | #define call_rcu_after_fork_child_bp urcu_bp_call_rcu_after_fork_child | |
128 | #define rcu_barrier_bp urcu_bp_barrier | |
129 | ||
130 | #define defer_rcu_bp urcu_bp_defer_rcu | |
131 | #define rcu_defer_register_thread_bp urcu_bp_defer_register_thread | |
132 | #define rcu_defer_unregister_thread_bp urcu_bp_defer_unregister_thread | |
133 | #define rcu_defer_barrier_bp urcu_bp_defer_barrier | |
134 | #define rcu_defer_barrier_thread_bp urcu_bp_defer_barrier_thread | |
135 | #define rcu_defer_exit_bp urcu_bp_defer_exit | |
136 | ||
137 | #define rcu_flavor_bp urcu_bp_flavor | |
138 | ||
139 | #define rcu_yield_active_bp urcu_bp_yield_active | |
140 | #define rcu_rand_yield_bp urcu_bp_rand_yield | |
141 | ||
142 | #define urcu_register_rculfhash_atfork_bp \ | |
143 | urcu_bp_register_rculfhash_atfork | |
144 | #define urcu_unregister_rculfhash_atfork_bp \ | |
145 | urcu_bp_unregister_rculfhash_atfork | |
146 | ||
147 | #endif /* URCU_NO_COMPAT_IDENTIFIERS */ |