XWOS API  4.0
XWOS C/C++ API参考手册
载入中...
搜索中...
未找到
xwaop.h
浏览该文件的文档.
1
13#ifndef __xwos_lib_xwaop_h__
14#define __xwos_lib_xwaop_h__
15
16#include <xwos/standard.h>
17#include <xwos/lib/xwbop.h>
18
25#include <xwos/ospl/soc/xwaop.h>
26
35#define xwmoaop(type, op, a, memorder, ...) \
36 xwaop__##type##__##op(a, memorder, ##__VA_ARGS__)
37
45#define xwaop_load(type, a, memorder) \
46 xwmoaop(type, load, (a), memorder)
47
56#define xwaop_store(type, a, memorder, v) \
57 xwmoaop(type, store, (a), memorder, (v))
58
66#define xwaop(type, op, a, ...) \
67 xwaop__##type##__##op(a, ##__VA_ARGS__)
68
77#define xwaop_read(type, a, ov) \
78 xwaop(type, read, (a), (ov))
79
91#define xwaop_write(type, a, v, ov) \
92 xwaop(type, write, (a), (v), (ov))
93
113#define xwaop_teq_then_write(type, a, t, v, ov) \
114 xwaop(type, teq_then_write, (a), (t), (v), (ov))
115
135#define xwaop_tne_then_write(type, a, t, v, ov) \
136 xwaop(type, tne_then_write, (a), (t), (v), (ov))
137
157#define xwaop_tgt_then_write(type, a, t, v, ov) \
158 xwaop(type, tgt_then_write, (a), (t), (v), (ov))
159
179#define xwaop_tge_then_write(type, a, t, v, ov) \
180 xwaop(type, tge_then_write, (a), (t), (v), (ov))
181
201#define xwaop_tlt_then_write(type, a, t, v, ov) \
202 xwaop(type, tlt_then_write, (a), (t), (v), (ov))
203
223#define xwaop_tle_then_write(type, a, t, v, ov) \
224 xwaop(type, tle_then_write, (a), (t), (v), (ov))
225
246#define xwaop_tgtlt_then_write(type, a, l, r, v, ov) \
247 xwaop(type, tgtlt_then_write, (a), (l), (r), (v), (ov))
248
269#define xwaop_tgelt_then_write(type, a, l, r, v, ov) \
270 xwaop(type, tgelt_then_write, (a), (l), (r), (v), (ov))
271
292#define xwaop_tgtle_then_write(type, a, l, r, v, ov) \
293 xwaop(type, tgtle_then_write, (a), (l), (r), (v), (ov))
294
315#define xwaop_tgele_then_write(type, a, l, r, v, ov) \
316 xwaop(type, tgele_then_write, (a), (l), (r), (v), (ov))
317
330#define xwaop_add(type, a, v, nv, ov) \
331 xwaop(type, add, (a), (v), (nv), (ov))
332
355#define xwaop_teq_then_add(type, a, t, v, nv, ov) \
356 xwaop(type, teq_then_add, (a), (t), (v), (nv), (ov))
357
380#define xwaop_tne_then_add(type, a, t, v, nv, ov) \
381 xwaop(type, tne_then_add, (a), (t), (v), (nv), (ov))
382
405#define xwaop_tgt_then_add(type, a, t, v, nv, ov) \
406 xwaop(type, tgt_then_add, (a), (t), (v), (nv), (ov))
407
430#define xwaop_tge_then_add(type, a, t, v, nv, ov) \
431 xwaop(type, tge_then_add, (a), (t), (v), (nv), (ov))
432
455#define xwaop_tlt_then_add(type, a, t, v, nv, ov) \
456 xwaop(type, tlt_then_add, (a), (t), (v), (nv), (ov))
457
480#define xwaop_tle_then_add(type, a, t, v, nv, ov) \
481 xwaop(type, tle_then_add, (a), (t), (v), (nv), (ov))
482
506#define xwaop_tgtlt_then_add(type, a, l, r, v, nv, ov) \
507 xwaop(type, tgtlt_then_add, (a), (l), (r), (v), (nv), (ov))
508
532#define xwaop_tgelt_then_add(type, a, l, r, v, nv, ov) \
533 xwaop(type, tgelt_then_add, (a), (l), (r), (v), (nv), (ov))
534
558#define xwaop_tgtle_then_add(type, a, l, r, v, nv, ov) \
559 xwaop(type, tgtle_then_add, (a), (l), (r), (v), (nv), (ov))
560
584#define xwaop_tgele_then_add(type, a, l, r, v, nv, ov) \
585 xwaop(type, tgele_then_add, (a), (l), (r), (v), (nv), (ov))
586
598#define xwaop_sub(type, a, v, nv, ov) \
599 xwaop(type, sub, (a), (v), (nv), (ov))
600
623#define xwaop_teq_then_sub(type, a, t, v, nv, ov) \
624 xwaop(type, teq_then_sub, (a), (t), (v), (nv), (ov))
625
648#define xwaop_tne_then_sub(type, a, t, v, nv, ov) \
649 xwaop(type, tne_then_sub, (a), (t), (v), (nv), (ov))
650
673#define xwaop_tgt_then_sub(type, a, t, v, nv, ov) \
674 xwaop(type, tgt_then_sub, (a), (t), (v), (nv), (ov))
675
698#define xwaop_tge_then_sub(type, a, t, v, nv, ov) \
699 xwaop(type, tge_then_sub, (a), (t), (v), (nv), (ov))
700
723#define xwaop_tlt_then_sub(type, a, t, v, nv, ov) \
724 xwaop(type, tlt_then_sub, (a), (t), (v), (nv), (ov))
725
748#define xwaop_tle_then_sub(type, a, t, v, nv, ov) \
749 xwaop(type, tle_then_sub, (a), (t), (v), (nv), (ov))
750
774#define xwaop_tgtlt_then_sub(type, a, l, r, v, nv, ov) \
775 xwaop(type, tgtlt_then_sub, (a), (l), (r), (v), (nv), (ov))
776
800#define xwaop_tgelt_then_sub(type, a, l, r, v, nv, ov) \
801 xwaop(type, tgelt_then_sub, (a), (l), (r), (v), (nv), (ov))
802
826#define xwaop_tgtle_then_sub(type, a, l, r, v, nv, ov) \
827 xwaop(type, tgtle_then_sub, (a), (l), (r), (v), (nv), (ov))
828
852#define xwaop_tgele_then_sub(type, a, l, r, v, nv, ov) \
853 xwaop(type, tgele_then_sub, (a), (l), (r), (v), (nv), (ov))
854
866#define xwaop_rsb(type, a, v, nv, ov) \
867 xwaop(type, rsb, (a), (v), (nv), (ov))
868
891#define xwaop_teq_then_rsb(type, a, t, v, nv, ov) \
892 xwaop(type, teq_then_rsb, (a), (t), (v), (nv), (ov))
893
916#define xwaop_tne_then_rsb(type, a, t, v, nv, ov) \
917 xwaop(type, tne_then_rsb, (a), (t), (v), (nv), (ov))
918
941#define xwaop_tgt_then_rsb(type, a, t, v, nv, ov) \
942 xwaop(type, tgt_then_rsb, (a), (t), (v), (nv), (ov))
943
966#define xwaop_tge_then_rsb(type, a, t, v, nv, ov) \
967 xwaop(type, tge_then_rsb, (a), (t), (v), (nv), (ov))
968
991#define xwaop_tlt_then_rsb(type, a, t, v, nv, ov) \
992 xwaop(type, tlt_then_rsb, (a), (t), (v), (nv), (ov))
993
1016#define xwaop_tle_then_rsb(type, a, t, v, nv, ov) \
1017 xwaop(type, tle_then_rsb, (a), (t), (v), (nv), (ov))
1018
1042#define xwaop_tgtlt_then_rsb(type, a, l, r, v, nv, ov) \
1043 xwaop(type, tgtlt_then_rsb, (a), (l), (r), (v), (nv), (ov))
1044
1068#define xwaop_tgelt_then_rsb(type, a, l, r, v, nv, ov) \
1069 xwaop(type, tgelt_then_rsb, (a), (l), (r), (v), (nv), (ov))
1070
1094#define xwaop_tgtle_then_rsb(type, a, l, r, v, nv, ov) \
1095 xwaop(type, tgtle_then_rsb, (a), (l), (r), (v), (nv), (ov))
1096
1120#define xwaop_tgele_then_rsb(type, a, l, r, v, nv, ov) \
1121 xwaop(type, tgele_then_rsb, (a), (l), (r), (v), (nv), (ov))
1122
1134#define xwaop_and(type, a, v, nv, ov) \
1135 xwaop(type, and, (a), (v), (nv), (ov))
1136
1148#define xwaop_or(type, a, v, nv, ov) \
1149 xwaop(type, or, (a), (v), (nv), (ov))
1150
1162#define xwaop_xor(type, a, v, nv, ov) \
1163 xwaop(type, xor, (a), (v), (nv), (ov))
1164
1176#define xwaop_s1m(type, a, m, nv, ov) \
1177 xwaop(type, or, (a), (m), (nv), (ov))
1178
1190#define xwaop_c0m(type, a, m, nv, ov) \
1191 xwaop(type, c0m, (a), (m), (nv), (ov))
1192
1204#define xwaop_x1m(type, a, m, nv, ov) \
1205 xwaop(type, xor, (a), (m), (nv), (ov))
1206
1207
1229#define xwaop_t1ma_then_c0m(type, a, m, nv, ov) \
1230 xwaop(type, t1ma_then_c0m, (a), (m), (nv), (ov))
1231
1253#define xwaop_t1mo_then_c0m(type, a, m, nv, ov) \
1254 xwaop(type, t1mo_then_c0m, (a), (m), (nv), (ov))
1255
1277#define xwaop_t0ma_then_s1m(type, a, m, nv, ov) \
1278 xwaop(type, t0ma_then_s1m, (a), (m), (nv), (ov))
1279
1301#define xwaop_t0mo_then_s1m(type, a, m, nv, ov) \
1302 xwaop(type, t0mo_then_s1m, (a), (m), (nv), (ov))
1303
1328#define xwaop_tst_then_op(type, a, tf, tfarg, of, ofarg, nv, ov) \
1329 xwaop(type, tst_then_op, (a), (tf), (tfarg), (of), (ofarg), (nv), (ov))
1330
1331/******** ******** load ******** ********/
1337#define DEFINE_XWAOP_LOAD(type, btype) \
1338static __xwlib_inline \
1339type xwaop__##type##__load(atomic_##type * a, \
1340 const enum xwaop_memory_order_em mo) \
1341{ \
1342 return (type)xwaop__##btype##__load((atomic_##btype *)a, mo); \
1343}
1344
1345/******** ******** store ******** ********/
1351#define DEFINE_XWAOP_STORE(type, btype) \
1352static __xwlib_inline \
1353type xwaop__##type##__store(atomic_##type * a, \
1354 const enum xwaop_memory_order_em mo, \
1355 type v) \
1356{ \
1357 return (type)xwaop__##btype##__store((atomic_##btype *)a, mo, (btype)v); \
1358}
1359
1360/******** ******** read ******** ********/
1366#define DEFINE_XWAOP_READ(type, btype) \
1367static __xwlib_inline \
1368void xwaop__##type##__read(atomic_##type * a, type * ov) \
1369{ \
1370 xwaop__##btype##__read((atomic_##btype *)a, \
1371 (btype *)ov); \
1372}
1373
1374/******** ******** write ******** ********/
1380#define DEFINE_XWAOP_WRITE(type, btype) \
1381static __xwlib_inline \
1382void xwaop__##type##__write(atomic_##type * a, type v, type * ov) \
1383{ \
1384 xwaop__##btype##__write((atomic_##btype *)a, \
1385 (btype)v, \
1386 (btype *)ov); \
1387}
1388
1394#define DEFINE_XWAOP_TEQ_THEN_WRITE(type, btype) \
1395static __xwlib_inline \
1396xwer_t xwaop__##type##__teq_then_write(atomic_##type * a, type t, type v, type * ov) \
1397{ \
1398 return xwaop__##btype##__teq_then_write((atomic_##btype *)a, \
1399 (btype)t, \
1400 (btype)v, \
1401 (btype *)ov); \
1402}
1403
1409#define DEFINE_XWAOP_TNE_THEN_WRITE(type, btype) \
1410static __xwlib_inline \
1411xwer_t xwaop__##type##__tne_then_write(atomic_##type * a, \
1412 type t, \
1413 type v, \
1414 type * ov) \
1415{ \
1416 return xwaop__##btype##__tne_then_write((atomic_##btype *)a, \
1417 (btype)t, \
1418 (btype)v, \
1419 (btype *)ov); \
1420}
1421
1427#define DEFINE_XWAOP_TGT_THEN_WRITE(type, btype) \
1428static __xwlib_inline \
1429xwer_t xwaop__##type##__tgt_then_write(atomic_##type * a, \
1430 type t, \
1431 type v, \
1432 type * ov) \
1433{ \
1434 return xwaop__##btype##__tgt_then_write((atomic_##btype *)a, \
1435 (btype)t, \
1436 (btype)v, \
1437 (btype *)ov); \
1438}
1439
1445#define DEFINE_XWAOP_TGE_THEN_WRITE(type, btype) \
1446static __xwlib_inline \
1447xwer_t xwaop__##type##__tge_then_write(atomic_##type * a, \
1448 type t, \
1449 type v, \
1450 type * ov) \
1451{ \
1452 return xwaop__##btype##__tge_then_write((atomic_##btype *)a, \
1453 (btype)t, \
1454 (btype)v, \
1455 (btype *)ov); \
1456}
1457
1463#define DEFINE_XWAOP_TLT_THEN_WRITE(type, btype) \
1464static __xwlib_inline \
1465xwer_t xwaop__##type##__tlt_then_write(atomic_##type * a, \
1466 type t, \
1467 type v, \
1468 type * ov) \
1469{ \
1470 return xwaop__##btype##__tlt_then_write((atomic_##btype *)a, \
1471 (btype)t, \
1472 (btype)v, \
1473 (btype *)ov); \
1474}
1475
1481#define DEFINE_XWAOP_TLE_THEN_WRITE(type, btype) \
1482static __xwlib_inline \
1483xwer_t xwaop__##type##__tle_then_write(atomic_##type * a, \
1484 type t, \
1485 type v, \
1486 type * ov) \
1487{ \
1488 return xwaop__##btype##__tle_then_write((atomic_##btype *)a, \
1489 (btype)t, \
1490 (btype)v, \
1491 (btype *)ov); \
1492}
1493
1499#define DEFINE_XWAOP_TGTLT_THEN_WRITE(type, btype) \
1500static __xwlib_inline \
1501xwer_t xwaop__##type##__tgtlt_then_write(atomic_##type * a, \
1502 type l, type r, \
1503 type v, \
1504 type * ov) \
1505{ \
1506 return xwaop__##btype##__tgtlt_then_write((atomic_##btype *)a, \
1507 (btype)l, (btype)r, \
1508 (btype)v, \
1509 (btype *)ov); \
1510}
1511
1517#define DEFINE_XWAOP_TGELT_THEN_WRITE(type, btype) \
1518static __xwlib_inline \
1519xwer_t xwaop__##type##__tgelt_then_write(atomic_##type * a, \
1520 type l, type r, \
1521 type v, \
1522 type * ov) \
1523{ \
1524 return xwaop__##btype##__tgelt_then_write((atomic_##btype *)a, \
1525 (btype)l, (btype)r, \
1526 (btype)v, \
1527 (btype *)ov); \
1528}
1529
1535#define DEFINE_XWAOP_TGTLE_THEN_WRITE(type, btype) \
1536static __xwlib_inline \
1537xwer_t xwaop__##type##__tgtle_then_write(atomic_##type * a, \
1538 type l, type r, \
1539 type v, \
1540 type * ov) \
1541{ \
1542 return xwaop__##btype##__tgtle_then_write((atomic_##btype *)a, \
1543 (btype)l, (btype)r, \
1544 (btype)v, \
1545 (btype *)ov); \
1546}
1547
1553#define DEFINE_XWAOP_TGELE_THEN_WRITE(type, btype) \
1554static __xwlib_inline \
1555xwer_t xwaop__##type##__tgele_then_write(atomic_##type * a, \
1556 type l, type r, \
1557 type v, \
1558 type * ov) \
1559{ \
1560 return xwaop__##btype##__tgele_then_write((atomic_##btype *)a, \
1561 (btype)l, (btype)r, \
1562 (btype)v, \
1563 (btype *)ov); \
1564}
1565
1566/******** ******** add ******** ********/
1572#define DEFINE_XWAOP_ADD(type, btype) \
1573static __xwlib_inline \
1574void xwaop__##type##__add(atomic_##type * a, \
1575 type v, \
1576 type * nv, type * ov) \
1577{ \
1578 xwaop__##btype##__add((atomic_##btype *)a, \
1579 (btype)v, \
1580 (btype *)nv, (btype *)ov); \
1581}
1582
1588#define DEFINE_XWAOP_TEQ_THEN_ADD(type, btype) \
1589static __xwlib_inline \
1590xwer_t xwaop__##type##__teq_then_add(atomic_##type * a, \
1591 type t, \
1592 type v, \
1593 type * nv, type * ov) \
1594{ \
1595 return xwaop__##btype##__teq_then_add((atomic_##btype *)a, \
1596 (btype)t, (btype)v, \
1597 (btype *)nv, (btype *)ov); \
1598}
1599
1605#define DEFINE_XWAOP_TNE_THEN_ADD(type, btype) \
1606static __xwlib_inline \
1607xwer_t xwaop__##type##__tne_then_add(atomic_##type * a, \
1608 type t, \
1609 type v, \
1610 type * nv, type * ov) \
1611{ \
1612 return xwaop__##btype##__tne_then_add((atomic_##btype *)a, \
1613 (btype)t, \
1614 (btype)v, \
1615 (btype *)nv, (btype *)ov); \
1616}
1617
1623#define DEFINE_XWAOP_TGT_THEN_ADD(type, btype) \
1624static __xwlib_inline \
1625xwer_t xwaop__##type##__tgt_then_add(atomic_##type * a, \
1626 type t, \
1627 type v, \
1628 type * nv, type * ov) \
1629{ \
1630 return xwaop__##btype##__tgt_then_add((atomic_##btype *)a, \
1631 (btype)t, \
1632 (btype)v, \
1633 (btype *)nv, (btype *)ov); \
1634}
1635
1641#define DEFINE_XWAOP_TGE_THEN_ADD(type, btype) \
1642static __xwlib_inline \
1643xwer_t xwaop__##type##__tge_then_add(atomic_##type * a, \
1644 type t, \
1645 type v, \
1646 type * nv, type * ov) \
1647{ \
1648 return xwaop__##btype##__tge_then_add((atomic_##btype *)a, \
1649 (btype)t, \
1650 (btype)v, \
1651 (btype *)nv, (btype *)ov); \
1652}
1653
1659#define DEFINE_XWAOP_TLT_THEN_ADD(type, btype) \
1660static __xwlib_inline \
1661xwer_t xwaop__##type##__tlt_then_add(atomic_##type * a, \
1662 type t, \
1663 type v, \
1664 type * nv, type * ov) \
1665{ \
1666 return xwaop__##btype##__tlt_then_add((atomic_##btype *)a, \
1667 (btype)t, \
1668 (btype)v, \
1669 (btype *)nv, (btype *)ov); \
1670}
1671
1677#define DEFINE_XWAOP_TLE_THEN_ADD(type, btype) \
1678static __xwlib_inline \
1679xwer_t xwaop__##type##__tle_then_add(atomic_##type * a, \
1680 type t, \
1681 type v, \
1682 type * nv, type * ov) \
1683{ \
1684 return xwaop__##btype##__tle_then_add((atomic_##btype *)a, \
1685 (btype)t, \
1686 (btype)v, \
1687 (btype *)nv, (btype *)ov); \
1688}
1689
1695#define DEFINE_XWAOP_TGTLT_THEN_ADD(type, btype) \
1696static __xwlib_inline \
1697xwer_t xwaop__##type##__tgtlt_then_add(atomic_##type * a, \
1698 type l, type r, \
1699 type v, \
1700 type * nv, type * ov) \
1701{ \
1702 return xwaop__##btype##__tgtlt_then_add((atomic_##btype *)a, \
1703 (btype)l, (btype)r, \
1704 (btype)v, \
1705 (btype *)nv, (btype *)ov); \
1706}
1707
1713#define DEFINE_XWAOP_TGELT_THEN_ADD(type, btype) \
1714static __xwlib_inline \
1715xwer_t xwaop__##type##__tgelt_then_add(atomic_##type * a, \
1716 type l, type r, \
1717 type v, \
1718 type * nv, type * ov) \
1719{ \
1720 return xwaop__##btype##__tgelt_then_add((atomic_##btype *)a, \
1721 (btype)l, (btype)r, \
1722 (btype)v, \
1723 (btype *)nv, (btype *)ov); \
1724}
1725
1731#define DEFINE_XWAOP_TGTLE_THEN_ADD(type, btype) \
1732static __xwlib_inline \
1733xwer_t xwaop__##type##__tgtle_then_add(atomic_##type * a, \
1734 type l, type r, \
1735 type v, \
1736 type * nv, type * ov) \
1737{ \
1738 return xwaop__##btype##__tgtle_then_add((atomic_##btype *)a, \
1739 (btype)l, (btype)r, \
1740 (btype)v, \
1741 (btype *)nv, (btype *)ov); \
1742}
1743
1749#define DEFINE_XWAOP_TGELE_THEN_ADD(type, btype) \
1750static __xwlib_inline \
1751xwer_t xwaop__##type##__tgele_then_add(atomic_##type * a, \
1752 type l, type r, \
1753 type v, \
1754 type * nv, type * ov) \
1755{ \
1756 return xwaop__##btype##__tgele_then_add((atomic_##btype *)a, \
1757 (btype)l, (btype)r, \
1758 (btype)v, \
1759 (btype *)nv, (btype *)ov); \
1760}
1761
1762/******** ******** subtract ******** ********/
1768#define DEFINE_XWAOP_SUB(type, btype) \
1769static __xwlib_inline \
1770void xwaop__##type##__sub(atomic_##type * a, \
1771 type v, \
1772 type * nv, type * ov) \
1773{ \
1774 xwaop__##btype##__sub((atomic_##btype *)a, \
1775 (btype)v, \
1776 (btype *)nv, (btype *)ov); \
1777}
1778
1784#define DEFINE_XWAOP_TEQ_THEN_SUB(type, btype) \
1785static __xwlib_inline \
1786xwer_t xwaop__##type##__teq_then_sub(atomic_##type * a, \
1787 type t, \
1788 type v, \
1789 type * nv, type * ov) \
1790{ \
1791 return xwaop__##btype##__teq_then_sub((atomic_##btype *)a, \
1792 (btype)t, \
1793 (btype)v, \
1794 (btype *)nv, (btype *)ov); \
1795}
1796
1802#define DEFINE_XWAOP_TNE_THEN_SUB(type, btype) \
1803static __xwlib_inline \
1804xwer_t xwaop__##type##__tne_then_sub(atomic_##type * a, \
1805 type t, \
1806 type v, \
1807 type * nv, type * ov) \
1808{ \
1809 return xwaop__##btype##__tne_then_sub((atomic_##btype *)a, \
1810 (btype)t, \
1811 (btype)v, \
1812 (btype *)nv, (btype *)ov); \
1813}
1814
1820#define DEFINE_XWAOP_TGT_THEN_SUB(type, btype) \
1821static __xwlib_inline \
1822xwer_t xwaop__##type##__tgt_then_sub(atomic_##type * a, \
1823 type t, \
1824 type v, \
1825 type * nv, type * ov) \
1826{ \
1827 return xwaop__##btype##__tgt_then_sub((atomic_##btype *)a, \
1828 (btype)t, \
1829 (btype)v, \
1830 (btype *)nv, (btype *)ov); \
1831}
1832
1838#define DEFINE_XWAOP_TGE_THEN_SUB(type, btype) \
1839static __xwlib_inline \
1840xwer_t xwaop__##type##__tge_then_sub(atomic_##type * a, \
1841 type t, \
1842 type v, \
1843 type * nv, type * ov) \
1844{ \
1845 return xwaop__##btype##__tge_then_sub((atomic_##btype *)a, \
1846 (btype)t, \
1847 (btype)v, \
1848 (btype *)nv, (btype *)ov); \
1849}
1850
1856#define DEFINE_XWAOP_TLT_THEN_SUB(type, btype) \
1857static __xwlib_inline \
1858xwer_t xwaop__##type##__tlt_then_sub(atomic_##type * a, \
1859 type t, \
1860 type v, \
1861 type * nv, type * ov) \
1862{ \
1863 return xwaop__##btype##__tlt_then_sub((atomic_##btype *)a, \
1864 (btype)t, \
1865 (btype)v, \
1866 (btype *)nv, (btype *)ov); \
1867}
1868
1874#define DEFINE_XWAOP_TLE_THEN_SUB(type, btype) \
1875static __xwlib_inline \
1876xwer_t xwaop__##type##__tle_then_sub(atomic_##type * a, \
1877 type t, \
1878 type v, \
1879 type * nv, type * ov) \
1880{ \
1881 return xwaop__##btype##__tle_then_sub((atomic_##btype *)a, \
1882 (btype)t, \
1883 (btype)v, \
1884 (btype *)nv, (btype *)ov); \
1885}
1886
1892#define DEFINE_XWAOP_TGTLT_THEN_SUB(type, btype) \
1893static __xwlib_inline \
1894xwer_t xwaop__##type##__tgtlt_then_sub(atomic_##type * a, \
1895 type l, type r, \
1896 type v, \
1897 type * nv, type * ov) \
1898{ \
1899 return xwaop__##btype##__tgtlt_then_sub((atomic_##btype *)a, \
1900 (btype)l, (btype)r, \
1901 (btype)v, \
1902 (btype *)nv, (btype *)ov); \
1903}
1904
1910#define DEFINE_XWAOP_TGELT_THEN_SUB(type, btype) \
1911static __xwlib_inline \
1912xwer_t xwaop__##type##__tgelt_then_sub(atomic_##type * a, \
1913 type l, type r, \
1914 type v, \
1915 type * nv, type * ov) \
1916{ \
1917 return xwaop__##btype##__tgelt_then_sub((atomic_##btype *)a, \
1918 (btype)l, (btype)r, \
1919 (btype)v, \
1920 (btype *)nv, (btype *)ov); \
1921}
1922
1928#define DEFINE_XWAOP_TGTLE_THEN_SUB(type, btype) \
1929static __xwlib_inline \
1930xwer_t xwaop__##type##__tgtle_then_sub(atomic_##type * a, \
1931 type l, type r, \
1932 type v, \
1933 type * nv, type * ov) \
1934{ \
1935 return xwaop__##btype##__tgtle_then_sub((atomic_##btype *)a, \
1936 (btype)l, (btype)r, \
1937 (btype)v, \
1938 (btype *)nv, (btype *)ov); \
1939}
1940
1946#define DEFINE_XWAOP_TGELE_THEN_SUB(type, btype) \
1947static __xwlib_inline \
1948xwer_t xwaop__##type##__tgele_then_sub(atomic_##type * a, \
1949 type l, type r, \
1950 type v, \
1951 type * nv, type * ov) \
1952{ \
1953 return xwaop__##btype##__tgele_then_sub((atomic_##btype *)a, \
1954 (btype)l, (btype)r, \
1955 (btype)v, \
1956 (btype *)nv, (btype *)ov); \
1957}
1958
1959/******** ******** reverse subtract ******** ********/
1965#define DEFINE_XWAOP_RSB(type, btype) \
1966static __xwlib_inline \
1967void xwaop__##type##__rsb(atomic_##type * a, \
1968 type v, \
1969 type * nv, type * ov) \
1970{ \
1971 xwaop__##btype##__rsb((atomic_##btype *)a, \
1972 (btype)v, \
1973 (btype *)nv, (btype *)ov); \
1974}
1975
1981#define DEFINE_XWAOP_TEQ_THEN_RSB(type, btype) \
1982static __xwlib_inline \
1983xwer_t xwaop__##type##__teq_then_rsb(atomic_##type * a, \
1984 type t, \
1985 type v, \
1986 type * nv, type * ov) \
1987{ \
1988 return xwaop__##btype##__teq_then_rsb((atomic_##btype *)a, \
1989 (btype)t, \
1990 (btype)v, \
1991 (btype *)nv, (btype *)ov); \
1992}
1993
1999#define DEFINE_XWAOP_TNE_THEN_RSB(type, btype) \
2000static __xwlib_inline \
2001xwer_t xwaop__##type##__tne_then_rsb(atomic_##type * a, \
2002 type t, \
2003 type v, \
2004 type * nv, type * ov) \
2005{ \
2006 return xwaop__##btype##__tne_then_rsb((atomic_##btype *)a, \
2007 (btype)t, \
2008 (btype)v, \
2009 (btype *)nv, (btype *)ov); \
2010}
2011
2017#define DEFINE_XWAOP_TGT_THEN_RSB(type, btype) \
2018static __xwlib_inline \
2019xwer_t xwaop__##type##__tgt_then_rsb(atomic_##type * a, \
2020 type t, \
2021 type v, \
2022 type * nv, type * ov) \
2023{ \
2024 return xwaop__##btype##__tgt_then_rsb((atomic_##btype *)a, \
2025 (btype)t, \
2026 (btype)v, \
2027 (btype *)nv, (btype *)ov); \
2028}
2029
2035#define DEFINE_XWAOP_TGE_THEN_RSB(type, btype) \
2036static __xwlib_inline \
2037xwer_t xwaop__##type##__tge_then_rsb(atomic_##type * a, \
2038 type t, \
2039 type v, \
2040 type * nv, type * ov) \
2041{ \
2042 return xwaop__##btype##__tge_then_rsb((atomic_##btype *)a, \
2043 (btype)t, \
2044 (btype)v, \
2045 (btype *)nv, (btype *)ov); \
2046}
2047
2053#define DEFINE_XWAOP_TLT_THEN_RSB(type, btype) \
2054static __xwlib_inline \
2055xwer_t xwaop__##type##__tlt_then_rsb(atomic_##type * a, \
2056 type t, \
2057 type v, \
2058 type * nv, type * ov) \
2059{ \
2060 return xwaop__##btype##__tlt_then_rsb((atomic_##btype *)a, \
2061 (btype)t, \
2062 (btype)v, \
2063 (btype *)nv, (btype *)ov); \
2064}
2065
2071#define DEFINE_XWAOP_TLE_THEN_RSB(type, btype) \
2072static __xwlib_inline \
2073xwer_t xwaop__##type##__tle_then_rsb(atomic_##type * a, \
2074 type t, \
2075 type v, \
2076 type * nv, type * ov) \
2077{ \
2078 return xwaop__##btype##__tle_then_rsb((atomic_##btype *)a, \
2079 (btype)t, \
2080 (btype)v, \
2081 (btype *)nv, (btype *)ov); \
2082}
2083
2089#define DEFINE_XWAOP_TGTLT_THEN_RSB(type, btype) \
2090static __xwlib_inline \
2091xwer_t xwaop__##type##__tgtlt_then_rsb(atomic_##type * a, \
2092 type l, type r, \
2093 type v, \
2094 type * nv, type * ov) \
2095{ \
2096 return xwaop__##btype##__tgtlt_then_rsb((atomic_##btype *)a, \
2097 (btype)l, (btype)r, \
2098 (btype)v, \
2099 (btype *)nv, (btype *)ov); \
2100}
2101
2107#define DEFINE_XWAOP_TGELT_THEN_RSB(type, btype) \
2108static __xwlib_inline \
2109xwer_t xwaop__##type##__tgelt_then_rsb(atomic_##type * a, \
2110 type l, type r, \
2111 type v, \
2112 type * nv, type * ov) \
2113{ \
2114 return xwaop__##btype##__tgelt_then_rsb((atomic_##btype *)a, \
2115 (btype)l, (btype)r, \
2116 (btype)v, \
2117 (btype *)nv, (btype *)ov); \
2118}
2119
2125#define DEFINE_XWAOP_TGTLE_THEN_RSB(type, btype) \
2126static __xwlib_inline \
2127xwer_t xwaop__##type##__tgtle_then_rsb(atomic_##type * a, \
2128 type l, type r, \
2129 type v, \
2130 type * nv, type * ov) \
2131{ \
2132 return xwaop__##btype##__tgtle_then_rsb((atomic_##btype *)a, \
2133 (btype)l, (btype)r, \
2134 (btype)v, \
2135 (btype *)nv, (btype *)ov); \
2136}
2137
2143#define DEFINE_XWAOP_TGELE_THEN_RSB(type, btype) \
2144static __xwlib_inline \
2145xwer_t xwaop__##type##__tgele_then_rsb(atomic_##type * a, \
2146 type l, type r, \
2147 type v, \
2148 type * nv, type * ov) \
2149{ \
2150 return xwaop__##btype##__tgele_then_rsb((atomic_##btype *)a, \
2151 (btype)l, (btype)r, \
2152 (btype)v, \
2153 (btype *)nv, (btype *)ov); \
2154}
2155
2156/******** ******** bit operations ******** ********/
2162#define DEFINE_XWAOP_OR(type, btype) \
2163static __xwlib_inline \
2164void xwaop__##type##__or(atomic_##type * a, \
2165 type v, \
2166 type * nv, type * ov) \
2167{ \
2168 xwaop__##btype##__or((atomic_##btype *)a, \
2169 (btype)v, \
2170 (btype *)nv, (btype *)ov); \
2171}
2172
2178#define DEFINE_XWAOP_AND(type, btype) \
2179static __xwlib_inline \
2180void xwaop__##type##__and(atomic_##type * a, \
2181 type v, \
2182 type * nv, type * ov) \
2183{ \
2184 xwaop__##btype##__and((atomic_##btype *)a, \
2185 (btype)v, \
2186 (btype *)nv, (btype *)ov); \
2187}
2188
2194#define DEFINE_XWAOP_XOR(type, btype) \
2195static __xwlib_inline \
2196void xwaop__##type##__xor(atomic_##type * a, \
2197 type v, \
2198 type * nv, type * ov) \
2199{ \
2200 xwaop__##btype##__xor((atomic_##btype *)a, \
2201 (btype)v, \
2202 (btype *)nv, (btype *)ov); \
2203}
2204
2210#define DEFINE_XWAOP_C0M(type, btype) \
2211static __xwlib_inline \
2212void xwaop__##type##__c0m(atomic_##type * a, \
2213 type m, \
2214 type * nv, type * ov) \
2215{ \
2216 xwaop__##btype##__c0m((atomic_##btype *)a, \
2217 (btype)m, \
2218 (btype *)nv, (btype *)ov); \
2219}
2220
2226#define DEFINE_XWAOP_T1MA_THEN_C0M(type, btype) \
2227static __xwlib_inline \
2228xwer_t xwaop__##type##__t1ma_then_c0m(atomic_##type * a, \
2229 type m, \
2230 type * nv, type * ov) \
2231{ \
2232 return xwaop__##btype##__t1ma_then_c0m((atomic_##btype *)a, \
2233 (btype)m, \
2234 (btype *)nv, (btype *)ov); \
2235}
2236
2242#define DEFINE_XWAOP_T1MO_THEN_C0M(type, btype) \
2243static __xwlib_inline \
2244xwer_t xwaop__##type##__t1mo_then_c0m(atomic_##type * a, \
2245 type m, \
2246 type * nv, type * ov) \
2247{ \
2248 return xwaop__##btype##__t1mo_then_c0m((atomic_##btype *)a, \
2249 (btype)m, \
2250 (btype *)nv, (btype *)ov); \
2251}
2252
2258#define DEFINE_XWAOP_T0MA_THEN_S1M(type, btype) \
2259static __xwlib_inline \
2260xwer_t xwaop__##type##__t0ma_then_s1m(atomic_##type * a, \
2261 type m, \
2262 type * nv, type * ov) \
2263{ \
2264 return xwaop__##btype##__t0ma_then_s1m((atomic_##btype *)a, \
2265 (btype)m, \
2266 (btype *)nv, (btype *)ov); \
2267}
2268
2274#define DEFINE_XWAOP_T0MO_THEN_S1M(type, btype) \
2275static __xwlib_inline \
2276xwer_t xwaop__##type##__t0mo_then_s1m(atomic_##type * a, \
2277 type m, \
2278 type * nv, type * ov) \
2279{ \
2280 return xwaop__##btype##__t0mo_then_s1m((atomic_##btype *)a, \
2281 (btype)m, \
2282 (btype *)nv, (btype *)ov); \
2283}
2284
2285/******** ******** test and operation ******** ********/
2291#define DEFINE_XWAOP_TST_THEN_OP(type, btype) \
2292static __xwlib_inline \
2293xwer_t xwaop__##type##__tst_then_op(atomic_##type * a, \
2294 xwaop_tst_f tst, void * tst_args, \
2295 xwaop_op_f op, void * op_args, \
2296 type * nv, type * ov) \
2297{ \
2298 return xwaop__##btype##__tst_then_op((atomic_##btype *)a, \
2299 tst, tst_args, \
2300 op, op_args, \
2301 (btype *)nv, (btype *)ov); \
2302}
2303
2309#define DEFINE_XWAOP(type, btype) \
2310 DEFINE_XWAOP_LOAD(type, btype) \
2311 DEFINE_XWAOP_STORE(type, btype) \
2312 DEFINE_XWAOP_READ(type, btype) \
2313 DEFINE_XWAOP_WRITE(type, btype) \
2314 DEFINE_XWAOP_TEQ_THEN_WRITE(type, btype) \
2315 DEFINE_XWAOP_TNE_THEN_WRITE(type, btype) \
2316 DEFINE_XWAOP_TGT_THEN_WRITE(type, btype) \
2317 DEFINE_XWAOP_TGE_THEN_WRITE(type, btype) \
2318 DEFINE_XWAOP_TLT_THEN_WRITE(type, btype) \
2319 DEFINE_XWAOP_TLE_THEN_WRITE(type, btype) \
2320 DEFINE_XWAOP_TGTLT_THEN_WRITE(type, btype) \
2321 DEFINE_XWAOP_TGELT_THEN_WRITE(type, btype) \
2322 DEFINE_XWAOP_TGTLE_THEN_WRITE(type, btype) \
2323 DEFINE_XWAOP_TGELE_THEN_WRITE(type, btype) \
2324 DEFINE_XWAOP_ADD(type, btype) \
2325 DEFINE_XWAOP_TEQ_THEN_ADD(type, btype) \
2326 DEFINE_XWAOP_TNE_THEN_ADD(type, btype) \
2327 DEFINE_XWAOP_TGT_THEN_ADD(type, btype) \
2328 DEFINE_XWAOP_TGE_THEN_ADD(type, btype) \
2329 DEFINE_XWAOP_TLT_THEN_ADD(type, btype) \
2330 DEFINE_XWAOP_TLE_THEN_ADD(type, btype) \
2331 DEFINE_XWAOP_TGTLT_THEN_ADD(type, btype) \
2332 DEFINE_XWAOP_TGELT_THEN_ADD(type, btype) \
2333 DEFINE_XWAOP_TGTLE_THEN_ADD(type, btype) \
2334 DEFINE_XWAOP_TGELE_THEN_ADD(type, btype) \
2335 DEFINE_XWAOP_SUB(type, btype) \
2336 DEFINE_XWAOP_TEQ_THEN_SUB(type, btype) \
2337 DEFINE_XWAOP_TNE_THEN_SUB(type, btype) \
2338 DEFINE_XWAOP_TGT_THEN_SUB(type, btype) \
2339 DEFINE_XWAOP_TGE_THEN_SUB(type, btype) \
2340 DEFINE_XWAOP_TLT_THEN_SUB(type, btype) \
2341 DEFINE_XWAOP_TLE_THEN_SUB(type, btype) \
2342 DEFINE_XWAOP_TGTLT_THEN_SUB(type, btype) \
2343 DEFINE_XWAOP_TGELT_THEN_SUB(type, btype) \
2344 DEFINE_XWAOP_TGTLE_THEN_SUB(type, btype) \
2345 DEFINE_XWAOP_TGELE_THEN_SUB(type, btype) \
2346 DEFINE_XWAOP_RSB(type, btype) \
2347 DEFINE_XWAOP_TEQ_THEN_RSB(type, btype) \
2348 DEFINE_XWAOP_TNE_THEN_RSB(type, btype) \
2349 DEFINE_XWAOP_TGT_THEN_RSB(type, btype) \
2350 DEFINE_XWAOP_TGE_THEN_RSB(type, btype) \
2351 DEFINE_XWAOP_TLT_THEN_RSB(type, btype) \
2352 DEFINE_XWAOP_TLE_THEN_RSB(type, btype) \
2353 DEFINE_XWAOP_TGTLT_THEN_RSB(type, btype) \
2354 DEFINE_XWAOP_TGELT_THEN_RSB(type, btype) \
2355 DEFINE_XWAOP_TGTLE_THEN_RSB(type, btype) \
2356 DEFINE_XWAOP_TGELE_THEN_RSB(type, btype) \
2357 DEFINE_XWAOP_OR(type, btype) \
2358 DEFINE_XWAOP_AND(type, btype) \
2359 DEFINE_XWAOP_XOR(type, btype) \
2360 DEFINE_XWAOP_C0M(type, btype) \
2361 DEFINE_XWAOP_T1MA_THEN_C0M(type, btype) \
2362 DEFINE_XWAOP_T1MO_THEN_C0M(type, btype) \
2363 DEFINE_XWAOP_T0MA_THEN_S1M(type, btype) \
2364 DEFINE_XWAOP_T0MO_THEN_S1M(type, btype) \
2365 DEFINE_XWAOP_TST_THEN_OP(type, btype)
2366
2367
2368#if (16 == BITS_PER_XWSZ_T)
2370#elif (32 == BITS_PER_XWSZ_T)
2372#elif (64 == BITS_PER_XWSZ_T)
2374#endif
2375
2376#if (16 == BITS_PER_XWSSZ_T)
2378#elif (32 == BITS_PER_XWSSZ_T)
2380#elif (64 == BITS_PER_XWSSZ_T)
2382#endif
2383
2384#if (16 == BITS_PER_XWPTR_T)
2387#elif (32 == BITS_PER_XWPTR_T)
2390#elif (64 == BITS_PER_XWPTR_T)
2393#endif
2394
2395#if (16 == BITS_PER_XWER_T)
2397#elif (32 == BITS_PER_XWER_T)
2399#elif (64 == BITS_PER_XWER_T)
2401#endif
2402
2403#if (8 == BITS_PER_XWID_T)
2405#elif (16 == BITS_PER_XWID_T)
2407#elif (32 == BITS_PER_XWID_T)
2409#elif (64 == BITS_PER_XWID_T)
2411#endif
2412
2413#if (8 == BITS_PER_XWSID_T)
2415#elif (16 == BITS_PER_XWSID_T)
2417#elif (32 == BITS_PER_XWSID_T)
2419#elif (64 == BITS_PER_XWSID_T)
2421#endif
2422
2423#if (16 == BITS_PER_XWREG_T)
2425#elif (32 == BITS_PER_XWREG_T)
2427#elif (64 == BITS_PER_XWREG_T)
2429#endif
2430
2431#if (16 == BITS_PER_XWSREG_T)
2433#elif (32 == BITS_PER_XWSREG_T)
2435#elif (64 == BITS_PER_XWSREG_T)
2437#endif
2438
2439#if (16 == BITS_PER_XWSQ_T)
2441#elif (32 == BITS_PER_XWSQ_T)
2443#elif (64 == BITS_PER_XWSQ_T)
2445#endif
2446
2447#if (16 == BITS_PER_XWSSQ_T)
2449#elif (32 == BITS_PER_XWSSQ_T)
2451#elif (64 == BITS_PER_XWSSQ_T)
2453#endif
2454
2455#if (8 == BITS_PER_XWBMP_T)
2457#elif (16 == BITS_PER_XWBMP_T)
2459#elif (32 == BITS_PER_XWBMP_T)
2461#elif (64 == BITS_PER_XWBMP_T)
2463#endif
2464
2467
2483// cppcheck-suppress [misra-c2012-20.7]
2484#define xwbmpaop_define(name, bits) atomic_xwbmp_t name[BITS_TO_XWBMP_T(bits)]
2485
2496bool xwbmpaop_t1i(atomic_xwbmp_t * bmp, xwsq_t idx);
2497
2505void xwbmpaop_s1i(atomic_xwbmp_t * bmp, xwsq_t idx);
2506
2514void xwbmpaop_c0i(atomic_xwbmp_t * bmp, xwsq_t idx);
2515
2523void xwbmpaop_x1i(atomic_xwbmp_t * bmp, xwsq_t idx);
2524
2536
2548
2560
2572
2584
2596
2604static __xwlib_inline
2606{
2607 xwsz_t n = BITS_TO_XWBMP_T(num);
2608 xwsz_t i;
2609
2610 for (i = 0; i < n; i++) {
2611 xwaop_s1m(xwbmp_t, &bmp[i], ~((xwbmp_t)0), NULL, NULL);
2612 }
2613}
2614
2622static __xwlib_inline
2624{
2625 xwsz_t n = BITS_TO_XWBMP_T(num);
2626 xwsz_t i;
2627
2628 for (i = 0; i < n; i++) {
2629 xwaop_c0m(xwbmp_t, &bmp[i], ~((xwbmp_t)0), NULL, NULL);
2630 }
2631}
2632
2637#endif /* xwos/lib/xwaop.h */
#define __xwlib_inline
Definition compiler.h:203
xws64_t xwtm_t
XWOS系统时间 (有符号)
Definition type.h:742
xwu64_t xwtk_t
XWOS系统滴答计数 (无符号)
Definition type.h:710
signed long xwer_t
Definition type.h:554
#define NULL
Definition type.h:28
unsigned long xwid_t
Definition type.h:481
unsigned long xwsz_t
Definition type.h:339
uint8_t xwu8_t
Definition type.h:194
__xwcc_atomic xwbmp_t atomic_xwbmp_t
Definition type.h:577
unsigned long xwsq_t
Definition type.h:445
int64_t xws64_t
Definition type.h:319
ptrdiff_t xwsreg_t
Definition type.h:425
uint64_t xwu64_t
Definition type.h:303
xwptr_t xwlfq_t
Definition type.h:591
signed long xwssq_t
Definition type.h:461
signed long xwsid_t
Definition type.h:497
signed long xwssz_t
Definition type.h:355
unsigned long xwptr_t
Definition type.h:375
xwptr_t xwreg_t
Definition type.h:409
uint16_t xwu16_t
Definition type.h:230
uint32_t xwu32_t
Definition type.h:266
int16_t xws16_t
Definition type.h:246
int8_t xws8_t
Definition type.h:210
xwu32_t xwbmp_t
Definition type.h:574
int32_t xws32_t
Definition type.h:283
#define xwaop_c0m(type, a, m, nv, ov)
对原子变量进行原子操作:读取-位清0操作-回写
Definition xwaop.h:1190
#define xwaop_s1m(type, a, m, nv, ov)
对原子变量进行原子操作:读取-位置1操作-回写
Definition xwaop.h:1176
#define DEFINE_XWAOP(type, btype)
使用模板为某一类型定义原子操作函数集合
Definition xwaop.h:2309
void xwbmpaop_x1i(atomic_xwbmp_t *bmp, xwsq_t idx)
XWOS AOPLIB:将位图中某位翻转
Definition bmp.c:49
static void xwbmpaop_c0all(atomic_xwbmp_t *bmp, xwsq_t num)
XWOS AOPLIB:将位图所有位清0
Definition xwaop.h:2623
xwssq_t xwbmpaop_ffz_then_s1i(atomic_xwbmp_t *bmp, xwsz_t num)
XWOS AOPLIB:从最低位起查找位图中第一个为0的位并将它置1
Definition bmp.c:227
xwssq_t xwbmpaop_fls_then_c0i(atomic_xwbmp_t *bmp, xwsz_t num)
XWOS AOPLIB:从最高位起查找位图中第一个为1的位并将它清0
Definition bmp.c:102
xwssq_t xwbmpaop_ffs_then_c0i(atomic_xwbmp_t *bmp, xwsz_t num)
XWOS AOPLIB:从最低位起查找位图中第一个为1的位并将它清0
Definition bmp.c:183
bool xwbmpaop_t1i(atomic_xwbmp_t *bmp, xwsq_t idx)
XWOS AOPLIB:测试位图中的某位是否被置1
Definition bmp.c:18
xwer_t xwbmpaop_t1i_then_c0i(atomic_xwbmp_t *bmp, xwsq_t idx)
XWOS AOPLIB:测试位图中某位是否为1,如果是,就将它清0
Definition bmp.c:80
static void xwbmpaop_s1all(atomic_xwbmp_t *bmp, xwsq_t num)
XWOS AOPLIB:将位图所有位置1
Definition xwaop.h:2605
xwssq_t xwbmpaop_flz_then_s1i(atomic_xwbmp_t *bmp, xwsz_t num)
XWOS AOPLIB:从最高位起查找位图中第一个为0的位并将它置1
Definition bmp.c:142
void xwbmpaop_c0i(atomic_xwbmp_t *bmp, xwsq_t idx)
XWOS AOPLIB:将位图中某位清0
Definition bmp.c:40
xwer_t xwbmpaop_t0i_then_s1i(atomic_xwbmp_t *bmp, xwsq_t idx)
XWOS AOPLIB:测试位图中某位是否为0,如果是,就将它置1
Definition bmp.c:58
void xwbmpaop_s1i(atomic_xwbmp_t *bmp, xwsq_t idx)
XWOS AOPLIB:将位图中某位置1
Definition bmp.c:31
#define BITS_TO_XWBMP_T(n)
Definition xwbop.h:35
XWOS通用库:位操作
XWOS的标准头文件