c11_atomics_compat.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2019 Otto-von-Guericke-Universität Magdeburg
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
27 #pragma once
28 
29 #include "c11_atomics_compat_cpu.hpp"
30 
39 #ifndef ATOMIC_VAR_INIT
40 #define ATOMIC_VAR_INIT(x) { x }
41 #endif
42 
46 typedef struct {
52  ATOMIC_BOOL_SAME_SIZED_TYPE do_not_access_from_cpp;
53 } atomic_bool;
54 
58 typedef struct {
64  ATOMIC_CHAR_SAME_SIZED_TYPE do_not_access_from_cpp;
65 } atomic_char;
66 
70 typedef struct {
76  ATOMIC_SCHAR_SAME_SIZED_TYPE do_not_access_from_cpp;
77 } atomic_schar;
78 
82 typedef struct {
88  ATOMIC_UCHAR_SAME_SIZED_TYPE do_not_access_from_cpp;
89 } atomic_uchar;
90 
94 typedef struct {
100  ATOMIC_SHORT_SAME_SIZED_TYPE do_not_access_from_cpp;
101 } atomic_short;
102 
106 typedef struct {
112  ATOMIC_USHORT_SAME_SIZED_TYPE do_not_access_from_cpp;
113 } atomic_ushort;
114 
118 typedef struct {
124  ATOMIC_INT_SAME_SIZED_TYPE do_not_access_from_cpp;
125 } atomic_int;
126 
130 typedef struct {
136  ATOMIC_UINT_SAME_SIZED_TYPE do_not_access_from_cpp;
137 } atomic_uint;
138 
142 typedef struct {
148  ATOMIC_LONG_SAME_SIZED_TYPE do_not_access_from_cpp;
149 } atomic_long;
150 
154 typedef struct {
160  ATOMIC_ULONG_SAME_SIZED_TYPE do_not_access_from_cpp;
161 } atomic_ulong;
162 
166 typedef struct {
172  ATOMIC_LLONG_SAME_SIZED_TYPE do_not_access_from_cpp;
173 } atomic_llong;
174 
178 typedef struct {
184  ATOMIC_ULLONG_SAME_SIZED_TYPE do_not_access_from_cpp;
185 } atomic_ullong;
186 
190 typedef struct {
196  ATOMIC_INT_LEAST8_T_SAME_SIZED_TYPE do_not_access_from_cpp;
198 
202 typedef struct {
208  ATOMIC_UINT_LEAST8_T_SAME_SIZED_TYPE do_not_access_from_cpp;
210 
214 typedef struct {
220  ATOMIC_INT_LEAST16_T_SAME_SIZED_TYPE do_not_access_from_cpp;
222 
226 typedef struct {
232  ATOMIC_UINT_LEAST16_T_SAME_SIZED_TYPE do_not_access_from_cpp;
234 
238 typedef struct {
244  ATOMIC_INT_LEAST32_T_SAME_SIZED_TYPE do_not_access_from_cpp;
246 
250 typedef struct {
256  ATOMIC_UINT_LEAST32_T_SAME_SIZED_TYPE do_not_access_from_cpp;
258 
262 typedef struct {
268  ATOMIC_INT_LEAST64_T_SAME_SIZED_TYPE do_not_access_from_cpp;
270 
274 typedef struct {
280  ATOMIC_UINT_LEAST64_T_SAME_SIZED_TYPE do_not_access_from_cpp;
282 
286 typedef struct {
292  ATOMIC_INT_FAST8_T_SAME_SIZED_TYPE do_not_access_from_cpp;
294 
298 typedef struct {
304  ATOMIC_UINT_FAST8_T_SAME_SIZED_TYPE do_not_access_from_cpp;
306 
310 typedef struct {
316  ATOMIC_INT_FAST16_T_SAME_SIZED_TYPE do_not_access_from_cpp;
318 
322 typedef struct {
328  ATOMIC_UINT_FAST16_T_SAME_SIZED_TYPE do_not_access_from_cpp;
330 
334 typedef struct {
340  ATOMIC_INT_FAST32_T_SAME_SIZED_TYPE do_not_access_from_cpp;
342 
346 typedef struct {
352  ATOMIC_UINT_FAST32_T_SAME_SIZED_TYPE do_not_access_from_cpp;
354 
358 typedef struct {
364  ATOMIC_INT_FAST64_T_SAME_SIZED_TYPE do_not_access_from_cpp;
366 
370 typedef struct {
376  ATOMIC_UINT_FAST64_T_SAME_SIZED_TYPE do_not_access_from_cpp;
378 
382 typedef struct {
388  ATOMIC_INTPTR_T_SAME_SIZED_TYPE do_not_access_from_cpp;
390 
394 typedef struct {
400  ATOMIC_UINTPTR_T_SAME_SIZED_TYPE do_not_access_from_cpp;
402 
406 typedef struct {
412  ATOMIC_SIZE_T_SAME_SIZED_TYPE do_not_access_from_cpp;
413 } atomic_size_t;
414 
418 typedef struct {
424  ATOMIC_INTMAX_T_SAME_SIZED_TYPE do_not_access_from_cpp;
426 
430 typedef struct {
436  ATOMIC_UINTMAX_T_SAME_SIZED_TYPE do_not_access_from_cpp;
438 
Type with the same alignment and size as atomic_bool
ATOMIC_BOOL_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Type with the same alignment and size as atomic_char
ATOMIC_CHAR_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Type with the same alignment and size as atomic_int_fast16_t
ATOMIC_INT_FAST16_T_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Type with the same alignment and size as atomic_int_fast32_t
ATOMIC_INT_FAST32_T_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Type with the same alignment and size as atomic_int_fast64_t
ATOMIC_INT_FAST64_T_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Type with the same alignment and size as atomic_int_fast8_t
ATOMIC_INT_FAST8_T_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Type with the same alignment and size as atomic_int_least16_t
ATOMIC_INT_LEAST16_T_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Type with the same alignment and size as atomic_int_least32_t
ATOMIC_INT_LEAST32_T_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Type with the same alignment and size as atomic_int_least64_t
ATOMIC_INT_LEAST64_T_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Type with the same alignment and size as atomic_int_least8_t
ATOMIC_INT_LEAST8_T_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Type with the same alignment and size as atomic_int
ATOMIC_INT_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Type with the same alignment and size as atomic_intmax_t
ATOMIC_INTMAX_T_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Type with the same alignment and size as atomic_intptr_t
ATOMIC_INTPTR_T_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Type with the same alignment and size as atomic_llong
ATOMIC_LLONG_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Type with the same alignment and size as atomic_long
ATOMIC_LONG_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Type with the same alignment and size as atomic_schar
ATOMIC_SCHAR_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Type with the same alignment and size as atomic_short
ATOMIC_SHORT_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Type with the same alignment and size as atomic_size_t
ATOMIC_SIZE_T_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Type with the same alignment and size as atomic_uchar
ATOMIC_UCHAR_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Type with the same alignment and size as atomic_uint_fast16_t
ATOMIC_UINT_FAST16_T_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Type with the same alignment and size as atomic_uint_fast32_t
ATOMIC_UINT_FAST32_T_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Type with the same alignment and size as atomic_uint_fast64_t
ATOMIC_UINT_FAST64_T_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Type with the same alignment and size as atomic_uint_fast8_t
ATOMIC_UINT_FAST8_T_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Type with the same alignment and size as atomic_uint_least16_t
ATOMIC_UINT_LEAST16_T_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Type with the same alignment and size as atomic_uint_least32_t
ATOMIC_UINT_LEAST32_T_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Type with the same alignment and size as atomic_uint_least64_t
ATOMIC_UINT_LEAST64_T_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Type with the same alignment and size as atomic_uint_least8_t
ATOMIC_UINT_LEAST8_T_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Type with the same alignment and size as atomic_uint
ATOMIC_UINT_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Type with the same alignment and size as atomic_uintmax_t
ATOMIC_UINTMAX_T_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Type with the same alignment and size as atomic_uintptr_t
ATOMIC_UINTPTR_T_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Type with the same alignment and size as atomic_ullong
ATOMIC_ULLONG_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Type with the same alignment and size as atomic_ulong
ATOMIC_ULONG_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Type with the same alignment and size as atomic_ushort
ATOMIC_USHORT_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.