aix: Fix TLS thread pointer function names.
[official-gcc.git] / libgomp / libgomp_g.h
blob3cbe0a4ca89ef2b8118b7e9af551ce54e56d2dab
1 /* Copyright (C) 2005-2021 Free Software Foundation, Inc.
2 Contributed by Richard Henderson <rth@redhat.com>.
4 This file is part of the GNU Offloading and Multi Processing Library
5 (libgomp).
7 Libgomp is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3, or (at your option)
10 any later version.
12 Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15 more details.
17 Under Section 7 of GPL version 3, you are granted additional
18 permissions described in the GCC Runtime Library Exception, version
19 3.1, as published by the Free Software Foundation.
21 You should have received a copy of the GNU General Public License and
22 a copy of the GCC Runtime Library Exception along with this program;
23 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
24 <http://www.gnu.org/licenses/>. */
26 /* This file contains prototypes of functions in the external ABI.
27 This file is included by files in the testsuite. */
29 #ifndef LIBGOMP_G_H
30 #define LIBGOMP_G_H 1
32 #include <stdbool.h>
33 #include <stddef.h>
34 #include <stdint.h>
36 /* barrier.c */
38 extern void GOMP_barrier (void);
39 extern bool GOMP_barrier_cancel (void);
41 /* critical.c */
43 extern void GOMP_critical_start (void);
44 extern void GOMP_critical_end (void);
45 extern void GOMP_critical_name_start (void **);
46 extern void GOMP_critical_name_end (void **);
47 extern void GOMP_atomic_start (void);
48 extern void GOMP_atomic_end (void);
50 /* loop.c */
52 extern bool GOMP_loop_static_start (long, long, long, long, long *, long *);
53 extern bool GOMP_loop_dynamic_start (long, long, long, long, long *, long *);
54 extern bool GOMP_loop_guided_start (long, long, long, long, long *, long *);
55 extern bool GOMP_loop_runtime_start (long, long, long, long *, long *);
56 extern bool GOMP_loop_nonmonotonic_dynamic_start (long, long, long, long,
57 long *, long *);
58 extern bool GOMP_loop_nonmonotonic_guided_start (long, long, long, long,
59 long *, long *);
60 extern bool GOMP_loop_nonmonotonic_runtime_start (long, long, long,
61 long *, long *);
62 extern bool GOMP_loop_maybe_nonmonotonic_runtime_start (long, long, long,
63 long *, long *);
64 extern bool GOMP_loop_start (long, long, long, long, long, long *, long *,
65 uintptr_t *, void **);
67 extern bool GOMP_loop_ordered_static_start (long, long, long, long,
68 long *, long *);
69 extern bool GOMP_loop_ordered_dynamic_start (long, long, long, long,
70 long *, long *);
71 extern bool GOMP_loop_ordered_guided_start (long, long, long, long,
72 long *, long *);
73 extern bool GOMP_loop_ordered_runtime_start (long, long, long, long *, long *);
74 extern bool GOMP_loop_ordered_start (long, long, long, long, long, long *,
75 long *, uintptr_t *, void **);
77 extern bool GOMP_loop_static_next (long *, long *);
78 extern bool GOMP_loop_dynamic_next (long *, long *);
79 extern bool GOMP_loop_guided_next (long *, long *);
80 extern bool GOMP_loop_runtime_next (long *, long *);
81 extern bool GOMP_loop_nonmonotonic_dynamic_next (long *, long *);
82 extern bool GOMP_loop_nonmonotonic_guided_next (long *, long *);
83 extern bool GOMP_loop_nonmonotonic_runtime_next (long *, long *);
84 extern bool GOMP_loop_maybe_nonmonotonic_runtime_next (long *, long *);
86 extern bool GOMP_loop_ordered_static_next (long *, long *);
87 extern bool GOMP_loop_ordered_dynamic_next (long *, long *);
88 extern bool GOMP_loop_ordered_guided_next (long *, long *);
89 extern bool GOMP_loop_ordered_runtime_next (long *, long *);
91 extern bool GOMP_loop_doacross_static_start (unsigned, long *, long, long *,
92 long *);
93 extern bool GOMP_loop_doacross_dynamic_start (unsigned, long *, long, long *,
94 long *);
95 extern bool GOMP_loop_doacross_guided_start (unsigned, long *, long, long *,
96 long *);
97 extern bool GOMP_loop_doacross_runtime_start (unsigned, long *, long *,
98 long *);
99 extern bool GOMP_loop_doacross_start (unsigned, long *, long, long, long *,
100 long *, uintptr_t *, void **);
102 extern void GOMP_parallel_loop_static_start (void (*)(void *), void *,
103 unsigned, long, long, long, long);
104 extern void GOMP_parallel_loop_dynamic_start (void (*)(void *), void *,
105 unsigned, long, long, long, long);
106 extern void GOMP_parallel_loop_guided_start (void (*)(void *), void *,
107 unsigned, long, long, long, long);
108 extern void GOMP_parallel_loop_runtime_start (void (*)(void *), void *,
109 unsigned, long, long, long);
110 extern void GOMP_parallel_loop_static (void (*)(void *), void *,
111 unsigned, long, long, long, long,
112 unsigned);
113 extern void GOMP_parallel_loop_dynamic (void (*)(void *), void *,
114 unsigned, long, long, long, long,
115 unsigned);
116 extern void GOMP_parallel_loop_guided (void (*)(void *), void *,
117 unsigned, long, long, long, long,
118 unsigned);
119 extern void GOMP_parallel_loop_runtime (void (*)(void *), void *,
120 unsigned, long, long, long,
121 unsigned);
122 extern void GOMP_parallel_loop_nonmonotonic_dynamic (void (*)(void *), void *,
123 unsigned, long, long,
124 long, long, unsigned);
125 extern void GOMP_parallel_loop_nonmonotonic_guided (void (*)(void *), void *,
126 unsigned, long, long,
127 long, long, unsigned);
128 extern void GOMP_parallel_loop_nonmonotonic_runtime (void (*)(void *), void *,
129 unsigned, long, long,
130 long, unsigned);
131 extern void GOMP_parallel_loop_maybe_nonmonotonic_runtime (void (*)(void *),
132 void *, unsigned,
133 long, long,
134 long, unsigned);
136 extern void GOMP_loop_end (void);
137 extern void GOMP_loop_end_nowait (void);
138 extern bool GOMP_loop_end_cancel (void);
140 /* loop_ull.c */
142 extern bool GOMP_loop_ull_static_start (bool, unsigned long long,
143 unsigned long long,
144 unsigned long long,
145 unsigned long long,
146 unsigned long long *,
147 unsigned long long *);
148 extern bool GOMP_loop_ull_dynamic_start (bool, unsigned long long,
149 unsigned long long,
150 unsigned long long,
151 unsigned long long,
152 unsigned long long *,
153 unsigned long long *);
154 extern bool GOMP_loop_ull_guided_start (bool, unsigned long long,
155 unsigned long long,
156 unsigned long long,
157 unsigned long long,
158 unsigned long long *,
159 unsigned long long *);
160 extern bool GOMP_loop_ull_runtime_start (bool, unsigned long long,
161 unsigned long long,
162 unsigned long long,
163 unsigned long long *,
164 unsigned long long *);
165 extern bool GOMP_loop_ull_nonmonotonic_dynamic_start (bool, unsigned long long,
166 unsigned long long,
167 unsigned long long,
168 unsigned long long,
169 unsigned long long *,
170 unsigned long long *);
171 extern bool GOMP_loop_ull_nonmonotonic_guided_start (bool, unsigned long long,
172 unsigned long long,
173 unsigned long long,
174 unsigned long long,
175 unsigned long long *,
176 unsigned long long *);
177 extern bool GOMP_loop_ull_nonmonotonic_runtime_start (bool, unsigned long long,
178 unsigned long long,
179 unsigned long long,
180 unsigned long long *,
181 unsigned long long *);
182 extern bool GOMP_loop_ull_maybe_nonmonotonic_runtime_start (bool,
183 unsigned long long,
184 unsigned long long,
185 unsigned long long,
186 unsigned long long *,
187 unsigned long long *);
188 extern bool GOMP_loop_ull_start (bool, unsigned long long, unsigned long long,
189 unsigned long long, long, unsigned long long,
190 unsigned long long *, unsigned long long *,
191 uintptr_t *, void **);
193 extern bool GOMP_loop_ull_ordered_static_start (bool, unsigned long long,
194 unsigned long long,
195 unsigned long long,
196 unsigned long long,
197 unsigned long long *,
198 unsigned long long *);
199 extern bool GOMP_loop_ull_ordered_dynamic_start (bool, unsigned long long,
200 unsigned long long,
201 unsigned long long,
202 unsigned long long,
203 unsigned long long *,
204 unsigned long long *);
205 extern bool GOMP_loop_ull_ordered_guided_start (bool, unsigned long long,
206 unsigned long long,
207 unsigned long long,
208 unsigned long long,
209 unsigned long long *,
210 unsigned long long *);
211 extern bool GOMP_loop_ull_ordered_runtime_start (bool, unsigned long long,
212 unsigned long long,
213 unsigned long long,
214 unsigned long long *,
215 unsigned long long *);
216 extern bool GOMP_loop_ull_ordered_start (bool, unsigned long long,
217 unsigned long long,
218 unsigned long long, long,
219 unsigned long long,
220 unsigned long long *,
221 unsigned long long *,
222 uintptr_t *, void **);
224 extern bool GOMP_loop_ull_static_next (unsigned long long *,
225 unsigned long long *);
226 extern bool GOMP_loop_ull_dynamic_next (unsigned long long *,
227 unsigned long long *);
228 extern bool GOMP_loop_ull_guided_next (unsigned long long *,
229 unsigned long long *);
230 extern bool GOMP_loop_ull_runtime_next (unsigned long long *,
231 unsigned long long *);
232 extern bool GOMP_loop_ull_nonmonotonic_dynamic_next (unsigned long long *,
233 unsigned long long *);
234 extern bool GOMP_loop_ull_nonmonotonic_guided_next (unsigned long long *,
235 unsigned long long *);
236 extern bool GOMP_loop_ull_nonmonotonic_runtime_next (unsigned long long *,
237 unsigned long long *);
238 extern bool GOMP_loop_ull_maybe_nonmonotonic_runtime_next (unsigned long long *,
239 unsigned long long *);
241 extern bool GOMP_loop_ull_ordered_static_next (unsigned long long *,
242 unsigned long long *);
243 extern bool GOMP_loop_ull_ordered_dynamic_next (unsigned long long *,
244 unsigned long long *);
245 extern bool GOMP_loop_ull_ordered_guided_next (unsigned long long *,
246 unsigned long long *);
247 extern bool GOMP_loop_ull_ordered_runtime_next (unsigned long long *,
248 unsigned long long *);
250 extern bool GOMP_loop_ull_doacross_static_start (unsigned,
251 unsigned long long *,
252 unsigned long long,
253 unsigned long long *,
254 unsigned long long *);
255 extern bool GOMP_loop_ull_doacross_dynamic_start (unsigned,
256 unsigned long long *,
257 unsigned long long,
258 unsigned long long *,
259 unsigned long long *);
260 extern bool GOMP_loop_ull_doacross_guided_start (unsigned,
261 unsigned long long *,
262 unsigned long long,
263 unsigned long long *,
264 unsigned long long *);
265 extern bool GOMP_loop_ull_doacross_runtime_start (unsigned,
266 unsigned long long *,
267 unsigned long long *,
268 unsigned long long *);
269 extern bool GOMP_loop_ull_doacross_start (unsigned, unsigned long long *,
270 long, unsigned long long,
271 unsigned long long *,
272 unsigned long long *,
273 uintptr_t *, void **);
275 /* ordered.c */
277 extern void GOMP_ordered_start (void);
278 extern void GOMP_ordered_end (void);
279 extern void GOMP_doacross_post (long *);
280 extern void GOMP_doacross_wait (long, ...);
281 extern void GOMP_doacross_ull_post (unsigned long long *);
282 extern void GOMP_doacross_ull_wait (unsigned long long, ...);
284 /* parallel.c */
286 extern void GOMP_parallel_start (void (*) (void *), void *, unsigned);
287 extern void GOMP_parallel_end (void);
288 extern void GOMP_parallel (void (*) (void *), void *, unsigned, unsigned);
289 extern unsigned GOMP_parallel_reductions (void (*) (void *), void *, unsigned,
290 unsigned);
291 extern bool GOMP_cancel (int, bool);
292 extern bool GOMP_cancellation_point (int);
294 /* task.c */
296 extern void GOMP_task (void (*) (void *), void *, void (*) (void *, void *),
297 long, long, bool, unsigned, void **, int, void *);
298 extern void GOMP_taskloop (void (*) (void *), void *,
299 void (*) (void *, void *), long, long, unsigned,
300 unsigned long, int, long, long, long);
301 extern void GOMP_taskloop_ull (void (*) (void *), void *,
302 void (*) (void *, void *), long, long,
303 unsigned, unsigned long, int,
304 unsigned long long, unsigned long long,
305 unsigned long long);
306 extern void GOMP_taskwait (void);
307 extern void GOMP_taskwait_depend (void **);
308 extern void GOMP_taskyield (void);
309 extern void GOMP_taskgroup_start (void);
310 extern void GOMP_taskgroup_end (void);
311 extern void GOMP_taskgroup_reduction_register (uintptr_t *);
312 extern void GOMP_taskgroup_reduction_unregister (uintptr_t *);
313 extern void GOMP_task_reduction_remap (size_t, size_t, void **);
314 extern void GOMP_workshare_task_reduction_unregister (bool);
316 /* sections.c */
318 extern unsigned GOMP_sections_start (unsigned);
319 extern unsigned GOMP_sections2_start (unsigned, uintptr_t *, void **);
320 extern unsigned GOMP_sections_next (void);
321 extern void GOMP_parallel_sections_start (void (*) (void *), void *,
322 unsigned, unsigned);
323 extern void GOMP_parallel_sections (void (*) (void *), void *,
324 unsigned, unsigned, unsigned);
325 extern void GOMP_sections_end (void);
326 extern void GOMP_sections_end_nowait (void);
327 extern bool GOMP_sections_end_cancel (void);
329 /* single.c */
331 extern bool GOMP_single_start (void);
332 extern void *GOMP_single_copy_start (void);
333 extern void GOMP_single_copy_end (void *);
335 /* target.c */
337 extern void GOMP_target (int, void (*) (void *), const void *,
338 size_t, void **, size_t *, unsigned char *);
339 extern void GOMP_target_ext (int, void (*) (void *), size_t, void **, size_t *,
340 unsigned short *, unsigned int, void **, void **);
341 extern void GOMP_target_data (int, const void *,
342 size_t, void **, size_t *, unsigned char *);
343 extern void GOMP_target_data_ext (int, size_t, void **, size_t *,
344 unsigned short *);
345 extern void GOMP_target_end_data (void);
346 extern void GOMP_target_update (int, const void *,
347 size_t, void **, size_t *, unsigned char *);
348 extern void GOMP_target_update_ext (int, size_t, void **, size_t *,
349 unsigned short *, unsigned int, void **);
350 extern void GOMP_target_enter_exit_data (int, size_t, void **, size_t *,
351 unsigned short *, unsigned int,
352 void **);
353 extern void GOMP_teams (unsigned int, unsigned int);
355 /* teams.c */
357 extern void GOMP_teams_reg (void (*) (void *), void *, unsigned, unsigned,
358 unsigned);
360 /* allocator.c */
362 extern void *GOMP_alloc (size_t, size_t, uintptr_t);
363 extern void GOMP_free (void *, uintptr_t);
365 /* oacc-async.c */
367 extern void GOACC_wait (int, int, ...);
369 /* oacc-mem.c */
371 extern void GOACC_enter_exit_data (int, size_t, void **, size_t *,
372 unsigned short *, int, int, ...);
374 /* oacc-parallel.c */
376 extern void GOACC_parallel_keyed (int, void (*) (void *), size_t,
377 void **, size_t *, unsigned short *, ...);
378 extern void GOACC_parallel (int, void (*) (void *), size_t, void **, size_t *,
379 unsigned short *, int, int, int, int, int, ...);
380 extern void GOACC_data_start (int, size_t, void **, size_t *,
381 unsigned short *);
382 extern void GOACC_data_end (void);
383 extern void GOACC_update (int, size_t, void **, size_t *,
384 unsigned short *, int, int, ...);
385 extern int GOACC_get_num_threads (void);
386 extern int GOACC_get_thread_num (void);
387 extern void GOACC_declare (int, size_t, void **, size_t *, unsigned short *);
389 #endif /* LIBGOMP_G_H */