15#if __STDC_VERSION__ >= 201112L
26 v = atomic_load_explicit(a, (
int)mo);
35 atomic_store_explicit(a, v, (
int)mo);
45 o = atomic_load_explicit(a, memory_order_acquire);
58 o = atomic_exchange_explicit(a, v, memory_order_acq_rel);
74 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(a, &o, v,
76 memory_order_consume);
98 o = atomic_load_explicit(a, memory_order_consume);
100 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
102 memory_order_acq_rel,
103 memory_order_consume);
111 }
while (rc !=
XWOK);
128 o = atomic_load_explicit(a, memory_order_consume);
130 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
132 memory_order_acq_rel,
133 memory_order_consume);
141 }
while (rc !=
XWOK);
158 o = atomic_load_explicit(a, memory_order_consume);
160 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
162 memory_order_acq_rel,
163 memory_order_consume);
171 }
while (rc !=
XWOK);
188 o = atomic_load_explicit(a, memory_order_consume);
190 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
192 memory_order_acq_rel,
193 memory_order_consume);
201 }
while (rc !=
XWOK);
218 o = atomic_load_explicit(a, memory_order_consume);
220 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
222 memory_order_acq_rel,
223 memory_order_consume);
231 }
while (rc !=
XWOK);
248 o = atomic_load_explicit(a, memory_order_consume);
249 if ((o > l) && (o < r)) {
250 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
252 memory_order_acq_rel,
253 memory_order_consume);
261 }
while (rc !=
XWOK);
278 o = atomic_load_explicit(a, memory_order_consume);
279 if ((o >= l) && (o < r)) {
280 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
282 memory_order_acq_rel,
283 memory_order_consume);
291 }
while (rc !=
XWOK);
308 o = atomic_load_explicit(a, memory_order_consume);
309 if ((o > l) && (o <= r)) {
310 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
312 memory_order_acq_rel,
313 memory_order_consume);
321 }
while (rc !=
XWOK);
338 o = atomic_load_explicit(a, memory_order_consume);
339 if ((o >= l) && (o <= r)) {
340 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
342 memory_order_acq_rel,
343 memory_order_consume);
351 }
while (rc !=
XWOK);
366 o = atomic_fetch_add_explicit(a, v, memory_order_acq_rel);
387 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
389 memory_order_acq_rel,
390 memory_order_consume);
417 o = atomic_load_explicit(a, memory_order_consume);
420 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
422 memory_order_acq_rel,
423 memory_order_consume);
432 }
while (rc !=
XWOK);
453 o = atomic_load_explicit(a, memory_order_consume);
456 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
458 memory_order_acq_rel,
459 memory_order_consume);
468 }
while (rc !=
XWOK);
489 o = atomic_load_explicit(a, memory_order_consume);
492 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
494 memory_order_acq_rel,
495 memory_order_consume);
504 }
while (rc !=
XWOK);
525 o = atomic_load_explicit(a, memory_order_consume);
528 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
530 memory_order_acq_rel,
531 memory_order_consume);
540 }
while (rc !=
XWOK);
561 o = atomic_load_explicit(a, memory_order_consume);
564 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
566 memory_order_acq_rel,
567 memory_order_consume);
576 }
while (rc !=
XWOK);
597 o = atomic_load_explicit(a, memory_order_consume);
598 if ((o > l) && (o < r)) {
600 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
602 memory_order_acq_rel,
603 memory_order_consume);
612 }
while (rc !=
XWOK);
633 o = atomic_load_explicit(a, memory_order_consume);
634 if ((o >= l) && (o < r)) {
636 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
638 memory_order_acq_rel,
639 memory_order_consume);
648 }
while (rc !=
XWOK);
669 o = atomic_load_explicit(a, memory_order_consume);
670 if ((o > l) && (o <= r)) {
672 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
674 memory_order_acq_rel,
675 memory_order_consume);
684 }
while (rc !=
XWOK);
705 o = atomic_load_explicit(a, memory_order_consume);
706 if ((o >= l) && (o <= r)) {
708 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
710 memory_order_acq_rel,
711 memory_order_consume);
720 }
while (rc !=
XWOK);
738 o = atomic_fetch_sub_explicit(a, v, memory_order_acq_rel);
759 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
761 memory_order_acq_rel,
762 memory_order_consume);
789 o = atomic_load_explicit(a, memory_order_consume);
792 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
794 memory_order_acq_rel,
795 memory_order_consume);
804 }
while (rc !=
XWOK);
825 o = atomic_load_explicit(a, memory_order_consume);
828 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
830 memory_order_acq_rel,
831 memory_order_consume);
840 }
while (rc !=
XWOK);
861 o = atomic_load_explicit(a, memory_order_consume);
864 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
866 memory_order_acq_rel,
867 memory_order_consume);
876 }
while (rc !=
XWOK);
897 o = atomic_load_explicit(a, memory_order_consume);
900 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
902 memory_order_acq_rel,
903 memory_order_consume);
912 }
while (rc !=
XWOK);
933 o = atomic_load_explicit(a, memory_order_consume);
936 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
938 memory_order_acq_rel,
939 memory_order_consume);
948 }
while (rc !=
XWOK);
969 o = atomic_load_explicit(a, memory_order_consume);
970 if ((o > l) && (o < r)) {
972 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
974 memory_order_acq_rel,
975 memory_order_consume);
984 }
while (rc !=
XWOK);
1005 o = atomic_load_explicit(a, memory_order_consume);
1006 if ((o >= l) && (o < r)) {
1008 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
1010 memory_order_acq_rel,
1011 memory_order_consume);
1020 }
while (rc !=
XWOK);
1041 o = atomic_load_explicit(a, memory_order_consume);
1042 if ((o > l) && (o <= r)) {
1044 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
1046 memory_order_acq_rel,
1047 memory_order_consume);
1056 }
while (rc !=
XWOK);
1077 o = atomic_load_explicit(a, memory_order_consume);
1078 if ((o >= l) && (o <= r)) {
1080 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
1082 memory_order_acq_rel,
1083 memory_order_consume);
1092 }
while (rc !=
XWOK);
1113 o = atomic_load_explicit(a, memory_order_relaxed);
1115 r = atomic_compare_exchange_strong_explicit(
1117 memory_order_acq_rel,
1118 memory_order_relaxed);
1139 o = atomic_load_explicit(a, memory_order_consume);
1142 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
1144 memory_order_acq_rel,
1145 memory_order_consume);
1154 }
while (rc !=
XWOK);
1175 o = atomic_load_explicit(a, memory_order_consume);
1178 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
1180 memory_order_acq_rel,
1181 memory_order_consume);
1190 }
while (rc !=
XWOK);
1211 o = atomic_load_explicit(a, memory_order_consume);
1214 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
1216 memory_order_acq_rel,
1217 memory_order_consume);
1226 }
while (rc !=
XWOK);
1247 o = atomic_load_explicit(a, memory_order_consume);
1250 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
1252 memory_order_acq_rel,
1253 memory_order_consume);
1262 }
while (rc !=
XWOK);
1283 o = atomic_load_explicit(a, memory_order_consume);
1286 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
1288 memory_order_acq_rel,
1289 memory_order_consume);
1298 }
while (rc !=
XWOK);
1319 o = atomic_load_explicit(a, memory_order_consume);
1322 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
1324 memory_order_acq_rel,
1325 memory_order_consume);
1334 }
while (rc !=
XWOK);
1355 o = atomic_load_explicit(a, memory_order_consume);
1356 if ((o > l) && (o < r)) {
1358 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
1360 memory_order_acq_rel,
1361 memory_order_consume);
1370 }
while (rc !=
XWOK);
1391 o = atomic_load_explicit(a, memory_order_consume);
1392 if ((o >= l) && (o < r)) {
1394 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
1396 memory_order_acq_rel,
1397 memory_order_consume);
1406 }
while (rc !=
XWOK);
1427 o = atomic_load_explicit(a, memory_order_consume);
1428 if ((o > l) && (o <= r)) {
1430 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
1432 memory_order_acq_rel,
1433 memory_order_consume);
1442 }
while (rc !=
XWOK);
1463 o = atomic_load_explicit(a, memory_order_consume);
1464 if ((o >= l) && (o <= r)) {
1466 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
1468 memory_order_acq_rel,
1469 memory_order_consume);
1478 }
while (rc !=
XWOK);
1496 o = atomic_fetch_or_explicit(a, v, memory_order_acq_rel);
1512 o = atomic_fetch_and_explicit(a, v, memory_order_acq_rel);
1528 o = atomic_fetch_xor_explicit(a, v, memory_order_acq_rel);
1544 o = atomic_fetch_and_explicit(a, ~m, memory_order_acq_rel);
1563 o = atomic_load_explicit(a, memory_order_consume);
1566 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
1568 memory_order_acq_rel,
1569 memory_order_consume);
1578 }
while (rc !=
XWOK);
1598 o = atomic_load_explicit(a, memory_order_consume);
1601 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
1603 memory_order_acq_rel,
1604 memory_order_consume);
1613 }
while (rc !=
XWOK);
1633 o = atomic_load_explicit(a, memory_order_consume);
1636 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
1638 memory_order_acq_rel,
1639 memory_order_consume);
1648 }
while (rc !=
XWOK);
1668 o = atomic_load_explicit(a, memory_order_consume);
1671 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
1673 memory_order_acq_rel,
1674 memory_order_consume);
1683 }
while (rc !=
XWOK);
1705 o = atomic_load_explicit(a, memory_order_consume);
1707 rc = tst((
const void *)&o, tst_args);
1710 op(&n, (
const void *)&o, op_args);
1711 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
1713 memory_order_acq_rel,
1714 memory_order_consume);
1725 op(&n, (
const void *)&o, op_args);
1726 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
1728 memory_order_acq_rel,
1729 memory_order_consume);
#define EACCES
Permission denied
__xwcc_atomic xwu8_t atomic_xwu8_t
xwaop_memory_order_em
原子操作内存模型
xwer_t(* xwaop_tst_f)(const void *, void *)
原子变量测试函数指针类型
void(* xwaop_op_f)(void *, const void *, void *)
原子变量操作函数指针类型