Tests: Add verbose support to test script
[userspace-rcu.git] / urcu / map / urcu.h
CommitLineData
5e77fc1f
PM
1#ifndef _URCU_MAP_H
2#define _URCU_MAP_H
3
4/*
5 * urcu-map.h
6 *
7 * Userspace RCU header -- name mapping to allow multiple flavors to be
8 * used in the same executable.
9 *
10 * Copyright (c) 2009 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 * Copyright (c) 2009 Paul E. McKenney, IBM Corporation.
12 *
13 * LGPL-compatible code should include this header with :
14 *
15 * #define _LGPL_SOURCE
16 * #include <urcu.h>
17 *
18 * This library is free software; you can redistribute it and/or
19 * modify it under the terms of the GNU Lesser General Public
20 * License as published by the Free Software Foundation; either
21 * version 2.1 of the License, or (at your option) any later version.
22 *
23 * This library is distributed in the hope that it will be useful,
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
26 * Lesser General Public License for more details.
27 *
28 * You should have received a copy of the GNU Lesser General Public
29 * License along with this library; if not, write to the Free Software
30 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
31 *
32 * IBM's contributions to this file may be relicensed under LGPLv2 or later.
33 */
34
35/* Mapping macros to allow multiple flavors in a single binary. */
36
0376e7b2 37#if !defined(RCU_MEMBARRIER) && !defined(RCU_SIGNAL) && !defined(RCU_MB)
052fdaee 38#define RCU_MEMBARRIER
0376e7b2
PM
39#endif
40
5e77fc1f
PM
41#ifdef RCU_MEMBARRIER
42
43#define rcu_read_lock rcu_read_lock_memb
44#define _rcu_read_lock _rcu_read_lock_memb
45#define rcu_read_unlock rcu_read_unlock_memb
46#define _rcu_read_unlock _rcu_read_unlock_memb
882f3357
MD
47#define rcu_read_ongoing rcu_read_ongoing_memb
48#define _rcu_read_ongoing _rcu_read_ongoing_memb
5e77fc1f
PM
49#define rcu_register_thread rcu_register_thread_memb
50#define rcu_unregister_thread rcu_unregister_thread_memb
51#define rcu_init rcu_init_memb
52#define rcu_exit rcu_exit_memb
53#define synchronize_rcu synchronize_rcu_memb
54#define rcu_reader rcu_reader_memb
4de0cd31 55#define rcu_gp rcu_gp_memb
5e77fc1f
PM
56
57#define get_cpu_call_rcu_data get_cpu_call_rcu_data_memb
58#define get_call_rcu_thread get_call_rcu_thread_memb
59#define create_call_rcu_data create_call_rcu_data_memb
60#define set_cpu_call_rcu_data set_cpu_call_rcu_data_memb
61#define get_default_call_rcu_data get_default_call_rcu_data_memb
62#define get_call_rcu_data get_call_rcu_data_memb
63#define get_thread_call_rcu_data get_thread_call_rcu_data_memb
64#define set_thread_call_rcu_data set_thread_call_rcu_data_memb
65#define create_all_cpu_call_rcu_data create_all_cpu_call_rcu_data_memb
66#define free_all_cpu_call_rcu_data free_all_cpu_call_rcu_data_memb
67#define call_rcu call_rcu_memb
1de4df4b
MD
68#define call_rcu_data_free call_rcu_data_free_memb
69#define call_rcu_before_fork call_rcu_before_fork_memb
70#define call_rcu_after_fork_parent call_rcu_after_fork_parent_memb
71#define call_rcu_after_fork_child call_rcu_after_fork_child_memb
b7f721d9 72#define rcu_barrier rcu_barrier_memb
5e77fc1f 73
0376e7b2
PM
74#define defer_rcu defer_rcu_memb
75#define rcu_defer_register_thread rcu_defer_register_thread_memb
76#define rcu_defer_unregister_thread rcu_defer_unregister_thread_memb
77#define rcu_defer_barrier rcu_defer_barrier_memb
78#define rcu_defer_barrier_thread rcu_defer_barrier_thread_memb
1de4df4b 79#define rcu_defer_exit rcu_defer_exit_memb
0376e7b2 80
541d828d
LJ
81#define rcu_flavor rcu_flavor_memb
82
1de4df4b
MD
83/* Specific to MEMBARRIER flavor */
84#define rcu_has_sys_membarrier rcu_has_sys_membarrier_memb
85
5e77fc1f
PM
86#elif defined(RCU_SIGNAL)
87
88#define rcu_read_lock rcu_read_lock_sig
89#define _rcu_read_lock _rcu_read_lock_sig
90#define rcu_read_unlock rcu_read_unlock_sig
91#define _rcu_read_unlock _rcu_read_unlock_sig
882f3357
MD
92#define rcu_read_ongoing rcu_read_ongoing_sig
93#define _rcu_read_ongoing _rcu_read_ongoing_sig
5e77fc1f
PM
94#define rcu_register_thread rcu_register_thread_sig
95#define rcu_unregister_thread rcu_unregister_thread_sig
96#define rcu_init rcu_init_sig
97#define rcu_exit rcu_exit_sig
98#define synchronize_rcu synchronize_rcu_sig
99#define rcu_reader rcu_reader_sig
4de0cd31 100#define rcu_gp rcu_gp_sig
5e77fc1f
PM
101
102#define get_cpu_call_rcu_data get_cpu_call_rcu_data_sig
103#define get_call_rcu_thread get_call_rcu_thread_sig
104#define create_call_rcu_data create_call_rcu_data_sig
105#define set_cpu_call_rcu_data set_cpu_call_rcu_data_sig
106#define get_default_call_rcu_data get_default_call_rcu_data_sig
107#define get_call_rcu_data get_call_rcu_data_sig
108#define get_thread_call_rcu_data get_thread_call_rcu_data_sig
109#define set_thread_call_rcu_data set_thread_call_rcu_data_sig
110#define create_all_cpu_call_rcu_data create_all_cpu_call_rcu_data_sig
111#define free_all_cpu_call_rcu_data free_all_cpu_call_rcu_data_sig
112#define call_rcu call_rcu_sig
1de4df4b
MD
113#define call_rcu_data_free call_rcu_data_free_sig
114#define call_rcu_before_fork call_rcu_before_fork_sig
115#define call_rcu_after_fork_parent call_rcu_after_fork_parent_sig
116#define call_rcu_after_fork_child call_rcu_after_fork_child_sig
b7f721d9 117#define rcu_barrier rcu_barrier_sig
5e77fc1f 118
0376e7b2
PM
119#define defer_rcu defer_rcu_sig
120#define rcu_defer_register_thread rcu_defer_register_thread_sig
121#define rcu_defer_unregister_thread rcu_defer_unregister_thread_sig
122#define rcu_defer_barrier rcu_defer_barrier_sig
123#define rcu_defer_barrier_thread rcu_defer_barrier_thread_sig
1de4df4b 124#define rcu_defer_exit rcu_defer_exit_sig
0376e7b2 125
541d828d
LJ
126#define rcu_flavor rcu_flavor_sig
127
5e77fc1f
PM
128#elif defined(RCU_MB)
129
130#define rcu_read_lock rcu_read_lock_mb
131#define _rcu_read_lock _rcu_read_lock_mb
132#define rcu_read_unlock rcu_read_unlock_mb
133#define _rcu_read_unlock _rcu_read_unlock_mb
882f3357
MD
134#define rcu_read_ongoing rcu_read_ongoing_mb
135#define _rcu_read_ongoing _rcu_read_ongoing_mb
5e77fc1f
PM
136#define rcu_register_thread rcu_register_thread_mb
137#define rcu_unregister_thread rcu_unregister_thread_mb
138#define rcu_init rcu_init_mb
139#define rcu_exit rcu_exit_mb
140#define synchronize_rcu synchronize_rcu_mb
141#define rcu_reader rcu_reader_mb
4de0cd31 142#define rcu_gp rcu_gp_mb
5e77fc1f
PM
143
144#define get_cpu_call_rcu_data get_cpu_call_rcu_data_mb
145#define get_call_rcu_thread get_call_rcu_thread_mb
146#define create_call_rcu_data create_call_rcu_data_mb
147#define set_cpu_call_rcu_data set_cpu_call_rcu_data_mb
148#define get_default_call_rcu_data get_default_call_rcu_data_mb
149#define get_call_rcu_data get_call_rcu_data_mb
150#define get_thread_call_rcu_data get_thread_call_rcu_data_mb
151#define set_thread_call_rcu_data set_thread_call_rcu_data_mb
152#define create_all_cpu_call_rcu_data create_all_cpu_call_rcu_data_mb
153#define free_all_cpu_call_rcu_data free_all_cpu_call_rcu_data_mb
154#define call_rcu call_rcu_mb
1de4df4b
MD
155#define call_rcu_data_free call_rcu_data_free_mb
156#define call_rcu_before_fork call_rcu_before_fork_mb
157#define call_rcu_after_fork_parent call_rcu_after_fork_parent_mb
158#define call_rcu_after_fork_child call_rcu_after_fork_child_mb
b7f721d9 159#define rcu_barrier rcu_barrier_mb
5e77fc1f 160
0376e7b2
PM
161#define defer_rcu defer_rcu_mb
162#define rcu_defer_register_thread rcu_defer_register_thread_mb
163#define rcu_defer_unregister_thread rcu_defer_unregister_thread_mb
164#define rcu_defer_barrier rcu_defer_barrier_mb
165#define rcu_defer_barrier_thread rcu_defer_barrier_thread_mb
1de4df4b 166#define rcu_defer_exit rcu_defer_exit_mb
0376e7b2 167
541d828d
LJ
168#define rcu_flavor rcu_flavor_mb
169
0376e7b2
PM
170#else
171
172#error "Undefined selection"
173
5e77fc1f
PM
174#endif
175
176#endif /* _URCU_MAP_H */
This page took 0.04188 seconds and 4 git commands to generate.