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 
atomic_int_fast16_t::do_not_access_from_cpp
ATOMIC_INT_FAST16_T_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Definition: c11_atomics_compat.hpp:316
atomic_size_t
Type with the same alignment and size as atomic_size_t
Definition: c11_atomics_compat.hpp:406
atomic_uint_least16_t
Type with the same alignment and size as atomic_uint_least16_t
Definition: c11_atomics_compat.hpp:226
atomic_llong::do_not_access_from_cpp
ATOMIC_LLONG_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Definition: c11_atomics_compat.hpp:172
atomic_int
Type with the same alignment and size as atomic_int
Definition: c11_atomics_compat.hpp:118
atomic_intptr_t
Type with the same alignment and size as atomic_intptr_t
Definition: c11_atomics_compat.hpp:382
atomic_schar::do_not_access_from_cpp
ATOMIC_SCHAR_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Definition: c11_atomics_compat.hpp:76
atomic_int_least64_t::do_not_access_from_cpp
ATOMIC_INT_LEAST64_T_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Definition: c11_atomics_compat.hpp:268
atomic_int_fast16_t
Type with the same alignment and size as atomic_int_fast16_t
Definition: c11_atomics_compat.hpp:310
atomic_long::do_not_access_from_cpp
ATOMIC_LONG_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Definition: c11_atomics_compat.hpp:148
atomic_bool
Type with the same alignment and size as atomic_bool
Definition: c11_atomics_compat.hpp:46
atomic_ushort::do_not_access_from_cpp
ATOMIC_USHORT_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Definition: c11_atomics_compat.hpp:112
atomic_uintmax_t::do_not_access_from_cpp
ATOMIC_UINTMAX_T_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Definition: c11_atomics_compat.hpp:436
atomic_int_fast64_t
Type with the same alignment and size as atomic_int_fast64_t
Definition: c11_atomics_compat.hpp:358
atomic_uint_fast32_t
Type with the same alignment and size as atomic_uint_fast32_t
Definition: c11_atomics_compat.hpp:346
atomic_uint_least64_t
Type with the same alignment and size as atomic_uint_least64_t
Definition: c11_atomics_compat.hpp:274
atomic_size_t::do_not_access_from_cpp
ATOMIC_SIZE_T_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Definition: c11_atomics_compat.hpp:412
atomic_short
Type with the same alignment and size as atomic_short
Definition: c11_atomics_compat.hpp:94
atomic_int_fast32_t::do_not_access_from_cpp
ATOMIC_INT_FAST32_T_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Definition: c11_atomics_compat.hpp:340
atomic_int_fast8_t
Type with the same alignment and size as atomic_int_fast8_t
Definition: c11_atomics_compat.hpp:286
atomic_ullong::do_not_access_from_cpp
ATOMIC_ULLONG_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Definition: c11_atomics_compat.hpp:184
atomic_uchar::do_not_access_from_cpp
ATOMIC_UCHAR_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Definition: c11_atomics_compat.hpp:88
atomic_uint_least32_t
Type with the same alignment and size as atomic_uint_least32_t
Definition: c11_atomics_compat.hpp:250
atomic_intmax_t
Type with the same alignment and size as atomic_intmax_t
Definition: c11_atomics_compat.hpp:418
atomic_uint_least8_t
Type with the same alignment and size as atomic_uint_least8_t
Definition: c11_atomics_compat.hpp:202
atomic_uintmax_t
Type with the same alignment and size as atomic_uintmax_t
Definition: c11_atomics_compat.hpp:430
atomic_uint_least16_t::do_not_access_from_cpp
ATOMIC_UINT_LEAST16_T_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Definition: c11_atomics_compat.hpp:232
atomic_llong
Type with the same alignment and size as atomic_llong
Definition: c11_atomics_compat.hpp:166
atomic_uint_least32_t::do_not_access_from_cpp
ATOMIC_UINT_LEAST32_T_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Definition: c11_atomics_compat.hpp:256
atomic_int_least8_t::do_not_access_from_cpp
ATOMIC_INT_LEAST8_T_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Definition: c11_atomics_compat.hpp:196
atomic_char::do_not_access_from_cpp
ATOMIC_CHAR_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Definition: c11_atomics_compat.hpp:64
atomic_uint_fast64_t
Type with the same alignment and size as atomic_uint_fast64_t
Definition: c11_atomics_compat.hpp:370
atomic_ulong
Type with the same alignment and size as atomic_ulong
Definition: c11_atomics_compat.hpp:154
atomic_uint_least8_t::do_not_access_from_cpp
ATOMIC_UINT_LEAST8_T_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Definition: c11_atomics_compat.hpp:208
atomic_int_least64_t
Type with the same alignment and size as atomic_int_least64_t
Definition: c11_atomics_compat.hpp:262
atomic_ulong::do_not_access_from_cpp
ATOMIC_ULONG_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Definition: c11_atomics_compat.hpp:160
atomic_int_least16_t::do_not_access_from_cpp
ATOMIC_INT_LEAST16_T_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Definition: c11_atomics_compat.hpp:220
atomic_uint
Type with the same alignment and size as atomic_uint
Definition: c11_atomics_compat.hpp:130
atomic_short::do_not_access_from_cpp
ATOMIC_SHORT_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Definition: c11_atomics_compat.hpp:100
atomic_int_least32_t::do_not_access_from_cpp
ATOMIC_INT_LEAST32_T_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Definition: c11_atomics_compat.hpp:244
atomic_uint_fast32_t::do_not_access_from_cpp
ATOMIC_UINT_FAST32_T_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Definition: c11_atomics_compat.hpp:352
atomic_int_fast32_t
Type with the same alignment and size as atomic_int_fast32_t
Definition: c11_atomics_compat.hpp:334
atomic_int_least32_t
Type with the same alignment and size as atomic_int_least32_t
Definition: c11_atomics_compat.hpp:238
atomic_ullong
Type with the same alignment and size as atomic_ullong
Definition: c11_atomics_compat.hpp:178
atomic_uintptr_t::do_not_access_from_cpp
ATOMIC_UINTPTR_T_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Definition: c11_atomics_compat.hpp:400
atomic_intmax_t::do_not_access_from_cpp
ATOMIC_INTMAX_T_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Definition: c11_atomics_compat.hpp:424
atomic_uint_fast64_t::do_not_access_from_cpp
ATOMIC_UINT_FAST64_T_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Definition: c11_atomics_compat.hpp:376
atomic_ushort
Type with the same alignment and size as atomic_ushort
Definition: c11_atomics_compat.hpp:106
atomic_int_least16_t
Type with the same alignment and size as atomic_int_least16_t
Definition: c11_atomics_compat.hpp:214
atomic_uint_fast16_t
Type with the same alignment and size as atomic_uint_fast16_t
Definition: c11_atomics_compat.hpp:322
atomic_uint_least64_t::do_not_access_from_cpp
ATOMIC_UINT_LEAST64_T_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Definition: c11_atomics_compat.hpp:280
atomic_int_fast8_t::do_not_access_from_cpp
ATOMIC_INT_FAST8_T_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Definition: c11_atomics_compat.hpp:292
atomic_int::do_not_access_from_cpp
ATOMIC_INT_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Definition: c11_atomics_compat.hpp:124
atomic_int_fast64_t::do_not_access_from_cpp
ATOMIC_INT_FAST64_T_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Definition: c11_atomics_compat.hpp:364
atomic_schar
Type with the same alignment and size as atomic_schar
Definition: c11_atomics_compat.hpp:70
atomic_uintptr_t
Type with the same alignment and size as atomic_uintptr_t
Definition: c11_atomics_compat.hpp:394
atomic_uint_fast8_t::do_not_access_from_cpp
ATOMIC_UINT_FAST8_T_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Definition: c11_atomics_compat.hpp:304
atomic_uint_fast8_t
Type with the same alignment and size as atomic_uint_fast8_t
Definition: c11_atomics_compat.hpp:298
atomic_uint_fast16_t::do_not_access_from_cpp
ATOMIC_UINT_FAST16_T_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Definition: c11_atomics_compat.hpp:328
atomic_uint::do_not_access_from_cpp
ATOMIC_UINT_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Definition: c11_atomics_compat.hpp:136
atomic_int_least8_t
Type with the same alignment and size as atomic_int_least8_t
Definition: c11_atomics_compat.hpp:190
atomic_long
Type with the same alignment and size as atomic_long
Definition: c11_atomics_compat.hpp:142
atomic_bool::do_not_access_from_cpp
ATOMIC_BOOL_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Definition: c11_atomics_compat.hpp:52
atomic_char
Type with the same alignment and size as atomic_char
Definition: c11_atomics_compat.hpp:58
atomic_uchar
Type with the same alignment and size as atomic_uchar
Definition: c11_atomics_compat.hpp:82
atomic_intptr_t::do_not_access_from_cpp
ATOMIC_INTPTR_T_SAME_SIZED_TYPE do_not_access_from_cpp
Opaque content placeholder.
Definition: c11_atomics_compat.hpp:388