8#ifndef INCLUDED_BSLS_ATOMICOPERATIONS_DEFAULT
9#define INCLUDED_BSLS_ATOMICOPERATIONS_DEFAULT
322#include <bsls_types.h>
359 static int addIntNv(
typename AtomicTypes::Int *atomicInt,
int value);
363 static int getInt(
typename AtomicTypes::Int
const *atomicInt);
368 static void setInt(
typename AtomicTypes::Int *atomicInt,
int value);
373 static int swapInt(
typename AtomicTypes::Int *atomicInt,
int swapValue);
380 static int testAndSwapInt(
typename AtomicTypes::Int *atomicInt,
389 static int getIntAcquire(
typename AtomicTypes::Int
const *atomicInt);
393 static int getIntRelaxed(
typename AtomicTypes::Int
const *atomicInt);
397 static void initInt(
typename AtomicTypes::Int *atomicInt,
398 int initialValue = 0);
402 static void setIntRelaxed(
typename AtomicTypes::Int *atomicInt,
int value);
406 static void setIntRelease(
typename AtomicTypes::Int *atomicInt,
int value);
411 static int swapIntAcqRel(
typename AtomicTypes::Int *atomicInt,
427 static void addInt(
typename AtomicTypes::Int *atomicInt,
int value);
431 static void addIntAcqRel(
typename AtomicTypes::Int *atomicInt,
int value);
435 static void addIntRelaxed(
typename AtomicTypes::Int *atomicInt,
int value);
440 static int addIntNvAcqRel(
typename AtomicTypes::Int *atomicInt,
int value);
450 static void decrementInt(
typename AtomicTypes::Int *atomicInt);
468 static void incrementInt(
typename AtomicTypes::Int *atomicInt);
487 static int subtractIntNv(
typename AtomicTypes::Int *atomicInt,
int value);
530 static Types::Int64 addInt64Nv(
typename AtomicTypes::Int64 *atomicInt,
535 static Types::Int64 getInt64(
typename AtomicTypes::Int64
const *atomicInt);
540 static void setInt64(
typename AtomicTypes::Int64 *atomicInt,
546 static Types::Int64 swapInt64(
typename AtomicTypes::Int64 *atomicInt,
555 typename AtomicTypes::Int64 *atomicInt,
565 typename AtomicTypes::Int64
const *atomicInt);
570 typename AtomicTypes::Int64
const *atomicInt);
574 static void initInt64(
typename AtomicTypes::Int64 *atomicInt,
591 typename AtomicTypes::Int64 *atomicInt,
600 typename AtomicTypes::Int64 *atomicInt,
608 static void addInt64(
typename AtomicTypes::Int64 *atomicInt,
613 static void addInt64AcqRel(
typename AtomicTypes::Int64 *atomicInt,
625 typename AtomicTypes::Int64 *atomicInt,
632 typename AtomicTypes::Int64 *atomicInt,
637 static void decrementInt64(
typename AtomicTypes::Int64 *atomicInt);
647 typename AtomicTypes::Int64 *atomicInt);
653 typename AtomicTypes::Int64 *atomicInt);
657 static void incrementInt64(
typename AtomicTypes::Int64 *atomicInt);
667 typename AtomicTypes::Int64 *atomicInt);
673 typename AtomicTypes::Int64 *atomicInt);
685 typename AtomicTypes::Int64 *atomicInt,
692 typename AtomicTypes::Int64 *atomicInt,
746 static unsigned int getUint(
typename AtomicTypes::Uint
const *atomicUint);
751 typename AtomicTypes::Uint
const *atomicUint);
756 typename AtomicTypes::Uint
const *atomicUint);
760 static void initUint(
typename AtomicTypes::Uint *atomicUint,
761 unsigned int initialValue = 0);
766 static void setUint(
typename AtomicTypes::Uint *atomicUint,
771 static void setUintRelaxed(
typename AtomicTypes::Uint *atomicUint,
776 static void setUintRelease(
typename AtomicTypes::Uint *atomicUint,
782 static unsigned int swapUint(
typename AtomicTypes::Uint *atomicUint,
783 unsigned int swapValue);
788 static unsigned int swapUintAcqRel(
typename AtomicTypes::Uint *atomicUint,
789 unsigned int swapValue);
798 typename AtomicTypes::Uint *atomicUint,
799 unsigned int compareValue,
800 unsigned int swapValue);
808 typename AtomicTypes::Uint *atomicUint,
809 unsigned int compareValue,
810 unsigned int swapValue);
816 static void addUint(
typename AtomicTypes::Uint *atomicUint,
821 static void addUintAcqRel(
typename AtomicTypes::Uint *atomicUint,
826 static void addUintRelaxed(
typename AtomicTypes::Uint *atomicUint,
832 static unsigned int addUintNv(
typename AtomicTypes::Uint *atomicUint,
838 static unsigned int addUintNvAcqRel(
typename AtomicTypes::Uint *atomicUint,
845 typename AtomicTypes::Uint *atomicUint,
850 static void decrementUint(
typename AtomicTypes::Uint *atomicUint);
860 typename AtomicTypes::Uint *atomicUint);
866 typename AtomicTypes::Uint *atomicUint);
870 static void incrementUint(
typename AtomicTypes::Uint *atomicUint);
880 typename AtomicTypes::Uint *atomicUint);
886 typename AtomicTypes::Uint *atomicUint);
891 static unsigned int subtractUintNv(
typename AtomicTypes::Uint *atomicUint,
898 typename AtomicTypes::Uint *atomicUint,
905 typename AtomicTypes::Uint *atomicUint,
964 typename AtomicTypes::Uint64
const *atomicUint);
969 typename AtomicTypes::Uint64
const *atomicUint);
974 typename AtomicTypes::Uint64
const *atomicUint);
978 static void initUint64(
typename AtomicTypes::Uint64 *atomicUint,
984 static void setUint64(
typename AtomicTypes::Uint64 *atomicUint,
1007 typename AtomicTypes::Uint64 *atomicUint,
1017 typename AtomicTypes::Uint64 *atomicUint,
1027 typename AtomicTypes::Uint64 *atomicUint,
1035 static void addUint64(
typename AtomicTypes::Uint64 *atomicUint,
1058 typename AtomicTypes::Uint64 *atomicUint,
1065 typename AtomicTypes::Uint64 *atomicUint,
1070 static void decrementUint64(
typename AtomicTypes::Uint64 *atomicUint);
1075 typename AtomicTypes::Uint64 *atomicUint);
1081 typename AtomicTypes::Uint64 *atomicUint);
1087 typename AtomicTypes::Uint64 *atomicUint);
1091 static void incrementUint64(
typename AtomicTypes::Uint64 *atomicUint);
1096 typename AtomicTypes::Uint64 *atomicUint);
1102 typename AtomicTypes::Uint64 *atomicUint);
1108 typename AtomicTypes::Uint64 *atomicUint);
1114 typename AtomicTypes::Uint64 *atomicUint,
1121 typename AtomicTypes::Uint64 *atomicUint,
1128 typename AtomicTypes::Uint64 *atomicUint,
1177 static void *
getPtr(
typename AtomicTypes::Pointer
const *atomicPtr);
1181 static void *
getPtrAcquire(
typename AtomicTypes::Pointer
const *atomicPtr);
1185 static void *
getPtrRelaxed(
typename AtomicTypes::Pointer
const *atomicPtr);
1189 static void initPointer(
typename AtomicTypes::Pointer *atomicPtr,
1190 void *initialValue = 0);
1195 static void setPtr(
typename AtomicTypes::Pointer *atomicPtr,
1200 static void setPtrRelaxed(
typename AtomicTypes::Pointer *atomicPtr,
1205 static void setPtrRelease(
typename AtomicTypes::Pointer *atomicPtr,
1211 static void *
swapPtr(
typename AtomicTypes::Pointer *atomicPtr,
1217 static void *
swapPtrAcqRel(
typename AtomicTypes::Pointer *atomicPtr,
1225 static void *
testAndSwapPtr(
typename AtomicTypes::Pointer *atomicPtr,
1235 typename AtomicTypes::Pointer *atomicPtr,
1292 static void *
getPtr(
typename AtomicTypes::Pointer
const *atomicPtr);
1296 static void *
getPtrAcquire(
typename AtomicTypes::Pointer
const *atomicPtr);
1300 static void *
getPtrRelaxed(
typename AtomicTypes::Pointer
const *atomicPtr);
1304 static void initPointer(
typename AtomicTypes::Pointer *atomicPtr,
1305 void *initialValue = 0);
1310 static void setPtr(
typename AtomicTypes::Pointer *atomicPtr,
1315 static void setPtrRelaxed(
typename AtomicTypes::Pointer *atomicPtr,
1320 static void setPtrRelease(
typename AtomicTypes::Pointer *atomicPtr,
1326 static void *
swapPtr(
typename AtomicTypes::Pointer *atomicPtr,
1332 static void *
swapPtrAcqRel(
typename AtomicTypes::Pointer *atomicPtr,
1340 static void *
testAndSwapPtr(
typename AtomicTypes::Pointer *atomicPtr,
1350 typename AtomicTypes::Pointer *atomicPtr,
1405 return IMP::getInt(atomicInt);
1413 return atomicInt->d_value;
1419 initInt(
typename AtomicTypes::Int *atomicInt,
int initialValue)
1421 atomicInt->d_value = initialValue;
1427 setIntRelaxed(
typename AtomicTypes::Int *atomicInt,
int value)
1429 atomicInt->d_value = value;
1435 setIntRelease(
typename AtomicTypes::Int *atomicInt,
int value)
1437 IMP::setInt(atomicInt, value);
1443 swapIntAcqRel(
typename AtomicTypes::Int *atomicInt,
int swapValue)
1445 return IMP::swapInt(atomicInt, swapValue);
1451 typename AtomicTypes::Int *atomicInt,
1455 return IMP::testAndSwapInt(atomicInt, compareValue, swapValue);
1462 addInt(
typename AtomicTypes::Int *atomicInt,
int value)
1464 IMP::addIntNv(atomicInt, value);
1470 addIntAcqRel(
typename AtomicTypes::Int *atomicInt,
int value)
1472 IMP::addIntNvAcqRel(atomicInt, value);
1478 addIntRelaxed(
typename AtomicTypes::Int *atomicInt,
int value)
1480 IMP::addIntNvRelaxed(atomicInt, value);
1488 return IMP::addIntNv(atomicInt, value);
1496 return IMP::addIntNvAcqRel(atomicInt, value);
1504 IMP::addInt(atomicInt, -1);
1512 IMP::addIntAcqRel(atomicInt, -1);
1520 return IMP::addIntNv(atomicInt, -1);
1528 return IMP::addIntNvAcqRel(atomicInt, -1);
1536 IMP::addInt(atomicInt, 1);
1544 IMP::addIntAcqRel(atomicInt, 1);
1552 return IMP::addIntNv(atomicInt, 1);
1560 return IMP::addIntNvAcqRel(atomicInt, 1);
1566 subtractIntNv(
typename AtomicTypes::Int *atomicInt,
int value)
1568 return static_cast<int>(
1569 IMP::subtractUintNv(
1570 reinterpret_cast<typename AtomicTypes::Uint *
>(atomicInt),
1571 static_cast<unsigned int>(value)));
1579 return static_cast<int>(
1580 IMP::subtractUintNvAcqRel(
1581 reinterpret_cast<typename AtomicTypes::Uint *
>(atomicInt),
1582 static_cast<unsigned int>(value)));
1590 return static_cast<int>(
1591 IMP::subtractUintNvRelaxed(
1592 reinterpret_cast<typename AtomicTypes::Uint *
>(atomicInt),
1593 static_cast<unsigned int>(value)));
1606 return IMP::getInt64(atomicInt);
1614 return atomicInt->d_value;
1620 typename AtomicTypes::Int64 *atomicInt,
1623 atomicInt->d_value = initialValue;
1629 typename AtomicTypes::Int64 *atomicInt,
1632 atomicInt->d_value = value;
1638 typename AtomicTypes::Int64 *atomicInt,
1641 IMP::setInt64(atomicInt, value);
1647 typename AtomicTypes::Int64 *atomicInt,
1650 return IMP::swapInt64(atomicInt, swapValue);
1656 typename AtomicTypes::Int64 *atomicInt,
1660 return IMP::testAndSwapInt64(atomicInt, compareValue, swapValue);
1667 typename AtomicTypes::Int64 *atomicInt,
1670 IMP::addInt64Nv(atomicInt, value);
1676 typename AtomicTypes::Int64 *atomicInt,
1679 IMP::addInt64NvAcqRel(atomicInt, value);
1685 typename AtomicTypes::Int64 *atomicInt,
1688 IMP::addInt64NvRelaxed(atomicInt, value);
1694 typename AtomicTypes::Int64 *atomicInt,
1697 return IMP::addInt64Nv(atomicInt, value);
1703 typename AtomicTypes::Int64 *atomicInt,
1706 return IMP::addInt64NvAcqRel(atomicInt, value);
1714 IMP::addInt64(atomicInt, -1);
1722 IMP::addInt64AcqRel(atomicInt, -1);
1730 return IMP::addInt64Nv(atomicInt, -1);
1738 return IMP::addInt64NvAcqRel(atomicInt, -1);
1746 IMP::addInt64(atomicInt, 1);
1754 IMP::addInt64AcqRel(atomicInt, 1);
1762 return IMP::addInt64Nv(atomicInt, 1);
1770 return IMP::addInt64NvAcqRel(atomicInt, 1);
1776 typename AtomicTypes::Int64 *atomicInt,
1780 IMP::subtractUint64Nv(
1781 reinterpret_cast<typename AtomicTypes::Uint64 *
>(atomicInt),
1788 typename AtomicTypes::Int64 *atomicInt,
1792 IMP::subtractUint64NvAcqRel(
1793 reinterpret_cast<typename AtomicTypes::Uint64 *
>(atomicInt),
1800 typename AtomicTypes::Int64 *atomicInt,
1804 IMP::subtractUint64NvRelaxed(
1805 reinterpret_cast<typename AtomicTypes::Uint64 *
>(atomicInt),
1817 getUint(
typename AtomicTypes::Uint
const *atomicUint)
1819 return static_cast<unsigned int>(
1821 reinterpret_cast<typename AtomicTypes::Int
const *
>(
1830 return static_cast<unsigned int>(
1832 reinterpret_cast<typename AtomicTypes::Int
const *
>(atomicUint)));
1840 return atomicUint->d_value;
1846 initUint(
typename AtomicTypes::Uint *atomicUint,
unsigned int initialValue)
1848 atomicUint->d_value = initialValue;
1854 setUint(
typename AtomicTypes::Uint *atomicUint,
unsigned int value)
1856 IMP::setInt(
reinterpret_cast<typename AtomicTypes::Int *
>(atomicUint),
1857 static_cast<int>(value));
1863 setUintRelaxed(
typename AtomicTypes::Uint *atomicUint,
unsigned int value)
1865 atomicUint->d_value = value;
1871 setUintRelease(
typename AtomicTypes::Uint *atomicUint,
unsigned int value)
1874 reinterpret_cast<typename AtomicTypes::Int *
>(atomicUint),
1875 static_cast<int>(value));
1881 swapUint(
typename AtomicTypes::Uint *atomicUint,
unsigned int swapValue)
1883 return static_cast<unsigned int>(
1885 reinterpret_cast<typename AtomicTypes::Int *
>(atomicUint),
1886 static_cast<int>(swapValue)));
1892 typename AtomicTypes::Uint *atomicUint,
1893 unsigned int swapValue)
1895 return static_cast<unsigned int>(
1897 reinterpret_cast<typename AtomicTypes::Int *
>(atomicUint),
1898 static_cast<int>(swapValue)));
1904 typename AtomicTypes::Uint *atomicUint,
1905 unsigned int compareValue,
1906 unsigned int swapValue)
1908 return static_cast<unsigned int>(
1909 IMP::testAndSwapInt(
1910 reinterpret_cast<typename AtomicTypes::Int *
>(atomicUint),
1911 static_cast<int>(compareValue),
1912 static_cast<int>(swapValue)));
1918 typename AtomicTypes::Uint *atomicUint,
1919 unsigned int compareValue,
1920 unsigned int swapValue)
1922 return static_cast<unsigned int>(
1923 IMP::testAndSwapIntAcqRel(
1924 reinterpret_cast<typename AtomicTypes::Int *
>(atomicUint),
1925 static_cast<int>(compareValue),
1926 static_cast<int>(swapValue)));
1933 addUint(
typename AtomicTypes::Uint *atomicUint,
unsigned int value)
1935 IMP::addInt(
reinterpret_cast<typename AtomicTypes::Int *
>(atomicUint),
1936 static_cast<int>(value));
1942 addUintAcqRel(
typename AtomicTypes::Uint *atomicUint,
unsigned int value)
1945 reinterpret_cast<typename AtomicTypes::Int *
>(atomicUint),
1946 static_cast<int>(value));
1952 addUintRelaxed(
typename AtomicTypes::Uint *atomicUint,
unsigned int value)
1955 reinterpret_cast<typename AtomicTypes::Int *
>(atomicUint),
1956 static_cast<int>(value));
1962 addUintNv(
typename AtomicTypes::Uint *atomicUint,
unsigned int value)
1964 return static_cast<unsigned int>(
1966 reinterpret_cast<typename AtomicTypes::Int *
>(atomicUint),
1967 static_cast<int>(value)));
1973 addUintNvAcqRel(
typename AtomicTypes::Uint *atomicUint,
unsigned int value)
1975 return static_cast<unsigned int>(
1976 IMP::addIntNvAcqRel(
1977 reinterpret_cast<typename AtomicTypes::Int *
>(atomicUint),
1978 static_cast<int>(value)));
1984 typename AtomicTypes::Uint *atomicUint,
1987 return static_cast<unsigned int>(
1988 IMP::addIntNvRelaxed(
1989 reinterpret_cast<typename AtomicTypes::Int *
>(atomicUint),
1990 static_cast<int>(value)));
1998 IMP::addInt(
reinterpret_cast<typename AtomicTypes::Int *
>(atomicUint), -1);
2007 reinterpret_cast<typename AtomicTypes::Int *
>(atomicUint), -1);
2015 return IMP::subtractUintNv(atomicUint, 1);
2023 return static_cast<unsigned int>(
2024 IMP::addIntNvAcqRel(
2025 reinterpret_cast<typename AtomicTypes::Int *
>(atomicUint), -1));
2033 IMP::addUint(atomicUint, 1);
2041 IMP::addUintAcqRel(atomicUint, 1);
2049 return IMP::addUintNv(atomicUint, 1);
2057 return IMP::addUintNvAcqRel(atomicUint, 1);
2063 subtractUintNv(
typename AtomicTypes::Uint *atomicUint,
unsigned int value)
2065 return static_cast<unsigned int>(
2067 reinterpret_cast<typename AtomicTypes::Int *
>(atomicUint),
2068 static_cast<int>(1 + ~value)));
2074 typename AtomicTypes::Uint *atomicUint,
2077 return static_cast<unsigned int>(
2078 IMP::addIntNvAcqRel(
2079 reinterpret_cast<typename AtomicTypes::Int *
>(atomicUint),
2080 static_cast<int>(1 + ~value)));
2086 typename AtomicTypes::Uint *atomicUint,
2089 return static_cast<unsigned int>(
2090 IMP::addIntNvRelaxed(
2091 reinterpret_cast<typename AtomicTypes::Int *
>(atomicUint),
2092 static_cast<int>(1 + ~value)));
2103 getUint64(
typename AtomicTypes::Uint64
const *atomicUint)
2106 IMP::getInt64(
reinterpret_cast<typename AtomicTypes::Int64
const *
>(
2116 reinterpret_cast<typename AtomicTypes::Int64
const *
>(atomicUint)));
2124 return atomicUint->d_value;
2130 typename AtomicTypes::Uint64 *atomicUint,
2133 atomicUint->d_value = initialValue;
2141 IMP::setInt64(
reinterpret_cast<typename AtomicTypes::Int64 *
>(atomicUint),
2148 typename AtomicTypes::Uint64 *atomicUint,
2151 atomicUint->d_value = value;
2157 typename AtomicTypes::Uint64 *atomicUint,
2160 IMP::setInt64Release(
2161 reinterpret_cast<typename AtomicTypes::Int64 *
>(atomicUint),
2168 typename AtomicTypes::Uint64 *atomicUint,
2173 reinterpret_cast<typename AtomicTypes::Int64 *
>(atomicUint),
2180 typename AtomicTypes::Uint64 *atomicUint,
2184 IMP::swapInt64AcqRel(
2185 reinterpret_cast<typename AtomicTypes::Int64 *
>(atomicUint),
2192 typename AtomicTypes::Uint64 *atomicUint,
2197 IMP::testAndSwapInt64(
2198 reinterpret_cast<typename AtomicTypes::Int64 *
>(atomicUint),
2206 typename AtomicTypes::Uint64 *atomicUint,
2211 IMP::testAndSwapInt64AcqRel(
2212 reinterpret_cast<typename AtomicTypes::Int64 *
>(atomicUint),
2221 typename AtomicTypes::Uint64 *atomicUint,
Types::Uint64 value)
2223 IMP::addInt64(
reinterpret_cast<typename AtomicTypes::Int64 *
>(atomicUint),
2230 typename AtomicTypes::Uint64 *atomicUint,
Types::Uint64 value)
2232 IMP::addInt64AcqRel(
2233 reinterpret_cast<typename AtomicTypes::Int64 *
>(atomicUint),
2240 typename AtomicTypes::Uint64 *atomicUint,
Types::Uint64 value)
2242 IMP::addInt64Relaxed(
2243 reinterpret_cast<typename AtomicTypes::Int64 *
>(atomicUint),
2250 typename AtomicTypes::Uint64 *atomicUint,
Types::Uint64 value)
2254 reinterpret_cast<typename AtomicTypes::Int64 *
>(atomicUint),
2261 typename AtomicTypes::Uint64 *atomicUint,
Types::Uint64 value)
2264 IMP::addInt64NvAcqRel(
2265 reinterpret_cast<typename AtomicTypes::Int64 *
>(atomicUint),
2272 typename AtomicTypes::Uint64 *atomicUint,
Types::Uint64 value)
2275 IMP::addInt64NvRelaxed(
2276 reinterpret_cast<typename AtomicTypes::Int64 *
>(atomicUint),
2285 IMP::addInt64(
reinterpret_cast<typename AtomicTypes::Int64 *
>(atomicUint),
2294 IMP::addInt64AcqRel(
2295 reinterpret_cast<typename AtomicTypes::Int64 *
>(atomicUint), -1);
2303 return IMP::subtractUint64Nv(atomicUint, 1);
2312 IMP::addInt64NvAcqRel(
2313 reinterpret_cast<typename AtomicTypes::Int64 *
>(atomicUint), -1));
2321 IMP::addUint64(atomicUint, 1);
2329 IMP::addUint64AcqRel(atomicUint, 1);
2337 return IMP::addUint64Nv(atomicUint, 1);
2345 return IMP::addUint64NvAcqRel(atomicUint, 1);
2351 typename AtomicTypes::Uint64 *atomicUint,
Types::Uint64 value)
2355 reinterpret_cast<typename AtomicTypes::Int64 *
>(atomicUint),
2362 typename AtomicTypes::Uint64 *atomicUint,
Types::Uint64 value)
2365 IMP::addInt64NvAcqRel(
2366 reinterpret_cast<typename AtomicTypes::Int64 *
>(atomicUint),
2373 typename AtomicTypes::Uint64 *atomicUint,
Types::Uint64 value)
2376 IMP::addInt64NvRelaxed(
2377 reinterpret_cast<typename AtomicTypes::Int64 *
>(atomicUint),
2389 getPtr(
typename AtomicTypes::Pointer
const *atomicPtr)
2391 return reinterpret_cast<void *
>(
2393 reinterpret_cast<typename AtomicTypes::Int
const *
>(
2400 getPtrAcquire(
typename AtomicTypes::Pointer
const *atomicPtr)
2402 return reinterpret_cast<void *
>(
2404 reinterpret_cast<typename AtomicTypes::Int
const *
>(
2411 getPtrRelaxed(
typename AtomicTypes::Pointer
const *atomicPtr)
2413 return reinterpret_cast<void *
>(
2415 reinterpret_cast<typename AtomicTypes::Int
const *
>(
2422 typename AtomicTypes::Pointer *atomicPtr,
void *initialValue)
2424 atomicPtr->d_value = initialValue;
2430 typename AtomicTypes::Pointer *atomicPtr,
void *value)
2433 reinterpret_cast<typename AtomicTypes::Int *
>(atomicPtr),
2440 typename AtomicTypes::Pointer *atomicPtr,
void *value)
2443 reinterpret_cast<typename AtomicTypes::Int *
>(atomicPtr),
2450 typename AtomicTypes::Pointer *atomicPtr,
void *value)
2453 reinterpret_cast<typename AtomicTypes::Int *
>(atomicPtr),
2460 typename AtomicTypes::Pointer *atomicPtr,
void *swapValue)
2462 return reinterpret_cast<void *
>(
2464 reinterpret_cast<typename AtomicTypes::Int *
>(atomicPtr),
2471 typename AtomicTypes::Pointer *atomicPtr,
void *swapValue)
2473 return reinterpret_cast<void *
>(
2475 reinterpret_cast<typename AtomicTypes::Int *
>(atomicPtr),
2482 typename AtomicTypes::Pointer *atomicPtr,
2486 return reinterpret_cast<void *
>(
2487 IMP::testAndSwapInt(
2488 reinterpret_cast<typename AtomicTypes::Int *
>(atomicPtr),
2496 typename AtomicTypes::Pointer *atomicPtr,
2500 return reinterpret_cast<void *
>(
2501 IMP::testAndSwapIntAcqRel(
2502 reinterpret_cast<typename AtomicTypes::Int *
>(atomicPtr),
2515 getPtr(
typename AtomicTypes::Pointer
const *atomicPtr)
2517 return reinterpret_cast<void *
>(
2519 reinterpret_cast<typename AtomicTypes::Int64
const *
>(
2526 getPtrAcquire(
typename AtomicTypes::Pointer
const *atomicPtr)
2528 return reinterpret_cast<void *
>(
2529 IMP::getInt64Acquire(
2530 reinterpret_cast<typename AtomicTypes::Int64
const *
>(
2537 getPtrRelaxed(
typename AtomicTypes::Pointer
const *atomicPtr)
2539 return reinterpret_cast<void *
>(
2540 IMP::getInt64Relaxed(
2541 reinterpret_cast<typename AtomicTypes::Int64
const *
>(
2548 typename AtomicTypes::Pointer *atomicPtr,
void *initialValue)
2550 atomicPtr->d_value = initialValue;
2556 typename AtomicTypes::Pointer *atomicPtr,
void *value)
2559 reinterpret_cast<typename AtomicTypes::Int64 *
>(atomicPtr),
2566 typename AtomicTypes::Pointer *atomicPtr,
void *value)
2568 IMP::setInt64Relaxed(
2569 reinterpret_cast<typename AtomicTypes::Int64 *
>(atomicPtr),
2576 typename AtomicTypes::Pointer *atomicPtr,
void *value)
2578 IMP::setInt64Release(
2579 reinterpret_cast<typename AtomicTypes::Int64 *
>(atomicPtr),
2586 typename AtomicTypes::Pointer *atomicPtr,
void *swapValue)
2588 return reinterpret_cast<void *
>(
2590 reinterpret_cast<typename AtomicTypes::Int64 *
>(atomicPtr),
2597 typename AtomicTypes::Pointer *atomicPtr,
void *swapValue)
2599 return reinterpret_cast<void *
>(
2600 IMP::swapInt64AcqRel(
2601 reinterpret_cast<typename AtomicTypes::Int64 *
>(atomicPtr),
2608 typename AtomicTypes::Pointer *atomicPtr,
2612 return reinterpret_cast<void *
>(
2613 IMP::testAndSwapInt64(
2614 reinterpret_cast<typename AtomicTypes::Int64 *
>(atomicPtr),
2622 typename AtomicTypes::Pointer *atomicPtr,
2626 return reinterpret_cast<void *
>(
2627 IMP::testAndSwapInt64AcqRel(
2628 reinterpret_cast<typename AtomicTypes::Int64 *
>(atomicPtr),
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition bdlt_iso8601util.h:691
Definition bsls_atomicoperations_default.h:1370
Definition bsls_atomicoperations_default.h:1388
Definition bsls_atomicoperations_default.h:515
static void setInt64Release(typename AtomicTypes::Int64 *atomicInt, Types::Int64 value)
Definition bsls_atomicoperations_default.h:1637
static Types::Int64 incrementInt64NvAcqRel(typename AtomicTypes::Int64 *atomicInt)
Definition bsls_atomicoperations_default.h:1768
static Types::Int64 addInt64NvAcqRel(typename AtomicTypes::Int64 *atomicInt, Types::Int64 value)
Definition bsls_atomicoperations_default.h:1693
static void initInt64(typename AtomicTypes::Int64 *atomicInt, Types::Int64 initialValue=0)
Definition bsls_atomicoperations_default.h:1619
Atomic_TypeTraits< IMP > AtomicTypes
Definition bsls_atomicoperations_default.h:518
static void decrementInt64(typename AtomicTypes::Int64 *atomicInt)
Definition bsls_atomicoperations_default.h:1712
static void incrementInt64(typename AtomicTypes::Int64 *atomicInt)
Definition bsls_atomicoperations_default.h:1744
static void addInt64Relaxed(typename AtomicTypes::Int64 *atomicInt, Types::Int64 value)
Definition bsls_atomicoperations_default.h:1684
static Types::Int64 subtractInt64NvAcqRel(typename AtomicTypes::Int64 *atomicInt, Types::Int64 value)
Definition bsls_atomicoperations_default.h:1787
static Types::Int64 incrementInt64Nv(typename AtomicTypes::Int64 *atomicInt)
Definition bsls_atomicoperations_default.h:1760
static Types::Int64 testAndSwapInt64AcqRel(typename AtomicTypes::Int64 *atomicInt, Types::Int64 compareValue, Types::Int64 swapValue)
Definition bsls_atomicoperations_default.h:1655
static Types::Int64 subtractInt64Nv(typename AtomicTypes::Int64 *atomicInt, Types::Int64 value)
Definition bsls_atomicoperations_default.h:1775
static Types::Int64 getInt64Relaxed(typename AtomicTypes::Int64 const *atomicInt)
Definition bsls_atomicoperations_default.h:1612
static void addInt64AcqRel(typename AtomicTypes::Int64 *atomicInt, Types::Int64 value)
Definition bsls_atomicoperations_default.h:1675
static Types::Int64 decrementInt64Nv(typename AtomicTypes::Int64 *atomicInt)
Definition bsls_atomicoperations_default.h:1728
static void setInt64Relaxed(typename AtomicTypes::Int64 *atomicInt, Types::Int64 value)
Definition bsls_atomicoperations_default.h:1628
static void incrementInt64AcqRel(typename AtomicTypes::Int64 *atomicInt)
Definition bsls_atomicoperations_default.h:1752
static void decrementInt64AcqRel(typename AtomicTypes::Int64 *atomicInt)
Definition bsls_atomicoperations_default.h:1720
static Types::Int64 getInt64Acquire(typename AtomicTypes::Int64 const *atomicInt)
Definition bsls_atomicoperations_default.h:1604
static Types::Int64 decrementInt64NvAcqRel(typename AtomicTypes::Int64 *atomicInt)
Definition bsls_atomicoperations_default.h:1736
static Types::Int64 subtractInt64NvRelaxed(typename AtomicTypes::Int64 *atomicInt, Types::Int64 value)
Definition bsls_atomicoperations_default.h:1799
static Types::Int64 swapInt64AcqRel(typename AtomicTypes::Int64 *atomicInt, Types::Int64 swapValue)
Definition bsls_atomicoperations_default.h:1646
static void addInt64(typename AtomicTypes::Int64 *atomicInt, Types::Int64 value)
Definition bsls_atomicoperations_default.h:1666
static Types::Int64 addInt64NvRelaxed(typename AtomicTypes::Int64 *atomicInt, Types::Int64 value)
Definition bsls_atomicoperations_default.h:1702
Definition bsls_atomicoperations_default.h:344
static void setIntRelease(typename AtomicTypes::Int *atomicInt, int value)
Definition bsls_atomicoperations_default.h:1435
static int testAndSwapIntAcqRel(typename AtomicTypes::Int *atomicInt, int compareValue, int swapValue)
Definition bsls_atomicoperations_default.h:1450
static void addIntRelaxed(typename AtomicTypes::Int *atomicInt, int value)
Definition bsls_atomicoperations_default.h:1478
static void incrementIntAcqRel(typename AtomicTypes::Int *atomicInt)
Definition bsls_atomicoperations_default.h:1542
static void addInt(typename AtomicTypes::Int *atomicInt, int value)
Definition bsls_atomicoperations_default.h:1462
static int decrementIntNvAcqRel(typename AtomicTypes::Int *atomicInt)
Definition bsls_atomicoperations_default.h:1526
static void incrementInt(typename AtomicTypes::Int *atomicInt)
Definition bsls_atomicoperations_default.h:1534
static int addIntNvRelaxed(typename AtomicTypes::Int *atomicInt, int value)
Definition bsls_atomicoperations_default.h:1494
static int swapIntAcqRel(typename AtomicTypes::Int *atomicInt, int swapValue)
Definition bsls_atomicoperations_default.h:1443
Atomic_TypeTraits< IMP > AtomicTypes
Definition bsls_atomicoperations_default.h:347
static void addIntAcqRel(typename AtomicTypes::Int *atomicInt, int value)
Definition bsls_atomicoperations_default.h:1470
static void initInt(typename AtomicTypes::Int *atomicInt, int initialValue=0)
Definition bsls_atomicoperations_default.h:1419
static int incrementIntNvAcqRel(typename AtomicTypes::Int *atomicInt)
Definition bsls_atomicoperations_default.h:1558
static int getIntRelaxed(typename AtomicTypes::Int const *atomicInt)
Definition bsls_atomicoperations_default.h:1411
static void setIntRelaxed(typename AtomicTypes::Int *atomicInt, int value)
Definition bsls_atomicoperations_default.h:1427
static int getIntAcquire(typename AtomicTypes::Int const *atomicInt)
Definition bsls_atomicoperations_default.h:1403
static int addIntNvAcqRel(typename AtomicTypes::Int *atomicInt, int value)
Definition bsls_atomicoperations_default.h:1486
static int incrementIntNv(typename AtomicTypes::Int *atomicInt)
Definition bsls_atomicoperations_default.h:1550
static void decrementInt(typename AtomicTypes::Int *atomicInt)
Definition bsls_atomicoperations_default.h:1502
static int decrementIntNv(typename AtomicTypes::Int *atomicInt)
Definition bsls_atomicoperations_default.h:1518
static void decrementIntAcqRel(typename AtomicTypes::Int *atomicInt)
Definition bsls_atomicoperations_default.h:1510
static int subtractIntNvAcqRel(typename AtomicTypes::Int *atomicInt, int value)
Definition bsls_atomicoperations_default.h:1577
static int subtractIntNv(typename AtomicTypes::Int *atomicInt, int value)
Definition bsls_atomicoperations_default.h:1566
static int subtractIntNvRelaxed(typename AtomicTypes::Int *atomicInt, int value)
Definition bsls_atomicoperations_default.h:1588
Definition bsls_atomicoperations_default.h:1169
static void initPointer(typename AtomicTypes::Pointer *atomicPtr, void *initialValue=0)
Definition bsls_atomicoperations_default.h:2421
static void setPtrRelease(typename AtomicTypes::Pointer *atomicPtr, void *value)
Definition bsls_atomicoperations_default.h:2449
static void * getPtrAcquire(typename AtomicTypes::Pointer const *atomicPtr)
Definition bsls_atomicoperations_default.h:2400
Atomic_TypeTraits< IMP > AtomicTypes
Definition bsls_atomicoperations_default.h:1171
static void * getPtr(typename AtomicTypes::Pointer const *atomicPtr)
Definition bsls_atomicoperations_default.h:2389
static void setPtrRelaxed(typename AtomicTypes::Pointer *atomicPtr, void *value)
Definition bsls_atomicoperations_default.h:2439
static void * swapPtr(typename AtomicTypes::Pointer *atomicPtr, void *swapValue)
Definition bsls_atomicoperations_default.h:2459
static void * testAndSwapPtrAcqRel(typename AtomicTypes::Pointer *atomicPtr, void *compareValue, void *swapValue)
Definition bsls_atomicoperations_default.h:2495
static void * swapPtrAcqRel(typename AtomicTypes::Pointer *atomicPtr, void *swapValue)
Definition bsls_atomicoperations_default.h:2470
static void setPtr(typename AtomicTypes::Pointer *atomicPtr, void *value)
Definition bsls_atomicoperations_default.h:2429
static void * testAndSwapPtr(typename AtomicTypes::Pointer *atomicPtr, void *compareValue, void *swapValue)
Definition bsls_atomicoperations_default.h:2481
static void * getPtrRelaxed(typename AtomicTypes::Pointer const *atomicPtr)
Definition bsls_atomicoperations_default.h:2411
Definition bsls_atomicoperations_default.h:1284
static void * swapPtrAcqRel(typename AtomicTypes::Pointer *atomicPtr, void *swapValue)
Definition bsls_atomicoperations_default.h:2596
static void * swapPtr(typename AtomicTypes::Pointer *atomicPtr, void *swapValue)
Definition bsls_atomicoperations_default.h:2585
static void * testAndSwapPtrAcqRel(typename AtomicTypes::Pointer *atomicPtr, void *compareValue, void *swapValue)
Definition bsls_atomicoperations_default.h:2621
static void initPointer(typename AtomicTypes::Pointer *atomicPtr, void *initialValue=0)
Definition bsls_atomicoperations_default.h:2547
Atomic_TypeTraits< IMP > AtomicTypes
Definition bsls_atomicoperations_default.h:1286
static void * getPtrAcquire(typename AtomicTypes::Pointer const *atomicPtr)
Definition bsls_atomicoperations_default.h:2526
static void * getPtrRelaxed(typename AtomicTypes::Pointer const *atomicPtr)
Definition bsls_atomicoperations_default.h:2537
static void setPtrRelaxed(typename AtomicTypes::Pointer *atomicPtr, void *value)
Definition bsls_atomicoperations_default.h:2565
static void * getPtr(typename AtomicTypes::Pointer const *atomicPtr)
Definition bsls_atomicoperations_default.h:2515
static void setPtrRelease(typename AtomicTypes::Pointer *atomicPtr, void *value)
Definition bsls_atomicoperations_default.h:2575
static void * testAndSwapPtr(typename AtomicTypes::Pointer *atomicPtr, void *compareValue, void *swapValue)
Definition bsls_atomicoperations_default.h:2607
static void setPtr(typename AtomicTypes::Pointer *atomicPtr, void *value)
Definition bsls_atomicoperations_default.h:2555
Definition bsls_atomicoperations_default.h:954
static Types::Uint64 swapUint64(typename AtomicTypes::Uint64 *atomicUint, Types::Uint64 swapValue)
Definition bsls_atomicoperations_default.h:2167
static Types::Uint64 decrementUint64Nv(typename AtomicTypes::Uint64 *atomicUint)
Definition bsls_atomicoperations_default.h:2301
static void initUint64(typename AtomicTypes::Uint64 *atomicUint, Types::Uint64 initialValue=0)
Definition bsls_atomicoperations_default.h:2129
static Types::Uint64 incrementUint64Nv(typename AtomicTypes::Uint64 *atomicUint)
Definition bsls_atomicoperations_default.h:2335
static void addUint64(typename AtomicTypes::Uint64 *atomicUint, Types::Uint64 value)
Definition bsls_atomicoperations_default.h:2220
static void setUint64Relaxed(typename AtomicTypes::Uint64 *atomicUint, Types::Uint64 value)
Definition bsls_atomicoperations_default.h:2147
static Types::Uint64 subtractUint64Nv(typename AtomicTypes::Uint64 *atomicUint, Types::Uint64 value)
Definition bsls_atomicoperations_default.h:2350
static Types::Uint64 subtractUint64NvAcqRel(typename AtomicTypes::Uint64 *atomicUint, Types::Uint64 value)
Definition bsls_atomicoperations_default.h:2361
static void setUint64Release(typename AtomicTypes::Uint64 *atomicUint, Types::Uint64 value)
Definition bsls_atomicoperations_default.h:2156
static void incrementUint64AcqRel(typename AtomicTypes::Uint64 *atomicUint)
Definition bsls_atomicoperations_default.h:2327
static void decrementUint64(typename AtomicTypes::Uint64 *atomicUint)
Definition bsls_atomicoperations_default.h:2283
static Types::Uint64 getUint64(typename AtomicTypes::Uint64 const *atomicUint)
Definition bsls_atomicoperations_default.h:2103
static Types::Uint64 addUint64NvRelaxed(typename AtomicTypes::Uint64 *atomicUint, Types::Uint64 value)
Definition bsls_atomicoperations_default.h:2271
static void incrementUint64(typename AtomicTypes::Uint64 *atomicUint)
Definition bsls_atomicoperations_default.h:2319
static Types::Uint64 getUint64Relaxed(typename AtomicTypes::Uint64 const *atomicUint)
Definition bsls_atomicoperations_default.h:2122
static Types::Uint64 decrementUint64NvAcqRel(typename AtomicTypes::Uint64 *atomicUint)
Definition bsls_atomicoperations_default.h:2309
Atomic_TypeTraits< IMP > AtomicTypes
Definition bsls_atomicoperations_default.h:957
static void setUint64(typename AtomicTypes::Uint64 *atomicUint, Types::Uint64 value)
Definition bsls_atomicoperations_default.h:2139
static void addUint64Relaxed(typename AtomicTypes::Uint64 *atomicUint, Types::Uint64 value)
Definition bsls_atomicoperations_default.h:2239
static Types::Uint64 addUint64NvAcqRel(typename AtomicTypes::Uint64 *atomicUint, Types::Uint64 value)
Definition bsls_atomicoperations_default.h:2260
static void addUint64AcqRel(typename AtomicTypes::Uint64 *atomicUint, Types::Uint64 value)
Definition bsls_atomicoperations_default.h:2229
static Types::Uint64 testAndSwapUint64(typename AtomicTypes::Uint64 *atomicUint, Types::Uint64 compareValue, Types::Uint64 swapValue)
Definition bsls_atomicoperations_default.h:2191
static Types::Uint64 incrementUint64NvAcqRel(typename AtomicTypes::Uint64 *atomicUint)
Definition bsls_atomicoperations_default.h:2343
static Types::Uint64 subtractUint64NvRelaxed(typename AtomicTypes::Uint64 *atomicUint, Types::Uint64 value)
Definition bsls_atomicoperations_default.h:2372
static Types::Uint64 getUint64Acquire(typename AtomicTypes::Uint64 const *atomicUint)
Definition bsls_atomicoperations_default.h:2113
static Types::Uint64 testAndSwapUint64AcqRel(typename AtomicTypes::Uint64 *atomicUint, Types::Uint64 compareValue, Types::Uint64 swapValue)
Definition bsls_atomicoperations_default.h:2205
static void decrementUint64AcqRel(typename AtomicTypes::Uint64 *atomicUint)
Definition bsls_atomicoperations_default.h:2292
static Types::Uint64 swapUint64AcqRel(typename AtomicTypes::Uint64 *atomicUint, Types::Uint64 swapValue)
Definition bsls_atomicoperations_default.h:2179
static Types::Uint64 addUint64Nv(typename AtomicTypes::Uint64 *atomicUint, Types::Uint64 value)
Definition bsls_atomicoperations_default.h:2249
Definition bsls_atomicoperations_default.h:737
static unsigned int subtractUintNvRelaxed(typename AtomicTypes::Uint *atomicUint, unsigned int value)
Definition bsls_atomicoperations_default.h:2085
static unsigned int swapUint(typename AtomicTypes::Uint *atomicUint, unsigned int swapValue)
Definition bsls_atomicoperations_default.h:1881
static void addUintRelaxed(typename AtomicTypes::Uint *atomicUint, unsigned int value)
Definition bsls_atomicoperations_default.h:1952
static unsigned int incrementUintNv(typename AtomicTypes::Uint *atomicUint)
Definition bsls_atomicoperations_default.h:2047
static unsigned int decrementUintNv(typename AtomicTypes::Uint *atomicUint)
Definition bsls_atomicoperations_default.h:2013
static void addUintAcqRel(typename AtomicTypes::Uint *atomicUint, unsigned int value)
Definition bsls_atomicoperations_default.h:1942
static unsigned int addUintNv(typename AtomicTypes::Uint *atomicUint, unsigned int value)
Definition bsls_atomicoperations_default.h:1962
static void setUintRelaxed(typename AtomicTypes::Uint *atomicUint, unsigned int value)
Definition bsls_atomicoperations_default.h:1863
static unsigned int addUintNvRelaxed(typename AtomicTypes::Uint *atomicUint, unsigned int value)
Definition bsls_atomicoperations_default.h:1983
static void setUintRelease(typename AtomicTypes::Uint *atomicUint, unsigned int value)
Definition bsls_atomicoperations_default.h:1871
static unsigned int decrementUintNvAcqRel(typename AtomicTypes::Uint *atomicUint)
Definition bsls_atomicoperations_default.h:2021
static unsigned int incrementUintNvAcqRel(typename AtomicTypes::Uint *atomicUint)
Definition bsls_atomicoperations_default.h:2055
static unsigned int getUintAcquire(typename AtomicTypes::Uint const *atomicUint)
Definition bsls_atomicoperations_default.h:1828
static void incrementUintAcqRel(typename AtomicTypes::Uint *atomicUint)
Definition bsls_atomicoperations_default.h:2039
static void decrementUint(typename AtomicTypes::Uint *atomicUint)
Definition bsls_atomicoperations_default.h:1996
static unsigned int swapUintAcqRel(typename AtomicTypes::Uint *atomicUint, unsigned int swapValue)
Definition bsls_atomicoperations_default.h:1891
static void addUint(typename AtomicTypes::Uint *atomicUint, unsigned int value)
Definition bsls_atomicoperations_default.h:1933
static unsigned int subtractUintNvAcqRel(typename AtomicTypes::Uint *atomicUint, unsigned int value)
Definition bsls_atomicoperations_default.h:2073
static void initUint(typename AtomicTypes::Uint *atomicUint, unsigned int initialValue=0)
Definition bsls_atomicoperations_default.h:1846
static unsigned int addUintNvAcqRel(typename AtomicTypes::Uint *atomicUint, unsigned int value)
Definition bsls_atomicoperations_default.h:1973
static unsigned int testAndSwapUint(typename AtomicTypes::Uint *atomicUint, unsigned int compareValue, unsigned int swapValue)
Definition bsls_atomicoperations_default.h:1903
static void setUint(typename AtomicTypes::Uint *atomicUint, unsigned int value)
Definition bsls_atomicoperations_default.h:1854
static void incrementUint(typename AtomicTypes::Uint *atomicUint)
Definition bsls_atomicoperations_default.h:2031
static void decrementUintAcqRel(typename AtomicTypes::Uint *atomicUint)
Definition bsls_atomicoperations_default.h:2004
Atomic_TypeTraits< IMP > AtomicTypes
Definition bsls_atomicoperations_default.h:740
static unsigned int subtractUintNv(typename AtomicTypes::Uint *atomicUint, unsigned int value)
Definition bsls_atomicoperations_default.h:2063
static unsigned int testAndSwapUintAcqRel(typename AtomicTypes::Uint *atomicUint, unsigned int compareValue, unsigned int swapValue)
Definition bsls_atomicoperations_default.h:1917
static unsigned int getUint(typename AtomicTypes::Uint const *atomicUint)
Definition bsls_atomicoperations_default.h:1817
static unsigned int getUintRelaxed(typename AtomicTypes::Uint const *atomicUint)
Definition bsls_atomicoperations_default.h:1838
Definition bsls_atomicoperations_default.h:333
unsigned long long Uint64
Definition bsls_types.h:137
std::ptrdiff_t IntPtr
Definition bsls_types.h:130
long long Int64
Definition bsls_types.h:132