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(a, &o, n,
388 memory_order_acq_rel,
389 memory_order_consume);
416 o = atomic_load_explicit(a, memory_order_consume);
419 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
421 memory_order_acq_rel,
422 memory_order_consume);
431 }
while (rc !=
XWOK);
452 o = atomic_load_explicit(a, memory_order_consume);
455 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
457 memory_order_acq_rel,
458 memory_order_consume);
467 }
while (rc !=
XWOK);
488 o = atomic_load_explicit(a, memory_order_consume);
491 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
493 memory_order_acq_rel,
494 memory_order_consume);
503 }
while (rc !=
XWOK);
524 o = atomic_load_explicit(a, memory_order_consume);
527 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
529 memory_order_acq_rel,
530 memory_order_consume);
539 }
while (rc !=
XWOK);
560 o = atomic_load_explicit(a, memory_order_consume);
563 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
565 memory_order_acq_rel,
566 memory_order_consume);
575 }
while (rc !=
XWOK);
596 o = atomic_load_explicit(a, memory_order_consume);
597 if ((o > l) && (o < r)) {
599 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
601 memory_order_acq_rel,
602 memory_order_consume);
611 }
while (rc !=
XWOK);
632 o = atomic_load_explicit(a, memory_order_consume);
633 if ((o >= l) && (o < r)) {
635 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
637 memory_order_acq_rel,
638 memory_order_consume);
647 }
while (rc !=
XWOK);
668 o = atomic_load_explicit(a, memory_order_consume);
669 if ((o > l) && (o <= r)) {
671 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
673 memory_order_acq_rel,
674 memory_order_consume);
683 }
while (rc !=
XWOK);
704 o = atomic_load_explicit(a, memory_order_consume);
705 if ((o >= l) && (o <= r)) {
707 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
709 memory_order_acq_rel,
710 memory_order_consume);
719 }
while (rc !=
XWOK);
737 o = atomic_fetch_sub_explicit(a, v, memory_order_acq_rel);
758 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
760 memory_order_acq_rel,
761 memory_order_consume);
788 o = atomic_load_explicit(a, memory_order_consume);
791 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
793 memory_order_acq_rel,
794 memory_order_consume);
803 }
while (rc !=
XWOK);
824 o = atomic_load_explicit(a, memory_order_consume);
827 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
829 memory_order_acq_rel,
830 memory_order_consume);
839 }
while (rc !=
XWOK);
860 o = atomic_load_explicit(a, memory_order_consume);
863 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
865 memory_order_acq_rel,
866 memory_order_consume);
875 }
while (rc !=
XWOK);
896 o = atomic_load_explicit(a, memory_order_consume);
899 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
901 memory_order_acq_rel,
902 memory_order_consume);
911 }
while (rc !=
XWOK);
932 o = atomic_load_explicit(a, memory_order_consume);
935 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
937 memory_order_acq_rel,
938 memory_order_consume);
947 }
while (rc !=
XWOK);
968 o = atomic_load_explicit(a, memory_order_consume);
969 if ((o > l) && (o < r)) {
971 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
973 memory_order_acq_rel,
974 memory_order_consume);
983 }
while (rc !=
XWOK);
1004 o = atomic_load_explicit(a, memory_order_consume);
1005 if ((o >= l) && (o < r)) {
1007 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
1009 memory_order_acq_rel,
1010 memory_order_consume);
1019 }
while (rc !=
XWOK);
1040 o = atomic_load_explicit(a, memory_order_consume);
1041 if ((o > l) && (o <= r)) {
1043 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
1045 memory_order_acq_rel,
1046 memory_order_consume);
1055 }
while (rc !=
XWOK);
1076 o = atomic_load_explicit(a, memory_order_consume);
1077 if ((o >= l) && (o <= r)) {
1079 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
1081 memory_order_acq_rel,
1082 memory_order_consume);
1091 }
while (rc !=
XWOK);
1112 o = atomic_load_explicit(a, memory_order_relaxed);
1114 r = atomic_compare_exchange_strong_explicit(
1116 memory_order_acq_rel,
1117 memory_order_relaxed);
1138 o = atomic_load_explicit(a, memory_order_consume);
1141 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
1143 memory_order_acq_rel,
1144 memory_order_consume);
1153 }
while (rc !=
XWOK);
1174 o = atomic_load_explicit(a, memory_order_consume);
1177 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
1179 memory_order_acq_rel,
1180 memory_order_consume);
1189 }
while (rc !=
XWOK);
1210 o = atomic_load_explicit(a, memory_order_consume);
1213 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
1215 memory_order_acq_rel,
1216 memory_order_consume);
1225 }
while (rc !=
XWOK);
1246 o = atomic_load_explicit(a, memory_order_consume);
1249 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
1251 memory_order_acq_rel,
1252 memory_order_consume);
1261 }
while (rc !=
XWOK);
1282 o = atomic_load_explicit(a, memory_order_consume);
1285 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
1287 memory_order_acq_rel,
1288 memory_order_consume);
1297 }
while (rc !=
XWOK);
1318 o = atomic_load_explicit(a, memory_order_consume);
1321 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
1323 memory_order_acq_rel,
1324 memory_order_consume);
1333 }
while (rc !=
XWOK);
1354 o = atomic_load_explicit(a, memory_order_consume);
1355 if ((o > l) && (o < r)) {
1357 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
1359 memory_order_acq_rel,
1360 memory_order_consume);
1369 }
while (rc !=
XWOK);
1390 o = atomic_load_explicit(a, memory_order_consume);
1391 if ((o >= l) && (o < r)) {
1393 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
1395 memory_order_acq_rel,
1396 memory_order_consume);
1405 }
while (rc !=
XWOK);
1426 o = atomic_load_explicit(a, memory_order_consume);
1427 if ((o > l) && (o <= r)) {
1429 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
1431 memory_order_acq_rel,
1432 memory_order_consume);
1441 }
while (rc !=
XWOK);
1462 o = atomic_load_explicit(a, memory_order_consume);
1463 if ((o >= l) && (o <= r)) {
1465 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
1467 memory_order_acq_rel,
1468 memory_order_consume);
1477 }
while (rc !=
XWOK);
1495 o = atomic_fetch_or_explicit(a, v, memory_order_acq_rel);
1511 o = atomic_fetch_and_explicit(a, v, memory_order_acq_rel);
1527 o = atomic_fetch_xor_explicit(a, v, memory_order_acq_rel);
1548 o = atomic_load_explicit(a, memory_order_consume);
1550 rc = tst((
const void *)&o, tst_args);
1553 op(&n, (
const void *)&o, op_args);
1554 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
1556 memory_order_acq_rel,
1557 memory_order_consume);
1568 op(&n, (
const void *)&o, op_args);
1569 rc = (
xwer_t)atomic_compare_exchange_strong_explicit(
1571 memory_order_acq_rel,
1572 memory_order_consume);
#define EACCES
Permission denied
xwaop_memory_order_em
原子操作内存模型
xwer_t(* xwaop_tst_f)(const void *, void *)
原子变量测试函数指针类型
__xwcc_atomic xws8_t atomic_xws8_t
void(* xwaop_op_f)(void *, const void *, void *)
原子变量操作函数指针类型