diff --git a/include/boost/atomic/atomic.hpp b/include/boost/atomic/atomic.hpp index d026975..2ce96da 100644 --- a/include/boost/atomic/atomic.hpp +++ b/include/boost/atomic/atomic.hpp @@ -17,8 +17,8 @@ #define BOOST_ATOMIC_ATOMIC_HPP_INCLUDED_ #include +#include #include -#include #include #include #include @@ -91,38 +91,38 @@ using atomic_llong = atomic< long long >; using atomic_address = atomic< void* >; using atomic_bool = atomic< bool >; using atomic_wchar_t = atomic< wchar_t >; -#if defined(__cpp_char8_t) && __cpp_char8_t >= 201811 +#if defined(__cpp_char8_t) && (__cpp_char8_t >= 201811) using atomic_char8_t = atomic< char8_t >; #endif using atomic_char16_t = atomic< char16_t >; using atomic_char32_t = atomic< char32_t >; -using atomic_uint8_t = atomic< uint8_t >; -using atomic_int8_t = atomic< int8_t >; -using atomic_uint16_t = atomic< uint16_t >; -using atomic_int16_t = atomic< int16_t >; -using atomic_uint32_t = atomic< uint32_t >; -using atomic_int32_t = atomic< int32_t >; -using atomic_uint64_t = atomic< uint64_t >; -using atomic_int64_t = atomic< int64_t >; -using atomic_int_least8_t = atomic< int_least8_t >; -using atomic_uint_least8_t = atomic< uint_least8_t >; -using atomic_int_least16_t = atomic< int_least16_t >; -using atomic_uint_least16_t = atomic< uint_least16_t >; -using atomic_int_least32_t = atomic< int_least32_t >; -using atomic_uint_least32_t = atomic< uint_least32_t >; -using atomic_int_least64_t = atomic< int_least64_t >; -using atomic_uint_least64_t = atomic< uint_least64_t >; -using atomic_int_fast8_t = atomic< int_fast8_t >; -using atomic_uint_fast8_t = atomic< uint_fast8_t >; -using atomic_int_fast16_t = atomic< int_fast16_t >; -using atomic_uint_fast16_t = atomic< uint_fast16_t >; -using atomic_int_fast32_t = atomic< int_fast32_t >; -using atomic_uint_fast32_t = atomic< uint_fast32_t >; -using atomic_int_fast64_t = atomic< int_fast64_t >; -using atomic_uint_fast64_t = atomic< uint_fast64_t >; -using atomic_intmax_t = atomic< intmax_t >; -using atomic_uintmax_t = atomic< uintmax_t >; +using atomic_uint8_t = atomic< std::uint8_t >; +using atomic_int8_t = atomic< std::int8_t >; +using atomic_uint16_t = atomic< std::uint16_t >; +using atomic_int16_t = atomic< std::int16_t >; +using atomic_uint32_t = atomic< std::uint32_t >; +using atomic_int32_t = atomic< std::int32_t >; +using atomic_uint64_t = atomic< std::uint64_t >; +using atomic_int64_t = atomic< std::int64_t >; +using atomic_int_least8_t = atomic< std::int_least8_t >; +using atomic_uint_least8_t = atomic< std::uint_least8_t >; +using atomic_int_least16_t = atomic< std::int_least16_t >; +using atomic_uint_least16_t = atomic< std::uint_least16_t >; +using atomic_int_least32_t = atomic< std::int_least32_t >; +using atomic_uint_least32_t = atomic< std::uint_least32_t >; +using atomic_int_least64_t = atomic< std::int_least64_t >; +using atomic_uint_least64_t = atomic< std::uint_least64_t >; +using atomic_int_fast8_t = atomic< std::int_fast8_t >; +using atomic_uint_fast8_t = atomic< std::uint_fast8_t >; +using atomic_int_fast16_t = atomic< std::int_fast16_t >; +using atomic_uint_fast16_t = atomic< std::uint_fast16_t >; +using atomic_int_fast32_t = atomic< std::int_fast32_t >; +using atomic_uint_fast32_t = atomic< std::uint_fast32_t >; +using atomic_int_fast64_t = atomic< std::int_fast64_t >; +using atomic_uint_fast64_t = atomic< std::uint_fast64_t >; +using atomic_intmax_t = atomic< std::intmax_t >; +using atomic_uintmax_t = atomic< std::uintmax_t >; #if !defined(BOOST_ATOMIC_NO_FLOATING_POINT) using atomic_float_t = atomic< float >; @@ -133,37 +133,37 @@ using atomic_long_double_t = atomic< long double >; using atomic_size_t = atomic< std::size_t >; using atomic_ptrdiff_t = atomic< std::ptrdiff_t >; -#if defined(BOOST_HAS_INTPTR_T) -using atomic_intptr_t = atomic< boost::intptr_t >; -using atomic_uintptr_t = atomic< boost::uintptr_t >; +#if defined(UINTPTR_MAX) +using atomic_intptr_t = atomic< std::intptr_t >; +using atomic_uintptr_t = atomic< std::uintptr_t >; #endif // Select the lock-free atomic types that has natively supported waiting/notifying operations. // Prefer 32-bit types the most as those have the best performance on current 32 and 64-bit architectures. #if BOOST_ATOMIC_INT32_LOCK_FREE == 2 && BOOST_ATOMIC_HAS_NATIVE_INT32_WAIT_NOTIFY == 2 -using atomic_unsigned_lock_free = atomic< uint32_t >; -using atomic_signed_lock_free = atomic< int32_t >; +using atomic_unsigned_lock_free = atomic< std::uint32_t >; +using atomic_signed_lock_free = atomic< std::int32_t >; #elif BOOST_ATOMIC_INT64_LOCK_FREE == 2 && BOOST_ATOMIC_HAS_NATIVE_INT64_WAIT_NOTIFY == 2 -using atomic_unsigned_lock_free = atomic< uint64_t >; -using atomic_signed_lock_free = atomic< int64_t >; +using atomic_unsigned_lock_free = atomic< std::uint64_t >; +using atomic_signed_lock_free = atomic< std::int64_t >; #elif BOOST_ATOMIC_INT16_LOCK_FREE == 2 && BOOST_ATOMIC_HAS_NATIVE_INT16_WAIT_NOTIFY == 2 -using atomic_unsigned_lock_free = atomic< uint16_t >; -using atomic_signed_lock_free = atomic< int16_t >; +using atomic_unsigned_lock_free = atomic< std::uint16_t >; +using atomic_signed_lock_free = atomic< std::int16_t >; #elif BOOST_ATOMIC_INT8_LOCK_FREE == 2 && BOOST_ATOMIC_HAS_NATIVE_INT8_WAIT_NOTIFY == 2 -using atomic_unsigned_lock_free = atomic< uint8_t >; -using atomic_signed_lock_free = atomic< int8_t >; +using atomic_unsigned_lock_free = atomic< std::uint8_t >; +using atomic_signed_lock_free = atomic< std::int8_t >; #elif BOOST_ATOMIC_INT32_LOCK_FREE == 2 -using atomic_unsigned_lock_free = atomic< uint32_t >; -using atomic_signed_lock_free = atomic< int32_t >; +using atomic_unsigned_lock_free = atomic< std::uint32_t >; +using atomic_signed_lock_free = atomic< std::int32_t >; #elif BOOST_ATOMIC_INT64_LOCK_FREE == 2 -using atomic_unsigned_lock_free = atomic< uint64_t >; -using atomic_signed_lock_free = atomic< int64_t >; +using atomic_unsigned_lock_free = atomic< std::uint64_t >; +using atomic_signed_lock_free = atomic< std::int64_t >; #elif BOOST_ATOMIC_INT16_LOCK_FREE == 2 -using atomic_unsigned_lock_free = atomic< uint16_t >; -using atomic_signed_lock_free = atomic< int16_t >; +using atomic_unsigned_lock_free = atomic< std::uint16_t >; +using atomic_signed_lock_free = atomic< std::int16_t >; #elif BOOST_ATOMIC_INT8_LOCK_FREE == 2 -using atomic_unsigned_lock_free = atomic< uint8_t >; -using atomic_signed_lock_free = atomic< int8_t >; +using atomic_unsigned_lock_free = atomic< std::uint8_t >; +using atomic_signed_lock_free = atomic< std::int8_t >; #else #define BOOST_ATOMIC_DETAIL_NO_LOCK_FREE_TYPEDEFS #endif @@ -228,7 +228,7 @@ using atomics::atomic_long_double_t; using atomics::atomic_size_t; using atomics::atomic_ptrdiff_t; -#if defined(BOOST_HAS_INTPTR_T) +#if defined(UINTPTR_MAX) using atomics::atomic_intptr_t; using atomics::atomic_uintptr_t; #endif diff --git a/include/boost/atomic/detail/core_arch_ops_gcc_aarch32.hpp b/include/boost/atomic/detail/core_arch_ops_gcc_aarch32.hpp index 2ee8cc4..8eae197 100644 --- a/include/boost/atomic/detail/core_arch_ops_gcc_aarch32.hpp +++ b/include/boost/atomic/detail/core_arch_ops_gcc_aarch32.hpp @@ -15,7 +15,7 @@ #define BOOST_ATOMIC_DETAIL_CORE_ARCH_OPS_GCC_AARCH32_HPP_INCLUDED_ #include -#include +#include #include #include #include @@ -105,7 +105,7 @@ struct core_arch_operations< 1u, Signed, Interprocess > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type original; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -194,7 +194,7 @@ struct core_arch_operations< 1u, Signed, Interprocess > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -220,7 +220,7 @@ struct core_arch_operations< 1u, Signed, Interprocess > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -246,7 +246,7 @@ struct core_arch_operations< 1u, Signed, Interprocess > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -272,7 +272,7 @@ struct core_arch_operations< 1u, Signed, Interprocess > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -298,7 +298,7 @@ struct core_arch_operations< 1u, Signed, Interprocess > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -387,7 +387,7 @@ struct core_arch_operations< 2u, Signed, Interprocess > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type original; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -476,7 +476,7 @@ struct core_arch_operations< 2u, Signed, Interprocess > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -502,7 +502,7 @@ struct core_arch_operations< 2u, Signed, Interprocess > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -528,7 +528,7 @@ struct core_arch_operations< 2u, Signed, Interprocess > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -554,7 +554,7 @@ struct core_arch_operations< 2u, Signed, Interprocess > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -580,7 +580,7 @@ struct core_arch_operations< 2u, Signed, Interprocess > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -669,7 +669,7 @@ struct core_arch_operations< 4u, Signed, Interprocess > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type original; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -756,7 +756,7 @@ struct core_arch_operations< 4u, Signed, Interprocess > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -782,7 +782,7 @@ struct core_arch_operations< 4u, Signed, Interprocess > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -808,7 +808,7 @@ struct core_arch_operations< 4u, Signed, Interprocess > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -834,7 +834,7 @@ struct core_arch_operations< 4u, Signed, Interprocess > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -860,7 +860,7 @@ struct core_arch_operations< 4u, Signed, Interprocess > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -925,7 +925,7 @@ struct core_arch_operations< 8u, Signed, Interprocess > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type original; - uint32_t tmp; + std::uint32_t tmp; if ((static_cast< unsigned int >(order) & static_cast< unsigned int >(memory_order_release)) != 0u) { __asm__ __volatile__ @@ -986,7 +986,7 @@ struct core_arch_operations< 8u, Signed, Interprocess > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type original; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -1077,7 +1077,7 @@ struct core_arch_operations< 8u, Signed, Interprocess > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -1104,7 +1104,7 @@ struct core_arch_operations< 8u, Signed, Interprocess > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -1131,7 +1131,7 @@ struct core_arch_operations< 8u, Signed, Interprocess > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -1158,7 +1158,7 @@ struct core_arch_operations< 8u, Signed, Interprocess > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -1185,7 +1185,7 @@ struct core_arch_operations< 8u, Signed, Interprocess > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ diff --git a/include/boost/atomic/detail/core_arch_ops_gcc_aarch64.hpp b/include/boost/atomic/detail/core_arch_ops_gcc_aarch64.hpp index 85f17c7..c249d60 100644 --- a/include/boost/atomic/detail/core_arch_ops_gcc_aarch64.hpp +++ b/include/boost/atomic/detail/core_arch_ops_gcc_aarch64.hpp @@ -15,7 +15,7 @@ #define BOOST_ATOMIC_DETAIL_CORE_ARCH_OPS_GCC_AARCH64_HPP_INCLUDED_ #include -#include +#include #include #include #include @@ -126,7 +126,7 @@ struct core_arch_operations< 1u, Signed, Interprocess > : : "memory"\ ); #else - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -260,7 +260,7 @@ struct core_arch_operations< 1u, Signed, Interprocess > : ); #else storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -301,7 +301,7 @@ struct core_arch_operations< 1u, Signed, Interprocess > : #else storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -341,7 +341,7 @@ struct core_arch_operations< 1u, Signed, Interprocess > : ); #else storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -379,7 +379,7 @@ struct core_arch_operations< 1u, Signed, Interprocess > : ); #else storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -417,7 +417,7 @@ struct core_arch_operations< 1u, Signed, Interprocess > : ); #else storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -532,7 +532,7 @@ struct core_arch_operations< 2u, Signed, Interprocess > : : "memory"\ ); #else - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -666,7 +666,7 @@ struct core_arch_operations< 2u, Signed, Interprocess > : ); #else storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -707,7 +707,7 @@ struct core_arch_operations< 2u, Signed, Interprocess > : #else storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -747,7 +747,7 @@ struct core_arch_operations< 2u, Signed, Interprocess > : ); #else storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -785,7 +785,7 @@ struct core_arch_operations< 2u, Signed, Interprocess > : ); #else storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -823,7 +823,7 @@ struct core_arch_operations< 2u, Signed, Interprocess > : ); #else storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -938,7 +938,7 @@ struct core_arch_operations< 4u, Signed, Interprocess > : : "memory"\ ); #else - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -1070,7 +1070,7 @@ struct core_arch_operations< 4u, Signed, Interprocess > : ); #else storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -1111,7 +1111,7 @@ struct core_arch_operations< 4u, Signed, Interprocess > : #else storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -1151,7 +1151,7 @@ struct core_arch_operations< 4u, Signed, Interprocess > : ); #else storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -1189,7 +1189,7 @@ struct core_arch_operations< 4u, Signed, Interprocess > : ); #else storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -1227,7 +1227,7 @@ struct core_arch_operations< 4u, Signed, Interprocess > : ); #else storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -1342,7 +1342,7 @@ struct core_arch_operations< 8u, Signed, Interprocess > : : "memory"\ ); #else - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -1474,7 +1474,7 @@ struct core_arch_operations< 8u, Signed, Interprocess > : ); #else storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -1515,7 +1515,7 @@ struct core_arch_operations< 8u, Signed, Interprocess > : #else storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -1555,7 +1555,7 @@ struct core_arch_operations< 8u, Signed, Interprocess > : ); #else storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -1593,7 +1593,7 @@ struct core_arch_operations< 8u, Signed, Interprocess > : ); #else storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -1631,7 +1631,7 @@ struct core_arch_operations< 8u, Signed, Interprocess > : ); #else storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -1695,7 +1695,7 @@ struct core_arch_operations< 16u, Signed, Interprocess > : union storage_union { storage_type as_storage; - uint64_t as_uint64[2u]; + std::uint64_t as_uint64[2u]; }; static BOOST_FORCEINLINE void store(storage_type volatile& storage, storage_type v, memory_order order) noexcept @@ -1703,7 +1703,7 @@ struct core_arch_operations< 16u, Signed, Interprocess > : BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_union original; storage_union value = { v }; - uint32_t tmp; + std::uint32_t tmp; if ((static_cast< unsigned int >(order) & static_cast< unsigned int >(memory_order_release)) != 0u) { @@ -1736,7 +1736,7 @@ struct core_arch_operations< 16u, Signed, Interprocess > : static BOOST_FORCEINLINE storage_type load(storage_type const volatile& storage, memory_order order) noexcept { storage_union v; - uint32_t tmp; + std::uint32_t tmp; if ((static_cast< unsigned int >(order) & (static_cast< unsigned int >(memory_order_consume) | static_cast< unsigned int >(memory_order_acquire))) != 0u) { __asm__ __volatile__ @@ -1773,7 +1773,7 @@ struct core_arch_operations< 16u, Signed, Interprocess > : BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_union original; storage_union value = { v }; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -1869,7 +1869,7 @@ struct core_arch_operations< 16u, Signed, Interprocess > : storage_union original; storage_union value = { v }; storage_union result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -1900,7 +1900,7 @@ struct core_arch_operations< 16u, Signed, Interprocess > : storage_union original; storage_union value = { v }; storage_union result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -1931,7 +1931,7 @@ struct core_arch_operations< 16u, Signed, Interprocess > : storage_union original; storage_union value = { v }; storage_union result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -1962,7 +1962,7 @@ struct core_arch_operations< 16u, Signed, Interprocess > : storage_union original; storage_union value = { v }; storage_union result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -1993,7 +1993,7 @@ struct core_arch_operations< 16u, Signed, Interprocess > : storage_union original; storage_union value = { v }; storage_union result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ diff --git a/include/boost/atomic/detail/core_arch_ops_gcc_arm.hpp b/include/boost/atomic/detail/core_arch_ops_gcc_arm.hpp index e5c2637..9e80a74 100644 --- a/include/boost/atomic/detail/core_arch_ops_gcc_arm.hpp +++ b/include/boost/atomic/detail/core_arch_ops_gcc_arm.hpp @@ -17,7 +17,7 @@ #define BOOST_ATOMIC_DETAIL_CORE_ARCH_OPS_GCC_ARM_HPP_INCLUDED_ #include -#include +#include #include #include #include @@ -85,7 +85,7 @@ struct core_arch_operations< 4u, Signed, Interprocess > : { fence_before(order); storage_type original; - uint32_t tmp; + std::uint32_t tmp; __asm__ __volatile__ ( BOOST_ATOMIC_DETAIL_ARM_ASM_START(%[tmp]) @@ -109,7 +109,7 @@ struct core_arch_operations< 4u, Signed, Interprocess > : fence_before(success_order); bool success = false; #if !defined(BOOST_ATOMIC_DETAIL_ARM_ASM_TMPREG_UNUSED) - uint32_t tmp; + std::uint32_t tmp; #endif storage_type original; __asm__ __volatile__ @@ -145,7 +145,7 @@ struct core_arch_operations< 4u, Signed, Interprocess > : fence_before(success_order); bool success = false; #if !defined(BOOST_ATOMIC_DETAIL_ARM_ASM_TMPREG_UNUSED) - uint32_t tmp; + std::uint32_t tmp; #endif storage_type original; __asm__ __volatile__ @@ -181,7 +181,7 @@ struct core_arch_operations< 4u, Signed, Interprocess > : static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order order) noexcept { fence_before(order); - uint32_t tmp; + std::uint32_t tmp; storage_type original, result; __asm__ __volatile__ ( @@ -207,7 +207,7 @@ struct core_arch_operations< 4u, Signed, Interprocess > : static BOOST_FORCEINLINE storage_type fetch_sub(storage_type volatile& storage, storage_type v, memory_order order) noexcept { fence_before(order); - uint32_t tmp; + std::uint32_t tmp; storage_type original, result; __asm__ __volatile__ ( @@ -233,7 +233,7 @@ struct core_arch_operations< 4u, Signed, Interprocess > : static BOOST_FORCEINLINE storage_type fetch_and(storage_type volatile& storage, storage_type v, memory_order order) noexcept { fence_before(order); - uint32_t tmp; + std::uint32_t tmp; storage_type original, result; __asm__ __volatile__ ( @@ -259,7 +259,7 @@ struct core_arch_operations< 4u, Signed, Interprocess > : static BOOST_FORCEINLINE storage_type fetch_or(storage_type volatile& storage, storage_type v, memory_order order) noexcept { fence_before(order); - uint32_t tmp; + std::uint32_t tmp; storage_type original, result; __asm__ __volatile__ ( @@ -285,7 +285,7 @@ struct core_arch_operations< 4u, Signed, Interprocess > : static BOOST_FORCEINLINE storage_type fetch_xor(storage_type volatile& storage, storage_type v, memory_order order) noexcept { fence_before(order); - uint32_t tmp; + std::uint32_t tmp; storage_type original, result; __asm__ __volatile__ ( @@ -351,7 +351,7 @@ struct core_arch_operations< 1u, Signed, Interprocess > : { fence_before(order); extended_storage_type original; - uint32_t tmp; + std::uint32_t tmp; __asm__ __volatile__ ( BOOST_ATOMIC_DETAIL_ARM_ASM_START(%[tmp]) @@ -375,7 +375,7 @@ struct core_arch_operations< 1u, Signed, Interprocess > : fence_before(success_order); bool success = false; #if !defined(BOOST_ATOMIC_DETAIL_ARM_ASM_TMPREG_UNUSED) - uint32_t tmp; + std::uint32_t tmp; #endif extended_storage_type original; __asm__ __volatile__ @@ -411,7 +411,7 @@ struct core_arch_operations< 1u, Signed, Interprocess > : fence_before(success_order); bool success = false; #if !defined(BOOST_ATOMIC_DETAIL_ARM_ASM_TMPREG_UNUSED) - uint32_t tmp; + std::uint32_t tmp; #endif extended_storage_type original; __asm__ __volatile__ @@ -447,7 +447,7 @@ struct core_arch_operations< 1u, Signed, Interprocess > : static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order order) noexcept { fence_before(order); - uint32_t tmp; + std::uint32_t tmp; extended_storage_type original, result; __asm__ __volatile__ ( @@ -473,7 +473,7 @@ struct core_arch_operations< 1u, Signed, Interprocess > : static BOOST_FORCEINLINE storage_type fetch_sub(storage_type volatile& storage, storage_type v, memory_order order) noexcept { fence_before(order); - uint32_t tmp; + std::uint32_t tmp; extended_storage_type original, result; __asm__ __volatile__ ( @@ -499,7 +499,7 @@ struct core_arch_operations< 1u, Signed, Interprocess > : static BOOST_FORCEINLINE storage_type fetch_and(storage_type volatile& storage, storage_type v, memory_order order) noexcept { fence_before(order); - uint32_t tmp; + std::uint32_t tmp; extended_storage_type original, result; __asm__ __volatile__ ( @@ -525,7 +525,7 @@ struct core_arch_operations< 1u, Signed, Interprocess > : static BOOST_FORCEINLINE storage_type fetch_or(storage_type volatile& storage, storage_type v, memory_order order) noexcept { fence_before(order); - uint32_t tmp; + std::uint32_t tmp; extended_storage_type original, result; __asm__ __volatile__ ( @@ -551,7 +551,7 @@ struct core_arch_operations< 1u, Signed, Interprocess > : static BOOST_FORCEINLINE storage_type fetch_xor(storage_type volatile& storage, storage_type v, memory_order order) noexcept { fence_before(order); - uint32_t tmp; + std::uint32_t tmp; extended_storage_type original, result; __asm__ __volatile__ ( @@ -597,7 +597,7 @@ struct core_arch_operations< 1u, false, Interprocess > : static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order order) noexcept { base_type::fence_before(order); - uint32_t tmp; + std::uint32_t tmp; storage_type original, result; __asm__ __volatile__ ( @@ -624,7 +624,7 @@ struct core_arch_operations< 1u, false, Interprocess > : static BOOST_FORCEINLINE storage_type fetch_sub(storage_type volatile& storage, storage_type v, memory_order order) noexcept { base_type::fence_before(order); - uint32_t tmp; + std::uint32_t tmp; storage_type original, result; __asm__ __volatile__ ( @@ -659,7 +659,7 @@ struct core_arch_operations< 1u, true, Interprocess > : static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order order) noexcept { base_type::fence_before(order); - uint32_t tmp; + std::uint32_t tmp; storage_type original, result; __asm__ __volatile__ ( @@ -686,7 +686,7 @@ struct core_arch_operations< 1u, true, Interprocess > : static BOOST_FORCEINLINE storage_type fetch_sub(storage_type volatile& storage, storage_type v, memory_order order) noexcept { base_type::fence_before(order); - uint32_t tmp; + std::uint32_t tmp; storage_type original, result; __asm__ __volatile__ ( @@ -745,7 +745,7 @@ struct core_arch_operations< 2u, Signed, Interprocess > : { fence_before(order); extended_storage_type original; - uint32_t tmp; + std::uint32_t tmp; __asm__ __volatile__ ( BOOST_ATOMIC_DETAIL_ARM_ASM_START(%[tmp]) @@ -769,7 +769,7 @@ struct core_arch_operations< 2u, Signed, Interprocess > : fence_before(success_order); bool success = false; #if !defined(BOOST_ATOMIC_DETAIL_ARM_ASM_TMPREG_UNUSED) - uint32_t tmp; + std::uint32_t tmp; #endif extended_storage_type original; __asm__ __volatile__ @@ -805,7 +805,7 @@ struct core_arch_operations< 2u, Signed, Interprocess > : fence_before(success_order); bool success = false; #if !defined(BOOST_ATOMIC_DETAIL_ARM_ASM_TMPREG_UNUSED) - uint32_t tmp; + std::uint32_t tmp; #endif extended_storage_type original; __asm__ __volatile__ @@ -841,7 +841,7 @@ struct core_arch_operations< 2u, Signed, Interprocess > : static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order order) noexcept { fence_before(order); - uint32_t tmp; + std::uint32_t tmp; extended_storage_type original, result; __asm__ __volatile__ ( @@ -867,7 +867,7 @@ struct core_arch_operations< 2u, Signed, Interprocess > : static BOOST_FORCEINLINE storage_type fetch_sub(storage_type volatile& storage, storage_type v, memory_order order) noexcept { fence_before(order); - uint32_t tmp; + std::uint32_t tmp; extended_storage_type original, result; __asm__ __volatile__ ( @@ -893,7 +893,7 @@ struct core_arch_operations< 2u, Signed, Interprocess > : static BOOST_FORCEINLINE storage_type fetch_and(storage_type volatile& storage, storage_type v, memory_order order) noexcept { fence_before(order); - uint32_t tmp; + std::uint32_t tmp; extended_storage_type original, result; __asm__ __volatile__ ( @@ -919,7 +919,7 @@ struct core_arch_operations< 2u, Signed, Interprocess > : static BOOST_FORCEINLINE storage_type fetch_or(storage_type volatile& storage, storage_type v, memory_order order) noexcept { fence_before(order); - uint32_t tmp; + std::uint32_t tmp; extended_storage_type original, result; __asm__ __volatile__ ( @@ -945,7 +945,7 @@ struct core_arch_operations< 2u, Signed, Interprocess > : static BOOST_FORCEINLINE storage_type fetch_xor(storage_type volatile& storage, storage_type v, memory_order order) noexcept { fence_before(order); - uint32_t tmp; + std::uint32_t tmp; extended_storage_type original, result; __asm__ __volatile__ ( @@ -991,7 +991,7 @@ struct core_arch_operations< 2u, false, Interprocess > : static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order order) noexcept { base_type::fence_before(order); - uint32_t tmp; + std::uint32_t tmp; storage_type original, result; __asm__ __volatile__ ( @@ -1018,7 +1018,7 @@ struct core_arch_operations< 2u, false, Interprocess > : static BOOST_FORCEINLINE storage_type fetch_sub(storage_type volatile& storage, storage_type v, memory_order order) noexcept { base_type::fence_before(order); - uint32_t tmp; + std::uint32_t tmp; storage_type original, result; __asm__ __volatile__ ( @@ -1053,7 +1053,7 @@ struct core_arch_operations< 2u, true, Interprocess > : static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order order) noexcept { base_type::fence_before(order); - uint32_t tmp; + std::uint32_t tmp; storage_type original, result; __asm__ __volatile__ ( @@ -1080,7 +1080,7 @@ struct core_arch_operations< 2u, true, Interprocess > : static BOOST_FORCEINLINE storage_type fetch_sub(storage_type volatile& storage, storage_type v, memory_order order) noexcept { base_type::fence_before(order); - uint32_t tmp; + std::uint32_t tmp; storage_type original, result; __asm__ __volatile__ ( @@ -1149,7 +1149,7 @@ struct core_arch_operations< 8u, Signed, Interprocess > : : "Q" (storage) // %1 ); #else - uint32_t tmp; + std::uint32_t tmp; __asm__ __volatile__ ( BOOST_ATOMIC_DETAIL_ARM_ASM_START(%0) @@ -1168,7 +1168,7 @@ struct core_arch_operations< 8u, Signed, Interprocess > : { fence_before(order); storage_type original; - uint32_t tmp; + std::uint32_t tmp; __asm__ __volatile__ ( BOOST_ATOMIC_DETAIL_ARM_ASM_START(%0) @@ -1194,7 +1194,7 @@ struct core_arch_operations< 8u, Signed, Interprocess > : fence_before(success_order); storage_type original; bool success = false; - uint32_t tmp; + std::uint32_t tmp; __asm__ __volatile__ ( BOOST_ATOMIC_DETAIL_ARM_ASM_START(%0) @@ -1229,7 +1229,7 @@ struct core_arch_operations< 8u, Signed, Interprocess > : fence_before(success_order); storage_type original; bool success = false; - uint32_t tmp; + std::uint32_t tmp; __asm__ __volatile__ ( BOOST_ATOMIC_DETAIL_ARM_ASM_START(%0) @@ -1264,7 +1264,7 @@ struct core_arch_operations< 8u, Signed, Interprocess > : { fence_before(order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; __asm__ __volatile__ ( BOOST_ATOMIC_DETAIL_ARM_ASM_START(%0) @@ -1291,7 +1291,7 @@ struct core_arch_operations< 8u, Signed, Interprocess > : { fence_before(order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; __asm__ __volatile__ ( BOOST_ATOMIC_DETAIL_ARM_ASM_START(%0) @@ -1318,7 +1318,7 @@ struct core_arch_operations< 8u, Signed, Interprocess > : { fence_before(order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; __asm__ __volatile__ ( BOOST_ATOMIC_DETAIL_ARM_ASM_START(%0) @@ -1345,7 +1345,7 @@ struct core_arch_operations< 8u, Signed, Interprocess > : { fence_before(order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; __asm__ __volatile__ ( BOOST_ATOMIC_DETAIL_ARM_ASM_START(%0) @@ -1372,7 +1372,7 @@ struct core_arch_operations< 8u, Signed, Interprocess > : { fence_before(order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; __asm__ __volatile__ ( BOOST_ATOMIC_DETAIL_ARM_ASM_START(%0) diff --git a/include/boost/atomic/detail/core_arch_ops_gcc_x86.hpp b/include/boost/atomic/detail/core_arch_ops_gcc_x86.hpp index 8a7bdf3..7dc2550 100644 --- a/include/boost/atomic/detail/core_arch_ops_gcc_x86.hpp +++ b/include/boost/atomic/detail/core_arch_ops_gcc_x86.hpp @@ -23,7 +23,7 @@ #include #include #if defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG8B) || defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG16B) -#include +#include #include #include #include @@ -452,9 +452,9 @@ template< bool Signed, bool Interprocess > struct gcc_dcas_x86 { using storage_type = typename storage_traits< 8u >::type; - using aliasing_uint32_t = uint32_t BOOST_ATOMIC_DETAIL_MAY_ALIAS; + using aliasing_uint32_t = std::uint32_t BOOST_ATOMIC_DETAIL_MAY_ALIAS; #if defined(__SSE2__) - using xmm_t = uint32_t __attribute__((__vector_size__(16))); + using xmm_t = std::uint32_t __attribute__((__vector_size__(16))); #elif defined(__SSE__) using xmm_t = float __attribute__((__vector_size__(16))); #endif @@ -474,7 +474,7 @@ struct gcc_dcas_x86 { #if defined(__SSE__) #if defined(__SSE2__) - xmm_t value = { static_cast< uint32_t >(v), static_cast< uint32_t >(v >> 32u), 0u, 0u }; + xmm_t value = { static_cast< std::uint32_t >(v), static_cast< std::uint32_t >(v >> 32u), 0u, 0u }; #else xmm_t value; BOOST_ATOMIC_DETAIL_MEMSET(&value, 0, sizeof(value)); @@ -518,7 +518,7 @@ struct gcc_dcas_x86 "jne 1b\n\t" "xchgl %%ebx, %%esi\n\t" : - : "a" ((uint32_t)v), "c" ((uint32_t)(v >> 32u)), [dest] "D" (&storage) + : "a" ((std::uint32_t)v), "c" ((std::uint32_t)(v >> 32u)), [dest] "D" (&storage) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "edx", "memory" ); #else // defined(BOOST_ATOMIC_DETAIL_X86_ASM_PRESERVE_EBX) @@ -530,7 +530,7 @@ struct gcc_dcas_x86 "1: lock; cmpxchg8b %[dest_lo]\n\t" "jne 1b\n\t" : [dest_lo] "=m" (storage), [dest_hi] "=m" (reinterpret_cast< volatile aliasing_uint32_t* >(&storage)[1]) - : [value_lo] "b" ((uint32_t)v), "c" ((uint32_t)(v >> 32u)) + : [value_lo] "b" ((std::uint32_t)v), "c" ((std::uint32_t)(v >> 32u)) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "eax", "edx", "memory" ); #endif // defined(BOOST_ATOMIC_DETAIL_X86_ASM_PRESERVE_EBX) @@ -583,7 +583,7 @@ struct gcc_dcas_x86 #if defined(BOOST_ATOMIC_DETAIL_X86_NO_ASM_AX_DX_PAIRS) - uint32_t value_bits[2]; + std::uint32_t value_bits[2]; // We don't care for comparison result here; the previous value will be stored into value anyway. // Also we don't care for ebx and ecx values, they just have to be equal to eax and edx before cmpxchg8b. @@ -643,7 +643,7 @@ struct gcc_dcas_x86 "lock; cmpxchg8b (%[dest])\n\t" "xchgl %%ebx, %%esi\n\t" : "+A" (expected), [success] "=@ccz" (success) - : "S" ((uint32_t)desired), "c" ((uint32_t)(desired >> 32u)), [dest] "D" (&storage) + : "S" ((std::uint32_t)desired), "c" ((std::uint32_t)(desired >> 32u)), [dest] "D" (&storage) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); #else // defined(BOOST_ATOMIC_DETAIL_ASM_HAS_FLAG_OUTPUTS) @@ -654,7 +654,7 @@ struct gcc_dcas_x86 "xchgl %%ebx, %%esi\n\t" "sete %[success]\n\t" : "+A" (expected), [success] "=qm" (success) - : "S" ((uint32_t)desired), "c" ((uint32_t)(desired >> 32u)), [dest] "D" (&storage) + : "S" ((std::uint32_t)desired), "c" ((std::uint32_t)(desired >> 32u)), [dest] "D" (&storage) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); #endif // defined(BOOST_ATOMIC_DETAIL_ASM_HAS_FLAG_OUTPUTS) @@ -670,7 +670,7 @@ struct gcc_dcas_x86 ( "lock; cmpxchg8b %[dest]\n\t" : "+A" (expected), [dest] "+m" (storage), [success] "=@ccz" (success) - : "b" ((uint32_t)desired), "c" ((uint32_t)(desired >> 32u)) + : "b" ((std::uint32_t)desired), "c" ((std::uint32_t)(desired >> 32u)) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); #else // defined(BOOST_ATOMIC_DETAIL_ASM_HAS_FLAG_OUTPUTS) @@ -679,7 +679,7 @@ struct gcc_dcas_x86 "lock; cmpxchg8b %[dest]\n\t" "sete %[success]\n\t" : "+A" (expected), [dest] "+m" (storage), [success] "=qm" (success) - : "b" ((uint32_t)desired), "c" ((uint32_t)(desired >> 32u)) + : "b" ((std::uint32_t)desired), "c" ((std::uint32_t)(desired >> 32u)) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); #endif // defined(BOOST_ATOMIC_DETAIL_ASM_HAS_FLAG_OUTPUTS) @@ -706,7 +706,7 @@ struct gcc_dcas_x86 #if defined(BOOST_ATOMIC_DETAIL_X86_ASM_PRESERVE_EBX) #if defined(BOOST_ATOMIC_DETAIL_X86_NO_ASM_AX_DX_PAIRS) - uint32_t old_bits[2]; + std::uint32_t old_bits[2]; __asm__ __volatile__ ( "xchgl %%ebx, %%esi\n\t" @@ -717,7 +717,7 @@ struct gcc_dcas_x86 "jne 1b\n\t" "xchgl %%ebx, %%esi\n\t" : "=a" (old_bits[0]), "=d" (old_bits[1]) - : "S" ((uint32_t)v), "c" ((uint32_t)(v >> 32u)), [dest] "D" (&storage) + : "S" ((std::uint32_t)v), "c" ((std::uint32_t)(v >> 32u)), [dest] "D" (&storage) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); @@ -735,7 +735,7 @@ struct gcc_dcas_x86 "jne 1b\n\t" "xchgl %%ebx, %%esi\n\t" : "=A" (old_value) - : "S" ((uint32_t)v), "c" ((uint32_t)(v >> 32u)), [dest] "D" (&storage) + : "S" ((std::uint32_t)v), "c" ((std::uint32_t)(v >> 32u)), [dest] "D" (&storage) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); @@ -744,7 +744,7 @@ struct gcc_dcas_x86 #if defined(__MINGW32__) && ((__GNUC__+0) * 100 + (__GNUC_MINOR__+0)) < 407 // MinGW gcc up to 4.6 has problems with allocating registers in the asm blocks below - uint32_t old_bits[2]; + std::uint32_t old_bits[2]; __asm__ __volatile__ ( "movl (%[dest]), %%eax\n\t" @@ -753,7 +753,7 @@ struct gcc_dcas_x86 "1: lock; cmpxchg8b (%[dest])\n\t" "jne 1b\n\t" : "=&a" (old_bits[0]), "=&d" (old_bits[1]) - : "b" ((uint32_t)v), "c" ((uint32_t)(v >> 32u)), [dest] "DS" (&storage) + : "b" ((std::uint32_t)v), "c" ((std::uint32_t)(v >> 32u)), [dest] "DS" (&storage) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); @@ -761,7 +761,7 @@ struct gcc_dcas_x86 #elif defined(BOOST_ATOMIC_DETAIL_X86_NO_ASM_AX_DX_PAIRS) - uint32_t old_bits[2]; + std::uint32_t old_bits[2]; __asm__ __volatile__ ( "movl %[dest_lo], %%eax\n\t" @@ -770,7 +770,7 @@ struct gcc_dcas_x86 "1: lock; cmpxchg8b %[dest_lo]\n\t" "jne 1b\n\t" : "=&a" (old_bits[0]), "=&d" (old_bits[1]), [dest_lo] "+m" (storage), [dest_hi] "+m" (reinterpret_cast< volatile aliasing_uint32_t* >(&storage)[1]) - : "b" ((uint32_t)v), "c" ((uint32_t)(v >> 32u)) + : "b" ((std::uint32_t)v), "c" ((std::uint32_t)(v >> 32u)) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); @@ -786,7 +786,7 @@ struct gcc_dcas_x86 "1: lock; cmpxchg8b %[dest_lo]\n\t" "jne 1b\n\t" : "=&A" (old_value), [dest_lo] "+m" (storage), [dest_hi] "+m" (reinterpret_cast< volatile aliasing_uint32_t* >(&storage)[1]) - : "b" ((uint32_t)v), "c" ((uint32_t)(v >> 32u)) + : "b" ((std::uint32_t)v), "c" ((std::uint32_t)(v >> 32u)) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); @@ -923,9 +923,9 @@ template< bool Signed, bool Interprocess > struct gcc_dcas_x86_64 { using storage_type = typename storage_traits< 16u >::type; - using aliasing_uint64_t = uint64_t BOOST_ATOMIC_DETAIL_MAY_ALIAS; + using aliasing_uint64_t = std::uint64_t BOOST_ATOMIC_DETAIL_MAY_ALIAS; #if defined(__AVX__) - using xmm_t = uint64_t __attribute__((__vector_size__(16))); + using xmm_t = std::uint64_t __attribute__((__vector_size__(16))); #endif static constexpr std::size_t storage_size = 16u; @@ -945,7 +945,7 @@ struct gcc_dcas_x86_64 // According to SDM Volume 3, 8.1.1 Guaranteed Atomic Operations, processors supporting AVX guarantee // aligned vector moves to be atomic. #if defined(BOOST_HAS_INT128) - xmm_t value = { static_cast< uint64_t >(v), static_cast< uint64_t >(v >> 64u) }; + xmm_t value = { static_cast< std::uint64_t >(v), static_cast< std::uint64_t >(v >> 64u) }; #else xmm_t value; BOOST_ATOMIC_DETAIL_MEMCPY(&value, &v, sizeof(v)); @@ -1010,7 +1010,7 @@ struct gcc_dcas_x86_64 #if defined(BOOST_ATOMIC_DETAIL_X86_NO_ASM_AX_DX_PAIRS) - uint64_t value_bits[2]; + std::uint64_t value_bits[2]; // We don't care for comparison result here; the previous value will be stored into value anyway. // Also we don't care for rbx and rcx values, they just have to be equal to rax and rdx before cmpxchg16b. @@ -1119,7 +1119,7 @@ struct gcc_dcas_x86_64 storage_type old_value; #if defined(BOOST_ATOMIC_DETAIL_X86_NO_ASM_AX_DX_PAIRS) - uint64_t old_bits[2]; + std::uint64_t old_bits[2]; __asm__ __volatile__ ( "movq %[dest_lo], %%rax\n\t" diff --git a/include/boost/atomic/detail/core_arch_ops_msvc_x86.hpp b/include/boost/atomic/detail/core_arch_ops_msvc_x86.hpp index fc7ecd6..418b6e4 100644 --- a/include/boost/atomic/detail/core_arch_ops_msvc_x86.hpp +++ b/include/boost/atomic/detail/core_arch_ops_msvc_x86.hpp @@ -17,7 +17,7 @@ #define BOOST_ATOMIC_DETAIL_CORE_ARCH_OPS_MSVC_X86_HPP_INCLUDED_ #include -#include +#include #include #include #include @@ -27,7 +27,6 @@ #include #include #if defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG8B) || defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG16B) -#include #include #include #endif @@ -625,7 +624,7 @@ struct msvc_dcas_x86 } else { - uint32_t backup; + std::uint32_t backup; __asm { mov backup, ebx @@ -713,7 +712,7 @@ struct msvc_dcas_x86 expected = old_val; #else bool result; - uint32_t backup; + std::uint32_t backup; __asm { mov backup, ebx @@ -746,7 +745,7 @@ struct msvc_dcas_x86 BOOST_ATOMIC_DETAIL_COMPILER_BARRIER(); storage_type volatile* p = &storage; - uint32_t backup; + std::uint32_t backup; __asm { mov backup, ebx diff --git a/include/boost/atomic/detail/extra_ops_gcc_aarch32.hpp b/include/boost/atomic/detail/extra_ops_gcc_aarch32.hpp index c9861a4..e9d4bd1 100644 --- a/include/boost/atomic/detail/extra_ops_gcc_aarch32.hpp +++ b/include/boost/atomic/detail/extra_ops_gcc_aarch32.hpp @@ -15,7 +15,7 @@ #define BOOST_ATOMIC_DETAIL_EXTRA_OPS_GCC_AARCH32_HPP_INCLUDED_ #include -#include +#include #include #include #include @@ -128,7 +128,7 @@ struct extra_operations_gcc_aarch32< Base, 1u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -154,7 +154,7 @@ struct extra_operations_gcc_aarch32< Base, 1u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -180,7 +180,7 @@ struct extra_operations_gcc_aarch32< Base, 1u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -206,7 +206,7 @@ struct extra_operations_gcc_aarch32< Base, 1u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -232,7 +232,7 @@ struct extra_operations_gcc_aarch32< Base, 1u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -258,7 +258,7 @@ struct extra_operations_gcc_aarch32< Base, 1u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -284,7 +284,7 @@ struct extra_operations_gcc_aarch32< Base, 1u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -310,7 +310,7 @@ struct extra_operations_gcc_aarch32< Base, 1u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -336,7 +336,7 @@ struct extra_operations_gcc_aarch32< Base, 1u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -377,7 +377,7 @@ struct extra_operations_gcc_aarch32< Base, 2u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -403,7 +403,7 @@ struct extra_operations_gcc_aarch32< Base, 2u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -429,7 +429,7 @@ struct extra_operations_gcc_aarch32< Base, 2u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -455,7 +455,7 @@ struct extra_operations_gcc_aarch32< Base, 2u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -481,7 +481,7 @@ struct extra_operations_gcc_aarch32< Base, 2u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -507,7 +507,7 @@ struct extra_operations_gcc_aarch32< Base, 2u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -533,7 +533,7 @@ struct extra_operations_gcc_aarch32< Base, 2u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -559,7 +559,7 @@ struct extra_operations_gcc_aarch32< Base, 2u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -585,7 +585,7 @@ struct extra_operations_gcc_aarch32< Base, 2u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -625,7 +625,7 @@ struct extra_operations_gcc_aarch32< Base, 4u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -651,7 +651,7 @@ struct extra_operations_gcc_aarch32< Base, 4u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -677,7 +677,7 @@ struct extra_operations_gcc_aarch32< Base, 4u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -703,7 +703,7 @@ struct extra_operations_gcc_aarch32< Base, 4u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -729,7 +729,7 @@ struct extra_operations_gcc_aarch32< Base, 4u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -755,7 +755,7 @@ struct extra_operations_gcc_aarch32< Base, 4u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -781,7 +781,7 @@ struct extra_operations_gcc_aarch32< Base, 4u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -807,7 +807,7 @@ struct extra_operations_gcc_aarch32< Base, 4u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -833,7 +833,7 @@ struct extra_operations_gcc_aarch32< Base, 4u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -873,7 +873,7 @@ struct extra_operations_gcc_aarch32< Base, 8u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -902,7 +902,7 @@ struct extra_operations_gcc_aarch32< Base, 8u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -931,7 +931,7 @@ struct extra_operations_gcc_aarch32< Base, 8u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -958,7 +958,7 @@ struct extra_operations_gcc_aarch32< Base, 8u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -985,7 +985,7 @@ struct extra_operations_gcc_aarch32< Base, 8u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -1012,7 +1012,7 @@ struct extra_operations_gcc_aarch32< Base, 8u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -1039,7 +1039,7 @@ struct extra_operations_gcc_aarch32< Base, 8u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -1066,7 +1066,7 @@ struct extra_operations_gcc_aarch32< Base, 8u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ @@ -1093,7 +1093,7 @@ struct extra_operations_gcc_aarch32< Base, 8u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH32_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ (\ diff --git a/include/boost/atomic/detail/extra_ops_gcc_aarch64.hpp b/include/boost/atomic/detail/extra_ops_gcc_aarch64.hpp index 1cc5ba2..16b9b33 100644 --- a/include/boost/atomic/detail/extra_ops_gcc_aarch64.hpp +++ b/include/boost/atomic/detail/extra_ops_gcc_aarch64.hpp @@ -15,7 +15,7 @@ #define BOOST_ATOMIC_DETAIL_EXTRA_OPS_GCC_AARCH64_HPP_INCLUDED_ #include -#include +#include #include #include #include @@ -130,7 +130,7 @@ struct extra_operations_gcc_aarch64< Base, 1u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -156,7 +156,7 @@ struct extra_operations_gcc_aarch64< Base, 1u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -184,7 +184,7 @@ struct extra_operations_gcc_aarch64< Base, 1u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -210,7 +210,7 @@ struct extra_operations_gcc_aarch64< Base, 1u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -236,7 +236,7 @@ struct extra_operations_gcc_aarch64< Base, 1u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -262,7 +262,7 @@ struct extra_operations_gcc_aarch64< Base, 1u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -288,7 +288,7 @@ struct extra_operations_gcc_aarch64< Base, 1u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -314,7 +314,7 @@ struct extra_operations_gcc_aarch64< Base, 1u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -340,7 +340,7 @@ struct extra_operations_gcc_aarch64< Base, 1u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -383,7 +383,7 @@ struct extra_operations_gcc_aarch64< Base, 2u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -409,7 +409,7 @@ struct extra_operations_gcc_aarch64< Base, 2u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -437,7 +437,7 @@ struct extra_operations_gcc_aarch64< Base, 2u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -463,7 +463,7 @@ struct extra_operations_gcc_aarch64< Base, 2u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -489,7 +489,7 @@ struct extra_operations_gcc_aarch64< Base, 2u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -515,7 +515,7 @@ struct extra_operations_gcc_aarch64< Base, 2u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -541,7 +541,7 @@ struct extra_operations_gcc_aarch64< Base, 2u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -567,7 +567,7 @@ struct extra_operations_gcc_aarch64< Base, 2u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -593,7 +593,7 @@ struct extra_operations_gcc_aarch64< Base, 2u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -636,7 +636,7 @@ struct extra_operations_gcc_aarch64< Base, 4u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -662,7 +662,7 @@ struct extra_operations_gcc_aarch64< Base, 4u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -690,7 +690,7 @@ struct extra_operations_gcc_aarch64< Base, 4u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -716,7 +716,7 @@ struct extra_operations_gcc_aarch64< Base, 4u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -742,7 +742,7 @@ struct extra_operations_gcc_aarch64< Base, 4u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -768,7 +768,7 @@ struct extra_operations_gcc_aarch64< Base, 4u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -794,7 +794,7 @@ struct extra_operations_gcc_aarch64< Base, 4u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -820,7 +820,7 @@ struct extra_operations_gcc_aarch64< Base, 4u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -846,7 +846,7 @@ struct extra_operations_gcc_aarch64< Base, 4u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -889,7 +889,7 @@ struct extra_operations_gcc_aarch64< Base, 8u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -915,7 +915,7 @@ struct extra_operations_gcc_aarch64< Base, 8u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -943,7 +943,7 @@ struct extra_operations_gcc_aarch64< Base, 8u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -969,7 +969,7 @@ struct extra_operations_gcc_aarch64< Base, 8u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -995,7 +995,7 @@ struct extra_operations_gcc_aarch64< Base, 8u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -1021,7 +1021,7 @@ struct extra_operations_gcc_aarch64< Base, 8u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -1047,7 +1047,7 @@ struct extra_operations_gcc_aarch64< Base, 8u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -1073,7 +1073,7 @@ struct extra_operations_gcc_aarch64< Base, 8u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -1099,7 +1099,7 @@ struct extra_operations_gcc_aarch64< Base, 8u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_type result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -1144,7 +1144,7 @@ struct extra_operations_gcc_aarch64< Base, 16u, Signed > : BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_union original; storage_union result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -1175,7 +1175,7 @@ struct extra_operations_gcc_aarch64< Base, 16u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_union result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -1206,7 +1206,7 @@ struct extra_operations_gcc_aarch64< Base, 16u, Signed > : BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_union result; storage_union value = { v }; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -1235,7 +1235,7 @@ struct extra_operations_gcc_aarch64< Base, 16u, Signed > : BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_union result; storage_union value = { v }; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -1264,7 +1264,7 @@ struct extra_operations_gcc_aarch64< Base, 16u, Signed > : BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_union result; storage_union value = { v }; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -1293,7 +1293,7 @@ struct extra_operations_gcc_aarch64< Base, 16u, Signed > : BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_union result; storage_union value = { v }; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -1322,7 +1322,7 @@ struct extra_operations_gcc_aarch64< Base, 16u, Signed > : BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_union result; storage_union value = { v }; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -1351,7 +1351,7 @@ struct extra_operations_gcc_aarch64< Base, 16u, Signed > : BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_union original; storage_union result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ @@ -1380,7 +1380,7 @@ struct extra_operations_gcc_aarch64< Base, 16u, Signed > : { BOOST_ATOMIC_DETAIL_TSAN_RELEASE(&storage, order); storage_union result; - uint32_t tmp; + std::uint32_t tmp; #define BOOST_ATOMIC_DETAIL_AARCH64_MO_INSN(ld_mo, st_mo)\ __asm__ __volatile__\ diff --git a/include/boost/atomic/detail/extra_ops_gcc_arm.hpp b/include/boost/atomic/detail/extra_ops_gcc_arm.hpp index a046cd6..5791572 100644 --- a/include/boost/atomic/detail/extra_ops_gcc_arm.hpp +++ b/include/boost/atomic/detail/extra_ops_gcc_arm.hpp @@ -15,7 +15,7 @@ #define BOOST_ATOMIC_DETAIL_EXTRA_OPS_GCC_ARM_HPP_INCLUDED_ #include -#include +#include #include #include #include @@ -104,7 +104,7 @@ struct extra_operations_gcc_arm< Base, 1u, Signed > : static BOOST_FORCEINLINE storage_type fetch_negate(storage_type volatile& storage, memory_order order) noexcept { core_arch_operations_gcc_arm_base::fence_before(order); - uint32_t tmp; + std::uint32_t tmp; extended_storage_type original, result; __asm__ __volatile__ ( @@ -130,7 +130,7 @@ struct extra_operations_gcc_arm< Base, 1u, Signed > : static BOOST_FORCEINLINE storage_type negate(storage_type volatile& storage, memory_order order) noexcept { core_arch_operations_gcc_arm_base::fence_before(order); - uint32_t tmp; + std::uint32_t tmp; extended_storage_type original, result; __asm__ __volatile__ ( @@ -156,7 +156,7 @@ struct extra_operations_gcc_arm< Base, 1u, Signed > : static BOOST_FORCEINLINE storage_type add(storage_type volatile& storage, storage_type v, memory_order order) noexcept { core_arch_operations_gcc_arm_base::fence_before(order); - uint32_t tmp; + std::uint32_t tmp; extended_storage_type original, result; __asm__ __volatile__ ( @@ -182,7 +182,7 @@ struct extra_operations_gcc_arm< Base, 1u, Signed > : static BOOST_FORCEINLINE storage_type sub(storage_type volatile& storage, storage_type v, memory_order order) noexcept { core_arch_operations_gcc_arm_base::fence_before(order); - uint32_t tmp; + std::uint32_t tmp; extended_storage_type original, result; __asm__ __volatile__ ( @@ -208,7 +208,7 @@ struct extra_operations_gcc_arm< Base, 1u, Signed > : static BOOST_FORCEINLINE storage_type bitwise_and(storage_type volatile& storage, storage_type v, memory_order order) noexcept { core_arch_operations_gcc_arm_base::fence_before(order); - uint32_t tmp; + std::uint32_t tmp; extended_storage_type original, result; __asm__ __volatile__ ( @@ -234,7 +234,7 @@ struct extra_operations_gcc_arm< Base, 1u, Signed > : static BOOST_FORCEINLINE storage_type bitwise_or(storage_type volatile& storage, storage_type v, memory_order order) noexcept { core_arch_operations_gcc_arm_base::fence_before(order); - uint32_t tmp; + std::uint32_t tmp; extended_storage_type original, result; __asm__ __volatile__ ( @@ -260,7 +260,7 @@ struct extra_operations_gcc_arm< Base, 1u, Signed > : static BOOST_FORCEINLINE storage_type bitwise_xor(storage_type volatile& storage, storage_type v, memory_order order) noexcept { core_arch_operations_gcc_arm_base::fence_before(order); - uint32_t tmp; + std::uint32_t tmp; extended_storage_type original, result; __asm__ __volatile__ ( @@ -286,7 +286,7 @@ struct extra_operations_gcc_arm< Base, 1u, Signed > : static BOOST_FORCEINLINE storage_type fetch_complement(storage_type volatile& storage, memory_order order) noexcept { core_arch_operations_gcc_arm_base::fence_before(order); - uint32_t tmp; + std::uint32_t tmp; extended_storage_type original, result; __asm__ __volatile__ ( @@ -312,7 +312,7 @@ struct extra_operations_gcc_arm< Base, 1u, Signed > : static BOOST_FORCEINLINE storage_type bitwise_complement(storage_type volatile& storage, memory_order order) noexcept { core_arch_operations_gcc_arm_base::fence_before(order); - uint32_t tmp; + std::uint32_t tmp; extended_storage_type original, result; __asm__ __volatile__ ( @@ -357,7 +357,7 @@ struct extra_operations_gcc_arm< Base, 2u, Signed > : static BOOST_FORCEINLINE storage_type fetch_negate(storage_type volatile& storage, memory_order order) noexcept { core_arch_operations_gcc_arm_base::fence_before(order); - uint32_t tmp; + std::uint32_t tmp; extended_storage_type original, result; __asm__ __volatile__ ( @@ -383,7 +383,7 @@ struct extra_operations_gcc_arm< Base, 2u, Signed > : static BOOST_FORCEINLINE storage_type negate(storage_type volatile& storage, memory_order order) noexcept { core_arch_operations_gcc_arm_base::fence_before(order); - uint32_t tmp; + std::uint32_t tmp; extended_storage_type original, result; __asm__ __volatile__ ( @@ -409,7 +409,7 @@ struct extra_operations_gcc_arm< Base, 2u, Signed > : static BOOST_FORCEINLINE storage_type add(storage_type volatile& storage, storage_type v, memory_order order) noexcept { core_arch_operations_gcc_arm_base::fence_before(order); - uint32_t tmp; + std::uint32_t tmp; extended_storage_type original, result; __asm__ __volatile__ ( @@ -435,7 +435,7 @@ struct extra_operations_gcc_arm< Base, 2u, Signed > : static BOOST_FORCEINLINE storage_type sub(storage_type volatile& storage, storage_type v, memory_order order) noexcept { core_arch_operations_gcc_arm_base::fence_before(order); - uint32_t tmp; + std::uint32_t tmp; extended_storage_type original, result; __asm__ __volatile__ ( @@ -461,7 +461,7 @@ struct extra_operations_gcc_arm< Base, 2u, Signed > : static BOOST_FORCEINLINE storage_type bitwise_and(storage_type volatile& storage, storage_type v, memory_order order) noexcept { core_arch_operations_gcc_arm_base::fence_before(order); - uint32_t tmp; + std::uint32_t tmp; extended_storage_type original, result; __asm__ __volatile__ ( @@ -487,7 +487,7 @@ struct extra_operations_gcc_arm< Base, 2u, Signed > : static BOOST_FORCEINLINE storage_type bitwise_or(storage_type volatile& storage, storage_type v, memory_order order) noexcept { core_arch_operations_gcc_arm_base::fence_before(order); - uint32_t tmp; + std::uint32_t tmp; extended_storage_type original, result; __asm__ __volatile__ ( @@ -513,7 +513,7 @@ struct extra_operations_gcc_arm< Base, 2u, Signed > : static BOOST_FORCEINLINE storage_type bitwise_xor(storage_type volatile& storage, storage_type v, memory_order order) noexcept { core_arch_operations_gcc_arm_base::fence_before(order); - uint32_t tmp; + std::uint32_t tmp; extended_storage_type original, result; __asm__ __volatile__ ( @@ -539,7 +539,7 @@ struct extra_operations_gcc_arm< Base, 2u, Signed > : static BOOST_FORCEINLINE storage_type fetch_complement(storage_type volatile& storage, memory_order order) noexcept { core_arch_operations_gcc_arm_base::fence_before(order); - uint32_t tmp; + std::uint32_t tmp; extended_storage_type original, result; __asm__ __volatile__ ( @@ -565,7 +565,7 @@ struct extra_operations_gcc_arm< Base, 2u, Signed > : static BOOST_FORCEINLINE storage_type bitwise_complement(storage_type volatile& storage, memory_order order) noexcept { core_arch_operations_gcc_arm_base::fence_before(order); - uint32_t tmp; + std::uint32_t tmp; extended_storage_type original, result; __asm__ __volatile__ ( @@ -607,7 +607,7 @@ struct extra_operations_gcc_arm< Base, 4u, Signed > : static BOOST_FORCEINLINE storage_type fetch_negate(storage_type volatile& storage, memory_order order) noexcept { core_arch_operations_gcc_arm_base::fence_before(order); - uint32_t tmp; + std::uint32_t tmp; storage_type original, result; __asm__ __volatile__ ( @@ -633,7 +633,7 @@ struct extra_operations_gcc_arm< Base, 4u, Signed > : static BOOST_FORCEINLINE storage_type negate(storage_type volatile& storage, memory_order order) noexcept { core_arch_operations_gcc_arm_base::fence_before(order); - uint32_t tmp; + std::uint32_t tmp; storage_type original, result; __asm__ __volatile__ ( @@ -659,7 +659,7 @@ struct extra_operations_gcc_arm< Base, 4u, Signed > : static BOOST_FORCEINLINE storage_type add(storage_type volatile& storage, storage_type v, memory_order order) noexcept { core_arch_operations_gcc_arm_base::fence_before(order); - uint32_t tmp; + std::uint32_t tmp; storage_type original, result; __asm__ __volatile__ ( @@ -685,7 +685,7 @@ struct extra_operations_gcc_arm< Base, 4u, Signed > : static BOOST_FORCEINLINE storage_type sub(storage_type volatile& storage, storage_type v, memory_order order) noexcept { core_arch_operations_gcc_arm_base::fence_before(order); - uint32_t tmp; + std::uint32_t tmp; storage_type original, result; __asm__ __volatile__ ( @@ -711,7 +711,7 @@ struct extra_operations_gcc_arm< Base, 4u, Signed > : static BOOST_FORCEINLINE storage_type bitwise_and(storage_type volatile& storage, storage_type v, memory_order order) noexcept { core_arch_operations_gcc_arm_base::fence_before(order); - uint32_t tmp; + std::uint32_t tmp; storage_type original, result; __asm__ __volatile__ ( @@ -737,7 +737,7 @@ struct extra_operations_gcc_arm< Base, 4u, Signed > : static BOOST_FORCEINLINE storage_type bitwise_or(storage_type volatile& storage, storage_type v, memory_order order) noexcept { core_arch_operations_gcc_arm_base::fence_before(order); - uint32_t tmp; + std::uint32_t tmp; storage_type original, result; __asm__ __volatile__ ( @@ -763,7 +763,7 @@ struct extra_operations_gcc_arm< Base, 4u, Signed > : static BOOST_FORCEINLINE storage_type bitwise_xor(storage_type volatile& storage, storage_type v, memory_order order) noexcept { core_arch_operations_gcc_arm_base::fence_before(order); - uint32_t tmp; + std::uint32_t tmp; storage_type original, result; __asm__ __volatile__ ( @@ -789,7 +789,7 @@ struct extra_operations_gcc_arm< Base, 4u, Signed > : static BOOST_FORCEINLINE storage_type fetch_complement(storage_type volatile& storage, memory_order order) noexcept { core_arch_operations_gcc_arm_base::fence_before(order); - uint32_t tmp; + std::uint32_t tmp; storage_type original, result; __asm__ __volatile__ ( @@ -815,7 +815,7 @@ struct extra_operations_gcc_arm< Base, 4u, Signed > : static BOOST_FORCEINLINE storage_type bitwise_complement(storage_type volatile& storage, memory_order order) noexcept { core_arch_operations_gcc_arm_base::fence_before(order); - uint32_t tmp; + std::uint32_t tmp; storage_type original, result; __asm__ __volatile__ ( @@ -858,7 +858,7 @@ struct extra_operations_gcc_arm< Base, 8u, Signed > : { core_arch_operations_gcc_arm_base::fence_before(order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; __asm__ __volatile__ ( BOOST_ATOMIC_DETAIL_ARM_ASM_START(%0) @@ -887,7 +887,7 @@ struct extra_operations_gcc_arm< Base, 8u, Signed > : { core_arch_operations_gcc_arm_base::fence_before(order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; __asm__ __volatile__ ( BOOST_ATOMIC_DETAIL_ARM_ASM_START(%0) @@ -916,7 +916,7 @@ struct extra_operations_gcc_arm< Base, 8u, Signed > : { core_arch_operations_gcc_arm_base::fence_before(order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; __asm__ __volatile__ ( BOOST_ATOMIC_DETAIL_ARM_ASM_START(%0) @@ -943,7 +943,7 @@ struct extra_operations_gcc_arm< Base, 8u, Signed > : { core_arch_operations_gcc_arm_base::fence_before(order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; __asm__ __volatile__ ( BOOST_ATOMIC_DETAIL_ARM_ASM_START(%0) @@ -970,7 +970,7 @@ struct extra_operations_gcc_arm< Base, 8u, Signed > : { core_arch_operations_gcc_arm_base::fence_before(order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; __asm__ __volatile__ ( BOOST_ATOMIC_DETAIL_ARM_ASM_START(%0) @@ -997,7 +997,7 @@ struct extra_operations_gcc_arm< Base, 8u, Signed > : { core_arch_operations_gcc_arm_base::fence_before(order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; __asm__ __volatile__ ( BOOST_ATOMIC_DETAIL_ARM_ASM_START(%0) @@ -1024,7 +1024,7 @@ struct extra_operations_gcc_arm< Base, 8u, Signed > : { core_arch_operations_gcc_arm_base::fence_before(order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; __asm__ __volatile__ ( BOOST_ATOMIC_DETAIL_ARM_ASM_START(%0) @@ -1051,7 +1051,7 @@ struct extra_operations_gcc_arm< Base, 8u, Signed > : { core_arch_operations_gcc_arm_base::fence_before(order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; __asm__ __volatile__ ( BOOST_ATOMIC_DETAIL_ARM_ASM_START(%0) @@ -1078,7 +1078,7 @@ struct extra_operations_gcc_arm< Base, 8u, Signed > : { core_arch_operations_gcc_arm_base::fence_before(order); storage_type original, result; - uint32_t tmp; + std::uint32_t tmp; __asm__ __volatile__ ( BOOST_ATOMIC_DETAIL_ARM_ASM_START(%0) diff --git a/include/boost/atomic/detail/extra_ops_gcc_x86.hpp b/include/boost/atomic/detail/extra_ops_gcc_x86.hpp index c1154a1..c5bcb05 100644 --- a/include/boost/atomic/detail/extra_ops_gcc_x86.hpp +++ b/include/boost/atomic/detail/extra_ops_gcc_x86.hpp @@ -15,7 +15,7 @@ #define BOOST_ATOMIC_DETAIL_EXTRA_OPS_GCC_X86_HPP_INCLUDED_ #include -#include +#include #include #include #include @@ -879,7 +879,7 @@ struct extra_operations< Base, 2u, Signed, true > : ( "lock; btsw %[bit_number], %[storage]\n\t" : [storage] "+m" (storage), [result] "=@ccc" (res) - : [bit_number] "Kq" ((uint16_t)bit_number) + : [bit_number] "Kq" ((std::uint16_t)bit_number) : "memory" ); #else @@ -888,7 +888,7 @@ struct extra_operations< Base, 2u, Signed, true > : "lock; btsw %[bit_number], %[storage]\n\t" "setc %[result]\n\t" : [storage] "+m" (storage), [result] "=q" (res) - : [bit_number] "Kq" ((uint16_t)bit_number) + : [bit_number] "Kq" ((std::uint16_t)bit_number) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); #endif @@ -905,7 +905,7 @@ struct extra_operations< Base, 2u, Signed, true > : ( "lock; btrw %[bit_number], %[storage]\n\t" : [storage] "+m" (storage), [result] "=@ccc" (res) - : [bit_number] "Kq" ((uint16_t)bit_number) + : [bit_number] "Kq" ((std::uint16_t)bit_number) : "memory" ); #else @@ -914,7 +914,7 @@ struct extra_operations< Base, 2u, Signed, true > : "lock; btrw %[bit_number], %[storage]\n\t" "setc %[result]\n\t" : [storage] "+m" (storage), [result] "=q" (res) - : [bit_number] "Kq" ((uint16_t)bit_number) + : [bit_number] "Kq" ((std::uint16_t)bit_number) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); #endif @@ -931,7 +931,7 @@ struct extra_operations< Base, 2u, Signed, true > : ( "lock; btcw %[bit_number], %[storage]\n\t" : [storage] "+m" (storage), [result] "=@ccc" (res) - : [bit_number] "Kq" ((uint16_t)bit_number) + : [bit_number] "Kq" ((std::uint16_t)bit_number) : "memory" ); #else @@ -940,7 +940,7 @@ struct extra_operations< Base, 2u, Signed, true > : "lock; btcw %[bit_number], %[storage]\n\t" "setc %[result]\n\t" : [storage] "+m" (storage), [result] "=q" (res) - : [bit_number] "Kq" ((uint16_t)bit_number) + : [bit_number] "Kq" ((std::uint16_t)bit_number) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); #endif @@ -1376,7 +1376,7 @@ struct extra_operations< Base, 4u, Signed, true > : ( "lock; btsl %[bit_number], %[storage]\n\t" : [storage] "+m" (storage), [result] "=@ccc" (res) - : [bit_number] "Kr" ((uint32_t)bit_number) + : [bit_number] "Kr" ((std::uint32_t)bit_number) : "memory" ); #else @@ -1385,7 +1385,7 @@ struct extra_operations< Base, 4u, Signed, true > : "lock; btsl %[bit_number], %[storage]\n\t" "setc %[result]\n\t" : [storage] "+m" (storage), [result] "=q" (res) - : [bit_number] "Kr" ((uint32_t)bit_number) + : [bit_number] "Kr" ((std::uint32_t)bit_number) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); #endif @@ -1402,7 +1402,7 @@ struct extra_operations< Base, 4u, Signed, true > : ( "lock; btrl %[bit_number], %[storage]\n\t" : [storage] "+m" (storage), [result] "=@ccc" (res) - : [bit_number] "Kr" ((uint32_t)bit_number) + : [bit_number] "Kr" ((std::uint32_t)bit_number) : "memory" ); #else @@ -1411,7 +1411,7 @@ struct extra_operations< Base, 4u, Signed, true > : "lock; btrl %[bit_number], %[storage]\n\t" "setc %[result]\n\t" : [storage] "+m" (storage), [result] "=q" (res) - : [bit_number] "Kr" ((uint32_t)bit_number) + : [bit_number] "Kr" ((std::uint32_t)bit_number) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); #endif @@ -1428,7 +1428,7 @@ struct extra_operations< Base, 4u, Signed, true > : ( "lock; btcl %[bit_number], %[storage]\n\t" : [storage] "+m" (storage), [result] "=@ccc" (res) - : [bit_number] "Kr" ((uint32_t)bit_number) + : [bit_number] "Kr" ((std::uint32_t)bit_number) : "memory" ); #else @@ -1437,7 +1437,7 @@ struct extra_operations< Base, 4u, Signed, true > : "lock; btcl %[bit_number], %[storage]\n\t" "setc %[result]\n\t" : [storage] "+m" (storage), [result] "=q" (res) - : [bit_number] "Kr" ((uint32_t)bit_number) + : [bit_number] "Kr" ((std::uint32_t)bit_number) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); #endif @@ -1875,7 +1875,7 @@ struct extra_operations< Base, 8u, Signed, true > : ( "lock; btsq %[bit_number], %[storage]\n\t" : [storage] "+m" (storage), [result] "=@ccc" (res) - : [bit_number] "Kr" ((uint64_t)bit_number) + : [bit_number] "Kr" ((std::uint64_t)bit_number) : "memory" ); #else @@ -1884,7 +1884,7 @@ struct extra_operations< Base, 8u, Signed, true > : "lock; btsq %[bit_number], %[storage]\n\t" "setc %[result]\n\t" : [storage] "+m" (storage), [result] "=q" (res) - : [bit_number] "Kr" ((uint64_t)bit_number) + : [bit_number] "Kr" ((std::uint64_t)bit_number) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); #endif @@ -1901,7 +1901,7 @@ struct extra_operations< Base, 8u, Signed, true > : ( "lock; btrq %[bit_number], %[storage]\n\t" : [storage] "+m" (storage), [result] "=@ccc" (res) - : [bit_number] "Kr" ((uint64_t)bit_number) + : [bit_number] "Kr" ((std::uint64_t)bit_number) : "memory" ); #else @@ -1910,7 +1910,7 @@ struct extra_operations< Base, 8u, Signed, true > : "lock; btrq %[bit_number], %[storage]\n\t" "setc %[result]\n\t" : [storage] "+m" (storage), [result] "=q" (res) - : [bit_number] "Kr" ((uint64_t)bit_number) + : [bit_number] "Kr" ((std::uint64_t)bit_number) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); #endif @@ -1927,7 +1927,7 @@ struct extra_operations< Base, 8u, Signed, true > : ( "lock; btcq %[bit_number], %[storage]\n\t" : [storage] "+m" (storage), [result] "=@ccc" (res) - : [bit_number] "Kr" ((uint64_t)bit_number) + : [bit_number] "Kr" ((std::uint64_t)bit_number) : "memory" ); #else @@ -1936,7 +1936,7 @@ struct extra_operations< Base, 8u, Signed, true > : "lock; btcq %[bit_number], %[storage]\n\t" "setc %[result]\n\t" : [storage] "+m" (storage), [result] "=q" (res) - : [bit_number] "Kr" ((uint64_t)bit_number) + : [bit_number] "Kr" ((std::uint64_t)bit_number) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); #endif diff --git a/include/boost/atomic/detail/fence_arch_ops_gcc_aarch32.hpp b/include/boost/atomic/detail/fence_arch_ops_gcc_aarch32.hpp index 6443cbb..07d4198 100644 --- a/include/boost/atomic/detail/fence_arch_ops_gcc_aarch32.hpp +++ b/include/boost/atomic/detail/fence_arch_ops_gcc_aarch32.hpp @@ -14,7 +14,6 @@ #ifndef BOOST_ATOMIC_DETAIL_FENCE_ARCH_OPS_GCC_AARCH32_HPP_INCLUDED_ #define BOOST_ATOMIC_DETAIL_FENCE_ARCH_OPS_GCC_AARCH32_HPP_INCLUDED_ -#include #include #include #include diff --git a/include/boost/atomic/detail/fence_arch_ops_gcc_arm.hpp b/include/boost/atomic/detail/fence_arch_ops_gcc_arm.hpp index e4131c3..ad373a0 100644 --- a/include/boost/atomic/detail/fence_arch_ops_gcc_arm.hpp +++ b/include/boost/atomic/detail/fence_arch_ops_gcc_arm.hpp @@ -14,7 +14,7 @@ #ifndef BOOST_ATOMIC_DETAIL_FENCE_ARCH_OPS_GCC_ARM_HPP_INCLUDED_ #define BOOST_ATOMIC_DETAIL_FENCE_ARCH_OPS_GCC_ARM_HPP_INCLUDED_ -#include +#include #include #include #include @@ -51,8 +51,8 @@ struct fence_arch_operations_gcc_arm #if defined(BOOST_ATOMIC_DETAIL_ARM_HAS_DMB) // Older binutils (supposedly, older than 2.21.1) didn't support symbolic or numeric arguments of the "dmb" instruction such as "ish" or "#11". - // As a workaround we have to inject encoded bytes of the instruction. There are two encodings for the instruction: ARM and Thumb. See ARM Architecture Reference Manual, A8.8.43. - // Since we cannot detect binutils version at compile time, we'll have to always use this hack. + // As a workaround we have to inject encoded bytes of the instruction. There are two encodings for the instruction: ARM and Thumb. See + // ARM Architecture Reference Manual, A8.8.43. Since we cannot detect binutils version at compile time, we'll have to always use this hack. __asm__ __volatile__ ( #if defined(__thumb2__) @@ -65,7 +65,7 @@ struct fence_arch_operations_gcc_arm : "memory" ); #else - uint32_t tmp; + std::uint32_t tmp; __asm__ __volatile__ ( BOOST_ATOMIC_DETAIL_ARM_ASM_START(%0) diff --git a/include/boost/atomic/detail/fence_arch_ops_msvc_x86.hpp b/include/boost/atomic/detail/fence_arch_ops_msvc_x86.hpp index 1f02668..263d83e 100644 --- a/include/boost/atomic/detail/fence_arch_ops_msvc_x86.hpp +++ b/include/boost/atomic/detail/fence_arch_ops_msvc_x86.hpp @@ -14,7 +14,7 @@ #ifndef BOOST_ATOMIC_DETAIL_FENCE_ARCH_OPS_MSVC_X86_HPP_INCLUDED_ #define BOOST_ATOMIC_DETAIL_FENCE_ARCH_OPS_MSVC_X86_HPP_INCLUDED_ -#include +#include #include #include #include @@ -39,7 +39,7 @@ struct fence_arch_operations_msvc_x86 // See the comment in fence_ops_gcc_x86.hpp as to why we're not using mfence here. // We're not using __faststorefence() here because it generates an atomic operation // on [rsp]/[esp] location, which may alias valid data and cause false data dependency. - boost::uint32_t dummy; + std::uint32_t dummy; BOOST_ATOMIC_INTERLOCKED_INCREMENT(&dummy); } else if (order != memory_order_relaxed) diff --git a/include/boost/atomic/detail/fence_ops_windows.hpp b/include/boost/atomic/detail/fence_ops_windows.hpp index f7afbed..eb9fb97 100644 --- a/include/boost/atomic/detail/fence_ops_windows.hpp +++ b/include/boost/atomic/detail/fence_ops_windows.hpp @@ -14,7 +14,7 @@ #ifndef BOOST_ATOMIC_DETAIL_FENCE_OPS_WINDOWS_HPP_INCLUDED_ #define BOOST_ATOMIC_DETAIL_FENCE_OPS_WINDOWS_HPP_INCLUDED_ -#include +#include #include #include #include @@ -51,7 +51,7 @@ struct fence_operations_windows static BOOST_FORCEINLINE void hardware_full_fence() noexcept { - boost::uint32_t tmp; + std::uint32_t tmp; BOOST_ATOMIC_INTERLOCKED_INCREMENT(&tmp); } }; diff --git a/include/boost/atomic/detail/futex.hpp b/include/boost/atomic/detail/futex.hpp index 37e30c4..0069c27 100644 --- a/include/boost/atomic/detail/futex.hpp +++ b/include/boost/atomic/detail/futex.hpp @@ -75,7 +75,7 @@ #include #endif #include // timespec -#include +#include #include #include @@ -111,8 +111,8 @@ namespace detail { //! An equivalent of `timespec` that uses 64-bit members when the userland `timespec` is 32-bit struct futex_timespec { - int64_t tv_sec; - int64_t tv_nsec; + std::int64_t tv_sec; + std::int64_t tv_nsec; futex_timespec() = default; explicit futex_timespec(::timespec ts) noexcept : @@ -132,11 +132,11 @@ BOOST_FORCEINLINE int futex_invoke(void* addr1, int op, unsigned int val1, const #if defined(BOOST_ATOMIC_DETAIL_OPENBSD_FUTEX) return ::futex ( - static_cast< volatile uint32_t* >(addr1), + static_cast< volatile std::uint32_t* >(addr1), op, static_cast< int >(val1), timeout, - static_cast< volatile uint32_t* >(addr2) + static_cast< volatile std::uint32_t* >(addr2) ); #elif defined(BOOST_ATOMIC_DETAIL_NETBSD_FUTEX) // Pass 0 in val2. @@ -152,11 +152,11 @@ BOOST_FORCEINLINE int futex_invoke(void* addr1, int op, unsigned int val1, unsig #if defined(BOOST_ATOMIC_DETAIL_OPENBSD_FUTEX) return ::futex ( - static_cast< volatile uint32_t* >(addr1), + static_cast< volatile std::uint32_t* >(addr1), op, static_cast< int >(val1), reinterpret_cast< const futex_timespec* >(static_cast< atomics::detail::uintptr_t >(val2)), - static_cast< volatile uint32_t* >(addr2) + static_cast< volatile std::uint32_t* >(addr2) ); #elif defined(BOOST_ATOMIC_DETAIL_NETBSD_FUTEX) // Pass nullptr in timeout. diff --git a/include/boost/atomic/detail/int_sizes.hpp b/include/boost/atomic/detail/int_sizes.hpp index e352c0a..1d669f8 100644 --- a/include/boost/atomic/detail/int_sizes.hpp +++ b/include/boost/atomic/detail/int_sizes.hpp @@ -52,45 +52,40 @@ // Try to deduce sizes from limits #include -#if defined(__has_include) -#if __has_include() -#include -#endif -#endif -#include +#include #if !defined(BOOST_ATOMIC_DETAIL_SIZEOF_SHORT) -#if (USHRT_MAX + 0) == 0xff +#if (USHRT_MAX == 0xff) #define BOOST_ATOMIC_DETAIL_SIZEOF_SHORT 1 -#elif (USHRT_MAX + 0) == 0xffff +#elif (USHRT_MAX == 0xffff) #define BOOST_ATOMIC_DETAIL_SIZEOF_SHORT 2 -#elif (USHRT_MAX + 0) == 0xffffffff +#elif (USHRT_MAX == 0xffffffff) #define BOOST_ATOMIC_DETAIL_SIZEOF_SHORT 4 -#elif (USHRT_MAX + 0) == UINT64_C(0xffffffffffffffff) +#elif (USHRT_MAX == UINT64_C(0xffffffffffffffff)) #define BOOST_ATOMIC_DETAIL_SIZEOF_SHORT 8 #endif #endif // !defined(BOOST_ATOMIC_DETAIL_SIZEOF_SHORT) #if !defined(BOOST_ATOMIC_DETAIL_SIZEOF_INT) -#if (UINT_MAX + 0) == 0xff +#if (UINT_MAX == 0xff) #define BOOST_ATOMIC_DETAIL_SIZEOF_INT 1 -#elif (UINT_MAX + 0) == 0xffff +#elif (UINT_MAX == 0xffff) #define BOOST_ATOMIC_DETAIL_SIZEOF_INT 2 -#elif (UINT_MAX + 0) == 0xffffffff +#elif (UINT_MAX == 0xffffffff) #define BOOST_ATOMIC_DETAIL_SIZEOF_INT 4 -#elif (UINT_MAX + 0) == UINT64_C(0xffffffffffffffff) +#elif (UINT_MAX == UINT64_C(0xffffffffffffffff)) #define BOOST_ATOMIC_DETAIL_SIZEOF_INT 8 #endif #endif // !defined(BOOST_ATOMIC_DETAIL_SIZEOF_INT) #if !defined(BOOST_ATOMIC_DETAIL_SIZEOF_LONG) -#if (ULONG_MAX + 0) == 0xff +#if (ULONG_MAX == 0xff) #define BOOST_ATOMIC_DETAIL_SIZEOF_LONG 1 -#elif (ULONG_MAX + 0) == 0xffff +#elif (ULONG_MAX == 0xffff) #define BOOST_ATOMIC_DETAIL_SIZEOF_LONG 2 -#elif (ULONG_MAX + 0) == 0xffffffff +#elif (ULONG_MAX == 0xffffffff) #define BOOST_ATOMIC_DETAIL_SIZEOF_LONG 4 -#elif (ULONG_MAX + 0) == UINT64_C(0xffffffffffffffff) +#elif (ULONG_MAX == UINT64_C(0xffffffffffffffff)) #define BOOST_ATOMIC_DETAIL_SIZEOF_LONG 8 #endif #endif // !defined(BOOST_ATOMIC_DETAIL_SIZEOF_LONG) @@ -100,7 +95,7 @@ #define BOOST_ATOMIC_DETAIL_SIZEOF_LLONG 8 #else -// The list of the non-standard macros (the ones except ULLONG_MAX) is taken from cstdint.hpp +// The list of the non-standard macros (the ones except ULLONG_MAX) is taken from boost/cstdint.hpp #if defined(ULLONG_MAX) #define BOOST_ATOMIC_DETAIL_ULLONG_MAX ULLONG_MAX #elif defined(ULONG_LONG_MAX) @@ -111,13 +106,13 @@ #define BOOST_ATOMIC_DETAIL_ULLONG_MAX _LLONG_MAX #endif -#if (BOOST_ATOMIC_DETAIL_ULLONG_MAX + 0) == 0xff +#if (BOOST_ATOMIC_DETAIL_ULLONG_MAX == 0xff) #define BOOST_ATOMIC_DETAIL_SIZEOF_LLONG 1 -#elif (BOOST_ATOMIC_DETAIL_ULLONG_MAX + 0) == 0xffff +#elif (BOOST_ATOMIC_DETAIL_ULLONG_MAX == 0xffff) #define BOOST_ATOMIC_DETAIL_SIZEOF_LLONG 2 -#elif (BOOST_ATOMIC_DETAIL_ULLONG_MAX + 0) == 0xffffffff +#elif (BOOST_ATOMIC_DETAIL_ULLONG_MAX == 0xffffffff) #define BOOST_ATOMIC_DETAIL_SIZEOF_LLONG 4 -#elif (BOOST_ATOMIC_DETAIL_ULLONG_MAX + 0) == UINT64_C(0xffffffffffffffff) +#elif (BOOST_ATOMIC_DETAIL_ULLONG_MAX == UINT64_C(0xffffffffffffffff)) #define BOOST_ATOMIC_DETAIL_SIZEOF_LLONG 8 #endif @@ -125,11 +120,11 @@ #endif // !defined(BOOST_ATOMIC_DETAIL_SIZEOF_LLONG) #if !defined(BOOST_ATOMIC_DETAIL_SIZEOF_POINTER) && defined(UINTPTR_MAX) -#if (UINTPTR_MAX + 0) == 0xffff +#if (UINTPTR_MAX == 0xffff) #define BOOST_ATOMIC_DETAIL_SIZEOF_POINTER 2 -#elif (UINTPTR_MAX + 0) == 0xffffffff +#elif (UINTPTR_MAX == 0xffffffff) #define BOOST_ATOMIC_DETAIL_SIZEOF_POINTER 4 -#elif (UINTPTR_MAX + 0) == UINT64_C(0xffffffffffffffff) +#elif (UINTPTR_MAX == UINT64_C(0xffffffffffffffff)) #define BOOST_ATOMIC_DETAIL_SIZEOF_POINTER 8 #endif #endif // !defined(BOOST_ATOMIC_DETAIL_SIZEOF_POINTER) && defined(UINTPTR_MAX) @@ -139,18 +134,17 @@ #if !defined(BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T) #include -#include #if defined(_MSC_VER) && (_MSC_VER <= 1310 || defined(UNDER_CE) && _MSC_VER <= 1500) // MSVC 7.1 and MSVC 8 (arm) define WCHAR_MAX to a value not suitable for constant expressions #define BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T 2 -#elif (WCHAR_MAX + 0) == 0xff || (WCHAR_MAX + 0) == 0x7f +#elif (WCHAR_MAX == 0xff) || (WCHAR_MAX == 0x7f) #define BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T 1 -#elif (WCHAR_MAX + 0) == 0xffff || (WCHAR_MAX + 0) == 0x7fff +#elif (WCHAR_MAX == 0xffff) || (WCHAR_MAX == 0x7fff) #define BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T 2 -#elif (WCHAR_MAX + 0) == 0xffffffff || (WCHAR_MAX + 0) == 0x7fffffff +#elif (WCHAR_MAX == 0xffffffff) || (WCHAR_MAX == 0x7fffffff) #define BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T 4 -#elif (WCHAR_MAX + 0) == UINT64_C(0xffffffffffffffff) || (WCHAR_MAX + 0) == INT64_C(0x7fffffffffffffff) +#elif (WCHAR_MAX == UINT64_C(0xffffffffffffffff)) || (WCHAR_MAX == INT64_C(0x7fffffffffffffff)) #define BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T 8 #endif #endif diff --git a/include/boost/atomic/detail/intptr.hpp b/include/boost/atomic/detail/intptr.hpp index cf1d749..2d974c1 100644 --- a/include/boost/atomic/detail/intptr.hpp +++ b/include/boost/atomic/detail/intptr.hpp @@ -14,8 +14,8 @@ #ifndef BOOST_ATOMIC_DETAIL_INTPTR_HPP_INCLUDED_ #define BOOST_ATOMIC_DETAIL_INTPTR_HPP_INCLUDED_ -#include -#if defined(BOOST_HAS_INTPTR_T) +#include +#if !defined(UINTPTR_MAX) #include #endif #include @@ -29,9 +29,9 @@ namespace boost { namespace atomics { namespace detail { -#if !defined(BOOST_HAS_INTPTR_T) -using boost::uintptr_t; -using boost::intptr_t; +#if defined(UINTPTR_MAX) +using std::uintptr_t; +using std::intptr_t; #else using uintptr_t = std::size_t; using intptr_t = std::ptrdiff_t; diff --git a/include/boost/atomic/detail/ops_gcc_arm_common.hpp b/include/boost/atomic/detail/ops_gcc_arm_common.hpp index b5f8f38..56b7ffb 100644 --- a/include/boost/atomic/detail/ops_gcc_arm_common.hpp +++ b/include/boost/atomic/detail/ops_gcc_arm_common.hpp @@ -16,7 +16,7 @@ #ifndef BOOST_ATOMIC_DETAIL_OPS_GCC_ARM_COMMON_HPP_INCLUDED_ #define BOOST_ATOMIC_DETAIL_OPS_GCC_ARM_COMMON_HPP_INCLUDED_ -#include +#include #include #include #include diff --git a/include/boost/atomic/detail/storage_traits.hpp b/include/boost/atomic/detail/storage_traits.hpp index 63d3081..f0f04c1 100644 --- a/include/boost/atomic/detail/storage_traits.hpp +++ b/include/boost/atomic/detail/storage_traits.hpp @@ -17,7 +17,7 @@ #define BOOST_ATOMIC_DETAIL_STORAGE_TRAITS_HPP_INCLUDED_ #include -#include +#include #include #include #include @@ -80,7 +80,7 @@ struct storage_traits template< > struct storage_traits< 1u > { - using type = boost::uint8_t BOOST_ATOMIC_DETAIL_MAY_ALIAS; + using type = std::uint8_t BOOST_ATOMIC_DETAIL_MAY_ALIAS; static constexpr std::size_t native_alignment = 1u; static constexpr std::size_t alignment = 1u; @@ -89,27 +89,27 @@ struct storage_traits< 1u > template< > struct storage_traits< 2u > { - using type = boost::uint16_t BOOST_ATOMIC_DETAIL_MAY_ALIAS; + using type = std::uint16_t BOOST_ATOMIC_DETAIL_MAY_ALIAS; - static constexpr std::size_t native_alignment = atomics::detail::alignment_of< boost::uint16_t >::value; + static constexpr std::size_t native_alignment = atomics::detail::alignment_of< std::uint16_t >::value; static constexpr std::size_t alignment = 2u; }; template< > struct storage_traits< 4u > { - using type = boost::uint32_t BOOST_ATOMIC_DETAIL_MAY_ALIAS; + using type = std::uint32_t BOOST_ATOMIC_DETAIL_MAY_ALIAS; - static constexpr std::size_t native_alignment = atomics::detail::alignment_of< boost::uint32_t >::value; + static constexpr std::size_t native_alignment = atomics::detail::alignment_of< std::uint32_t >::value; static constexpr std::size_t alignment = 4u; }; template< > struct storage_traits< 8u > { - using type = boost::uint64_t BOOST_ATOMIC_DETAIL_MAY_ALIAS; + using type = std::uint64_t BOOST_ATOMIC_DETAIL_MAY_ALIAS; - static constexpr std::size_t native_alignment = atomics::detail::alignment_of< boost::uint64_t >::value; + static constexpr std::size_t native_alignment = atomics::detail::alignment_of< std::uint64_t >::value; static constexpr std::size_t alignment = 8u; }; diff --git a/include/boost/atomic/detail/wait_ops_darwin_ulock.hpp b/include/boost/atomic/detail/wait_ops_darwin_ulock.hpp index 673b36c..ae24b5a 100644 --- a/include/boost/atomic/detail/wait_ops_darwin_ulock.hpp +++ b/include/boost/atomic/detail/wait_ops_darwin_ulock.hpp @@ -37,12 +37,12 @@ namespace detail { extern "C" { // Timeout is in microseconds with zero meaning no timeout -int __ulock_wait(uint32_t operation, void* addr, uint64_t value, uint32_t timeout); +int __ulock_wait(std::uint32_t operation, void* addr, std::uint64_t value, std::uint32_t timeout); #if defined(BOOST_ATOMIC_DETAIL_HAS_DARWIN_ULOCK_WAIT2) // Timeout is in nanoseconds with zero meaning no timeout -int __ulock_wait2(uint32_t operation, void* addr, uint64_t value, uint64_t timeout, uint64_t value2); +int __ulock_wait2(std::uint32_t operation, void* addr, std::uint64_t value, std::uint64_t timeout, std::uint64_t value2); #endif // defined(BOOST_ATOMIC_DETAIL_HAS_DARWIN_ULOCK_WAIT2) -int __ulock_wake(uint32_t operation, void* addr, uint64_t wake_value); +int __ulock_wake(std::uint32_t operation, void* addr, std::uint64_t wake_value); } // extern "C" enum ulock_op @@ -65,7 +65,7 @@ enum ulock_op ulock_flag_no_errno = 0x01000000 }; -template< typename Base, uint32_t Opcode > +template< typename Base, std::uint32_t Opcode > struct wait_operations_darwin_ulock_common : public Base { @@ -111,9 +111,9 @@ private: while (new_val == old_val) { #if defined(BOOST_ATOMIC_DETAIL_HAS_DARWIN_ULOCK_WAIT2) - const int64_t rel_timeout = atomics::detail::chrono::ceil< std::chrono::nanoseconds >(timeout - now).count(); + const std::int64_t rel_timeout = atomics::detail::chrono::ceil< std::chrono::nanoseconds >(timeout - now).count(); #else - const int64_t rel_timeout = atomics::detail::chrono::ceil< std::chrono::microseconds >(timeout - now).count(); + const std::int64_t rel_timeout = atomics::detail::chrono::ceil< std::chrono::microseconds >(timeout - now).count(); #endif if (rel_timeout <= 0) { @@ -122,14 +122,14 @@ private: } #if defined(BOOST_ATOMIC_DETAIL_HAS_DARWIN_ULOCK_WAIT2) - __ulock_wait2(Opcode | ulock_flag_no_errno, const_cast< storage_type* >(&storage), old_val, static_cast< uint64_t >(rel_timeout), 0u); + __ulock_wait2(Opcode | ulock_flag_no_errno, const_cast< storage_type* >(&storage), old_val, static_cast< std::uint64_t >(rel_timeout), 0u); #else __ulock_wait ( Opcode | ulock_flag_no_errno, const_cast< storage_type* >(&storage), old_val, - rel_timeout <= static_cast< int64_t >(~static_cast< uint32_t >(0u)) ? static_cast< uint32_t >(rel_timeout) : ~static_cast< uint32_t >(0u) + rel_timeout <= static_cast< std::int64_t >(~static_cast< std::uint32_t >(0u)) ? static_cast< std::uint32_t >(rel_timeout) : ~static_cast< std::uint32_t >(0u) ); #endif now = Clock::now(); @@ -189,7 +189,7 @@ public: }; template< typename Base > -struct wait_operations< Base, sizeof(uint32_t), true, false > : +struct wait_operations< Base, sizeof(std::uint32_t), true, false > : public wait_operations_darwin_ulock_common< Base, ulock_op_compare_and_wait > { }; @@ -197,7 +197,7 @@ struct wait_operations< Base, sizeof(uint32_t), true, false > : #if defined(BOOST_ATOMIC_DETAIL_HAS_DARWIN_ULOCK_SHARED) template< typename Base > -struct wait_operations< Base, sizeof(uint32_t), true, true > : +struct wait_operations< Base, sizeof(std::uint32_t), true, true > : public wait_operations_darwin_ulock_common< Base, ulock_op_compare_and_wait_shared > { }; @@ -207,7 +207,7 @@ struct wait_operations< Base, sizeof(uint32_t), true, true > : #if defined(BOOST_ATOMIC_DETAIL_HAS_DARWIN_ULOCK64) template< typename Base > -struct wait_operations< Base, sizeof(uint64_t), true, false > : +struct wait_operations< Base, sizeof(std::uint64_t), true, false > : public wait_operations_darwin_ulock_common< Base, ulock_op_compare_and_wait64 > { }; @@ -215,7 +215,7 @@ struct wait_operations< Base, sizeof(uint64_t), true, false > : #if defined(BOOST_ATOMIC_DETAIL_HAS_DARWIN_ULOCK_SHARED) template< typename Base > -struct wait_operations< Base, sizeof(uint64_t), true, true > : +struct wait_operations< Base, sizeof(std::uint64_t), true, true > : public wait_operations_darwin_ulock_common< Base, ulock_op_compare_and_wait64_shared > { }; diff --git a/include/boost/atomic/detail/wait_ops_dragonfly_umtx.hpp b/include/boost/atomic/detail/wait_ops_dragonfly_umtx.hpp index e76525a..8035dcd 100644 --- a/include/boost/atomic/detail/wait_ops_dragonfly_umtx.hpp +++ b/include/boost/atomic/detail/wait_ops_dragonfly_umtx.hpp @@ -16,9 +16,9 @@ #define BOOST_ATOMIC_DETAIL_WAIT_OPS_DRAGONFLY_UMTX_HPP_INCLUDED_ #include +#include #include #include -#include #include #include #include @@ -75,7 +75,7 @@ private: storage_type new_val = base_type::load(storage, order); while (new_val == old_val) { - const int64_t usec = atomics::detail::chrono::ceil< std::chrono::microseconds >(timeout - now).count(); + const std::int64_t usec = atomics::detail::chrono::ceil< std::chrono::microseconds >(timeout - now).count(); if (usec <= 0) { timed_out = true; diff --git a/include/boost/atomic/detail/wait_ops_freebsd_umtx.hpp b/include/boost/atomic/detail/wait_ops_freebsd_umtx.hpp index 5cd81f9..12e3757 100644 --- a/include/boost/atomic/detail/wait_ops_freebsd_umtx.hpp +++ b/include/boost/atomic/detail/wait_ops_freebsd_umtx.hpp @@ -17,11 +17,11 @@ #include #include +#include #include #include #include #include -#include #include #include #include @@ -112,14 +112,14 @@ private: storage_type new_val = base_type::load(storage, order); while (new_val == old_val) { - const int64_t nsec = atomics::detail::chrono::ceil< std::chrono::nanoseconds >(timeout - now).count(); + const std::int64_t nsec = atomics::detail::chrono::ceil< std::chrono::nanoseconds >(timeout - now).count(); if (nsec <= 0) { timed_out = true; break; } - const int64_t sec = nsec / 1000000000; + const std::int64_t sec = nsec / 1000000000; if (BOOST_LIKELY(sec <= (std::numeric_limits< decltype(umt._timeout.tv_sec) >::max)())) { umt._timeout.tv_sec = static_cast< decltype(umt._timeout.tv_sec) >(sec); @@ -255,8 +255,8 @@ public: _umtx_time umt{}; if (BOOST_LIKELY(clock_gettime(CLOCK_MONOTONIC, &umt._timeout) == 0)) { - const int64_t nsec = static_cast< int64_t >(umt._timeout.tv_nsec) + atomics::detail::chrono::ceil< std::chrono::nanoseconds >(timeout).count(); - const int64_t sec = static_cast< int64_t >(umt._timeout.tv_sec) + nsec / 1000000000; + const std::int64_t nsec = static_cast< std::int64_t >(umt._timeout.tv_nsec) + atomics::detail::chrono::ceil< std::chrono::nanoseconds >(timeout).count(); + const std::int64_t sec = static_cast< std::int64_t >(umt._timeout.tv_sec) + nsec / 1000000000; if (BOOST_LIKELY(sec <= (std::numeric_limits< decltype(timespec::tv_sec) >::max)())) { umt._timeout.tv_sec = static_cast< decltype(umt._timeout.tv_sec) >(sec); @@ -290,14 +290,14 @@ private: storage_type new_val = base_type::load(storage, order); while (new_val == old_val) { - const int64_t nsec = atomics::detail::chrono::ceil< std::chrono::nanoseconds >(timeout - now).count(); + const std::int64_t nsec = atomics::detail::chrono::ceil< std::chrono::nanoseconds >(timeout - now).count(); if (nsec <= 0) { timed_out = true; break; } - const int64_t sec = nsec / 1000000000; + const std::int64_t sec = nsec / 1000000000; if (BOOST_LIKELY(sec <= (std::numeric_limits< decltype(ts.tv_sec) >::max)())) { ts.tv_sec = static_cast< decltype(ts.tv_sec) >(sec); diff --git a/include/boost/atomic/detail/wait_ops_futex.hpp b/include/boost/atomic/detail/wait_ops_futex.hpp index d52387f..5db7e88 100644 --- a/include/boost/atomic/detail/wait_ops_futex.hpp +++ b/include/boost/atomic/detail/wait_ops_futex.hpp @@ -16,11 +16,11 @@ #include // _POSIX_MONOTONIC_CLOCK #include +#include #include #include #include #include -#include #include #include #include @@ -140,14 +140,14 @@ private: storage_type new_val = base_type::load(storage, order); while (new_val == old_val) { - const int64_t nsec = atomics::detail::chrono::ceil< std::chrono::nanoseconds >(timeout - now).count(); + const std::int64_t nsec = atomics::detail::chrono::ceil< std::chrono::nanoseconds >(timeout - now).count(); if (nsec <= 0) { timed_out = true; break; } - const int64_t sec = nsec / 1000000000; + const std::int64_t sec = nsec / 1000000000; if (BOOST_LIKELY(sec <= (std::numeric_limits< decltype(ts.tv_sec) >::max)())) { ts.tv_sec = static_cast< decltype(ts.tv_sec) >(sec); @@ -294,8 +294,8 @@ public: timespec now{}; if (BOOST_LIKELY(clock_gettime(CLOCK_MONOTONIC, &now) == 0)) { - const int64_t nsec = static_cast< int64_t >(now.tv_nsec) + atomics::detail::chrono::ceil< std::chrono::nanoseconds >(timeout).count(); - const int64_t sec = static_cast< int64_t >(now.tv_sec) + nsec / 1000000000; + const std::int64_t nsec = static_cast< std::int64_t >(now.tv_nsec) + atomics::detail::chrono::ceil< std::chrono::nanoseconds >(timeout).count(); + const std::int64_t sec = static_cast< std::int64_t >(now.tv_sec) + nsec / 1000000000; if (BOOST_LIKELY(sec <= (std::numeric_limits< decltype(futex_timespec::tv_sec) >::max)())) { futex_timespec ts{}; diff --git a/include/boost/atomic/detail/wait_ops_windows.hpp b/include/boost/atomic/detail/wait_ops_windows.hpp index d49aaab..1c20940 100644 --- a/include/boost/atomic/detail/wait_ops_windows.hpp +++ b/include/boost/atomic/detail/wait_ops_windows.hpp @@ -14,8 +14,9 @@ #ifndef BOOST_ATOMIC_DETAIL_WAIT_OPS_WINDOWS_HPP_INCLUDED_ #define BOOST_ATOMIC_DETAIL_WAIT_OPS_WINDOWS_HPP_INCLUDED_ +#include +#include #include -#include #include #include #include @@ -84,7 +85,7 @@ private: storage_type new_val = base_type::load(storage, order); while (new_val == old_val) { - const int64_t msec = atomics::detail::chrono::ceil< std::chrono::milliseconds >(timeout - now).count(); + const std::int64_t msec = atomics::detail::chrono::ceil< std::chrono::milliseconds >(timeout - now).count(); if (msec <= 0) { timed_out = true; @@ -96,7 +97,8 @@ private: const_cast< storage_type* >(&storage), &old_val, Size, - msec <= static_cast< int64_t >(boost::winapi::max_non_infinite_wait) ? static_cast< boost::winapi::DWORD_ >(msec) : boost::winapi::max_non_infinite_wait + msec <= static_cast< std::int64_t >(boost::winapi::max_non_infinite_wait) ? + static_cast< boost::winapi::DWORD_ >(msec) : boost::winapi::max_non_infinite_wait ); now = Clock::now(); diff --git a/src/cpuid.hpp b/src/cpuid.hpp index 452917a..8377720 100644 --- a/src/cpuid.hpp +++ b/src/cpuid.hpp @@ -21,7 +21,7 @@ #if defined(_MSC_VER) #include // __cpuid #endif -#include +#include #include #include @@ -31,14 +31,14 @@ namespace atomics { namespace detail { //! The function invokes x86 cpuid instruction -inline void cpuid(uint32_t& eax, uint32_t& ebx, uint32_t& ecx, uint32_t& edx) +inline void cpuid(std::uint32_t& eax, std::uint32_t& ebx, std::uint32_t& ecx, std::uint32_t& edx) { #if defined(__GNUC__) #if (defined(__i386__) || defined(__VXWORKS__)) && (defined(__PIC__) || defined(__PIE__)) && !(defined(__clang__) || (defined(BOOST_GCC) && BOOST_GCC >= 50100)) // Unless the compiler can do it automatically, we have to backup ebx in 32-bit PIC/PIE code because it is reserved by the ABI. // For VxWorks ebx is reserved on 64-bit as well. #if defined(__x86_64__) - uint64_t rbx = ebx; + std::uint64_t rbx = ebx; __asm__ __volatile__ ( "xchgq %%rbx, %0\n\t" @@ -46,7 +46,7 @@ inline void cpuid(uint32_t& eax, uint32_t& ebx, uint32_t& ecx, uint32_t& edx) "xchgq %%rbx, %0\n\t" : "+DS" (rbx), "+a" (eax), "+c" (ecx), "+d" (edx) ); - ebx = static_cast< uint32_t >(rbx); + ebx = static_cast< std::uint32_t >(rbx); #else // defined(__x86_64__) __asm__ __volatile__ ( diff --git a/src/find_address_sse2.cpp b/src/find_address_sse2.cpp index 3e624dd..20b1783 100644 --- a/src/find_address_sse2.cpp +++ b/src/find_address_sse2.cpp @@ -16,10 +16,10 @@ #if BOOST_ARCH_X86 && defined(BOOST_ATOMIC_DETAIL_SIZEOF_POINTER) && (BOOST_ATOMIC_DETAIL_SIZEOF_POINTER == 8 || BOOST_ATOMIC_DETAIL_SIZEOF_POINTER == 4) -#include #include +#include +#include -#include #include #include #include "find_address.hpp" @@ -120,7 +120,7 @@ std::size_t find_address_sse2(const volatile void* addr, const volatile void* co mm_mask1_lo = _mm_packs_epi16(mm_mask1_lo, mm_mask3_lo); - uint32_t mask = _mm_movemask_epi8(mm_mask1_lo); + std::uint32_t mask = _mm_movemask_epi8(mm_mask1_lo); if (mask) { pos += atomics::detail::count_trailing_zeros(mask); @@ -151,7 +151,7 @@ std::size_t find_address_sse2(const volatile void* addr, const volatile void* co mm_mask1_lo = _mm_packs_epi32(mm_mask1_lo, mm_mask2_lo); - uint32_t mask = _mm_movemask_epi8(mm_mask1_lo); + std::uint32_t mask = _mm_movemask_epi8(mm_mask1_lo); if (mask) { pos += atomics::detail::count_trailing_zeros(mask) / 2u; @@ -174,7 +174,7 @@ std::size_t find_address_sse2(const volatile void* addr, const volatile void* co mm_mask1_lo = mm_pand_si128(mm_mask1_lo, mm_mask1_hi); - uint32_t mask = _mm_movemask_ps(_mm_castsi128_ps(mm_mask1_lo)); + std::uint32_t mask = _mm_movemask_ps(_mm_castsi128_ps(mm_mask1_lo)); if (mask) { pos += atomics::detail::count_trailing_zeros(mask); @@ -192,7 +192,7 @@ std::size_t find_address_sse2(const volatile void* addr, const volatile void* co __m128i mm_mask = _mm_shuffle_epi32(mm1, _MM_SHUFFLE(2, 3, 0, 1)); mm_mask = mm_pand_si128(mm_mask, mm1); - uint32_t mask = _mm_movemask_pd(_mm_castsi128_pd(mm_mask)); + std::uint32_t mask = _mm_movemask_pd(_mm_castsi128_pd(mm_mask)); if (mask) { pos += atomics::detail::count_trailing_zeros(mask); @@ -230,7 +230,7 @@ done: mm1 = _mm_packs_epi16(mm1, mm3); - uint32_t mask = _mm_movemask_epi8(mm1); + std::uint32_t mask = _mm_movemask_epi8(mm1); if (mask) { pos += atomics::detail::count_trailing_zeros(mask); @@ -248,7 +248,7 @@ done: mm1 = _mm_packs_epi32(mm1, mm2); - uint32_t mask = _mm_movemask_epi8(mm1); + std::uint32_t mask = _mm_movemask_epi8(mm1); if (mask) { pos += atomics::detail::count_trailing_zeros(mask) / 2u; @@ -264,7 +264,7 @@ done: mm1 = _mm_cmpeq_epi32(mm1, mm_addr); - uint32_t mask = _mm_movemask_ps(_mm_castsi128_ps(mm1)); + std::uint32_t mask = _mm_movemask_ps(_mm_castsi128_ps(mm1)); if (mask) { pos += atomics::detail::count_trailing_zeros(mask); diff --git a/src/find_address_sse41.cpp b/src/find_address_sse41.cpp index 1db1b74..7e86ca3 100644 --- a/src/find_address_sse41.cpp +++ b/src/find_address_sse41.cpp @@ -16,10 +16,10 @@ #if BOOST_ARCH_X86 && defined(BOOST_ATOMIC_DETAIL_SIZEOF_POINTER) && (BOOST_ATOMIC_DETAIL_SIZEOF_POINTER == 8) -#include #include +#include +#include -#include #include #include #include "find_address.hpp" @@ -71,7 +71,7 @@ std::size_t find_address_sse41(const volatile void* addr, const volatile void* c mm1 = _mm_packs_epi16(mm1, mm5); - uint32_t mask = _mm_movemask_epi8(mm1); + std::uint32_t mask = _mm_movemask_epi8(mm1); if (mask) { pos += atomics::detail::count_trailing_zeros(mask); @@ -96,7 +96,7 @@ std::size_t find_address_sse41(const volatile void* addr, const volatile void* c mm1 = _mm_packs_epi32(mm1, mm3); - uint32_t mask = _mm_movemask_epi8(mm1); + std::uint32_t mask = _mm_movemask_epi8(mm1); if (mask) { pos += atomics::detail::count_trailing_zeros(mask) / 2u; @@ -116,7 +116,7 @@ std::size_t find_address_sse41(const volatile void* addr, const volatile void* c mm1 = _mm_castps_si128(_mm_shuffle_ps(_mm_castsi128_ps(mm1), _mm_castsi128_ps(mm2), _MM_SHUFFLE(2, 0, 2, 0))); - uint32_t mask = _mm_movemask_ps(_mm_castsi128_ps(mm1)); + std::uint32_t mask = _mm_movemask_ps(_mm_castsi128_ps(mm1)); if (mask) { pos += atomics::detail::count_trailing_zeros(mask); @@ -131,7 +131,7 @@ std::size_t find_address_sse41(const volatile void* addr, const volatile void* c __m128i mm1 = _mm_load_si128(reinterpret_cast< const __m128i* >(addrs + pos)); mm1 = _mm_cmpeq_epi64(mm1, mm_addr); - uint32_t mask = _mm_movemask_pd(_mm_castsi128_pd(mm1)); + std::uint32_t mask = _mm_movemask_pd(_mm_castsi128_pd(mm1)); if (mask) { pos += atomics::detail::count_trailing_zeros(mask); diff --git a/src/lock_pool.cpp b/src/lock_pool.cpp index e47d767..fe477e3 100644 --- a/src/lock_pool.cpp +++ b/src/lock_pool.cpp @@ -149,10 +149,10 @@ std::size_t find_address_dispatch(const volatile void* addr, const volatile void #if defined(BOOST_ATOMIC_USE_SSE2) // First, check the max available cpuid function - uint32_t eax = 0u, ebx = 0u, ecx = 0u, edx = 0u; + std::uint32_t eax = 0u, ebx = 0u, ecx = 0u, edx = 0u; atomics::detail::cpuid(eax, ebx, ecx, edx); - const uint32_t max_cpuid_function = eax; + const std::uint32_t max_cpuid_function = eax; if (max_cpuid_function >= 1u) { // Obtain CPU features diff --git a/src/x86_vector_tools.hpp b/src/x86_vector_tools.hpp index 7d9e332..d3f7bea 100644 --- a/src/x86_vector_tools.hpp +++ b/src/x86_vector_tools.hpp @@ -20,7 +20,7 @@ #if BOOST_ARCH_X86 && defined(BOOST_ATOMIC_DETAIL_SIZEOF_POINTER) && (BOOST_ATOMIC_DETAIL_SIZEOF_POINTER == 8) #include -#include +#include #include #include @@ -36,7 +36,7 @@ BOOST_FORCEINLINE __m128i mm_set1_epiptr(uintptr_t ptr) return _mm_set1_epi64x(ptr); #else // MSVC up until 14.0 update 3 doesn't provide _mm_set1_epi64x - uint32_t lo = static_cast< uint32_t >(ptr), hi = static_cast< uint32_t >(ptr >> 32); + std::uint32_t lo = static_cast< std::uint32_t >(ptr), hi = static_cast< std::uint32_t >(ptr >> 32); return _mm_set_epi32(hi, lo, hi, lo); #endif } diff --git a/test/aligned_object.hpp b/test/aligned_object.hpp index edadddd..d85bcc1 100644 --- a/test/aligned_object.hpp +++ b/test/aligned_object.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2020 Andrey Semashev +// Copyright (c) 2020-2025 Andrey Semashev // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at @@ -8,8 +8,8 @@ #define BOOST_ATOMIC_TESTS_ALIGNED_OBJECT_HPP_INCLUDED_ #include +#include #include -#include //! A wrapper that creates an object that has at least the specified alignment template< typename T, std::size_t Alignment > @@ -46,8 +46,8 @@ public: private: unsigned char* get_aligned_storage() { -#if defined(BOOST_HAS_INTPTR_T) - using uintptr_type = boost::uintptr_t; +#if defined(UINTPTR_MAX) + using uintptr_type = std::uintptr_t; #else using uintptr_type = std::size_t; #endif diff --git a/test/api_test_helpers.hpp b/test/api_test_helpers.hpp index b2a5325..ac3f5b7 100644 --- a/test/api_test_helpers.hpp +++ b/test/api_test_helpers.hpp @@ -9,7 +9,9 @@ #define BOOST_ATOMIC_API_TEST_HELPERS_HPP #include + #include +#include #include #include #include @@ -17,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -1385,11 +1386,11 @@ void test_pointer_api(void) test_base_operators< Wrapper, void* >(&values[0], &values[1], &values[2]); -#if defined(BOOST_HAS_INTPTR_T) - Wrapper wrapper_ptr; - typename Wrapper::atomic_reference_type ptr = wrapper_ptr.a; - Wrapper wrapper_integral; - typename Wrapper::atomic_reference_type integral = wrapper_integral.a; +#if defined(UINTPTR_MAX) + Wrapper< void* > wrapper_ptr; + typename Wrapper< void* >::atomic_reference_type ptr = wrapper_ptr.a; + Wrapper< std::intptr_t > wrapper_integral; + typename Wrapper< std::intptr_t >::atomic_reference_type integral = wrapper_integral.a; BOOST_TEST_EQ( ptr.is_lock_free(), integral.is_lock_free() ); #endif } diff --git a/test/atomic_api.cpp b/test/atomic_api.cpp index 1f8a134..3e0e586 100644 --- a/test/atomic_api.cpp +++ b/test/atomic_api.cpp @@ -7,8 +7,8 @@ #include +#include #include -#include #include "atomic_wrapper.hpp" #include "api_test_helpers.hpp" @@ -20,20 +20,20 @@ int main(int, char *[]) test_integral_api< atomic_wrapper, char >(); test_integral_api< atomic_wrapper, signed char >(); test_integral_api< atomic_wrapper, unsigned char >(); - test_integral_api< atomic_wrapper, boost::uint8_t >(); - test_integral_api< atomic_wrapper, boost::int8_t >(); + test_integral_api< atomic_wrapper, std::uint8_t >(); + test_integral_api< atomic_wrapper, std::int8_t >(); test_integral_api< atomic_wrapper, short >(); test_integral_api< atomic_wrapper, unsigned short >(); - test_integral_api< atomic_wrapper, boost::uint16_t >(); - test_integral_api< atomic_wrapper, boost::int16_t >(); + test_integral_api< atomic_wrapper, std::uint16_t >(); + test_integral_api< atomic_wrapper, std::int16_t >(); test_integral_api< atomic_wrapper, int >(); test_integral_api< atomic_wrapper, unsigned int >(); - test_integral_api< atomic_wrapper, boost::uint32_t >(); - test_integral_api< atomic_wrapper, boost::int32_t >(); + test_integral_api< atomic_wrapper, std::uint32_t >(); + test_integral_api< atomic_wrapper, std::int32_t >(); test_integral_api< atomic_wrapper, long >(); test_integral_api< atomic_wrapper, unsigned long >(); - test_integral_api< atomic_wrapper, boost::uint64_t >(); - test_integral_api< atomic_wrapper, boost::int64_t >(); + test_integral_api< atomic_wrapper, std::uint64_t >(); + test_integral_api< atomic_wrapper, std::int64_t >(); test_integral_api< atomic_wrapper, long long >(); test_integral_api< atomic_wrapper, unsigned long long >(); #if defined(BOOST_HAS_INT128) && !defined(BOOST_ATOMIC_TESTS_NO_INT128) @@ -72,16 +72,16 @@ int main(int, char *[]) test_enum_api< atomic_wrapper >(); - test_struct_api< atomic_wrapper, test_struct< boost::uint8_t > >(); - test_struct_api< atomic_wrapper, test_struct< boost::uint16_t > >(); - test_struct_api< atomic_wrapper, test_struct< boost::uint32_t > >(); - test_struct_api< atomic_wrapper, test_struct< boost::uint64_t > >(); + test_struct_api< atomic_wrapper, test_struct< std::uint8_t > >(); + test_struct_api< atomic_wrapper, test_struct< std::uint16_t > >(); + test_struct_api< atomic_wrapper, test_struct< std::uint32_t > >(); + test_struct_api< atomic_wrapper, test_struct< std::uint64_t > >(); #if defined(BOOST_HAS_INT128) test_struct_api< atomic_wrapper, test_struct< boost::uint128_type > >(); #endif // https://svn.boost.org/trac/boost/ticket/10994 - test_struct_x2_api< atomic_wrapper, test_struct_x2< boost::uint64_t > >(); + test_struct_x2_api< atomic_wrapper, test_struct_x2< std::uint64_t > >(); // https://svn.boost.org/trac/boost/ticket/9985 test_struct_api< atomic_wrapper, test_struct< double > >(); diff --git a/test/atomic_ref_api.cpp b/test/atomic_ref_api.cpp index e973d1f..116c763 100644 --- a/test/atomic_ref_api.cpp +++ b/test/atomic_ref_api.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2020-2021 Andrey Semashev +// Copyright (c) 2020-2025 Andrey Semashev // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at @@ -7,8 +7,8 @@ #include #include +#include #include -#include #include "aligned_object.hpp" #include "atomic_wrapper.hpp" @@ -19,20 +19,20 @@ int main(int, char *[]) test_integral_api< atomic_ref_wrapper, char >(); test_integral_api< atomic_ref_wrapper, signed char >(); test_integral_api< atomic_ref_wrapper, unsigned char >(); - test_integral_api< atomic_ref_wrapper, boost::uint8_t >(); - test_integral_api< atomic_ref_wrapper, boost::int8_t >(); + test_integral_api< atomic_ref_wrapper, std::uint8_t >(); + test_integral_api< atomic_ref_wrapper, std::int8_t >(); test_integral_api< atomic_ref_wrapper, short >(); test_integral_api< atomic_ref_wrapper, unsigned short >(); - test_integral_api< atomic_ref_wrapper, boost::uint16_t >(); - test_integral_api< atomic_ref_wrapper, boost::int16_t >(); + test_integral_api< atomic_ref_wrapper, std::uint16_t >(); + test_integral_api< atomic_ref_wrapper, std::int16_t >(); test_integral_api< atomic_ref_wrapper, int >(); test_integral_api< atomic_ref_wrapper, unsigned int >(); - test_integral_api< atomic_ref_wrapper, boost::uint32_t >(); - test_integral_api< atomic_ref_wrapper, boost::int32_t >(); + test_integral_api< atomic_ref_wrapper, std::uint32_t >(); + test_integral_api< atomic_ref_wrapper, std::int32_t >(); test_integral_api< atomic_ref_wrapper, long >(); test_integral_api< atomic_ref_wrapper, unsigned long >(); - test_integral_api< atomic_ref_wrapper, boost::uint64_t >(); - test_integral_api< atomic_ref_wrapper, boost::int64_t >(); + test_integral_api< atomic_ref_wrapper, std::uint64_t >(); + test_integral_api< atomic_ref_wrapper, std::int64_t >(); test_integral_api< atomic_ref_wrapper, long long >(); test_integral_api< atomic_ref_wrapper, unsigned long long >(); #if defined(BOOST_HAS_INT128) && !defined(BOOST_ATOMIC_TESTS_NO_INT128) @@ -53,16 +53,16 @@ int main(int, char *[]) test_enum_api< atomic_ref_wrapper >(); - test_struct_api< atomic_ref_wrapper, test_struct< boost::uint8_t > >(); - test_struct_api< atomic_ref_wrapper, test_struct< boost::uint16_t > >(); - test_struct_api< atomic_ref_wrapper, test_struct< boost::uint32_t > >(); - test_struct_api< atomic_ref_wrapper, test_struct< boost::uint64_t > >(); + test_struct_api< atomic_ref_wrapper, test_struct< std::uint8_t > >(); + test_struct_api< atomic_ref_wrapper, test_struct< std::uint16_t > >(); + test_struct_api< atomic_ref_wrapper, test_struct< std::uint32_t > >(); + test_struct_api< atomic_ref_wrapper, test_struct< std::uint64_t > >(); #if defined(BOOST_HAS_INT128) test_struct_api< atomic_ref_wrapper, test_struct< boost::uint128_type > >(); #endif // https://svn.boost.org/trac/boost/ticket/10994 - test_struct_x2_api< atomic_ref_wrapper, test_struct_x2< boost::uint64_t > >(); + test_struct_x2_api< atomic_ref_wrapper, test_struct_x2< std::uint64_t > >(); // https://svn.boost.org/trac/boost/ticket/9985 test_struct_api< atomic_ref_wrapper, test_struct< double > >(); diff --git a/test/ipc_atomic_api.cpp b/test/ipc_atomic_api.cpp index b69dc68..6350ee0 100644 --- a/test/ipc_atomic_api.cpp +++ b/test/ipc_atomic_api.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2020 Andrey Semashev +// Copyright (c) 2020-2025 Andrey Semashev // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at @@ -8,8 +8,8 @@ #include #include +#include #include -#include #include "atomic_wrapper.hpp" #include "api_test_helpers.hpp" @@ -20,17 +20,17 @@ int main(int, char *[]) test_flag_api< boost::ipc_atomic_flag >(); #endif - test_lock_free_integral_api< ipc_atomic_wrapper, boost::uint8_t >(); - test_lock_free_integral_api< ipc_atomic_wrapper, boost::int8_t >(); + test_lock_free_integral_api< ipc_atomic_wrapper, std::uint8_t >(); + test_lock_free_integral_api< ipc_atomic_wrapper, std::int8_t >(); - test_lock_free_integral_api< ipc_atomic_wrapper, boost::uint16_t >(); - test_lock_free_integral_api< ipc_atomic_wrapper, boost::int16_t >(); + test_lock_free_integral_api< ipc_atomic_wrapper, std::uint16_t >(); + test_lock_free_integral_api< ipc_atomic_wrapper, std::int16_t >(); - test_lock_free_integral_api< ipc_atomic_wrapper, boost::uint32_t >(); - test_lock_free_integral_api< ipc_atomic_wrapper, boost::int32_t >(); + test_lock_free_integral_api< ipc_atomic_wrapper, std::uint32_t >(); + test_lock_free_integral_api< ipc_atomic_wrapper, std::int32_t >(); - test_lock_free_integral_api< ipc_atomic_wrapper, boost::uint64_t >(); - test_lock_free_integral_api< ipc_atomic_wrapper, boost::int64_t >(); + test_lock_free_integral_api< ipc_atomic_wrapper, std::uint64_t >(); + test_lock_free_integral_api< ipc_atomic_wrapper, std::int64_t >(); #if defined(BOOST_HAS_INT128) && !defined(BOOST_ATOMIC_TESTS_NO_INT128) test_lock_free_integral_api< ipc_atomic_wrapper, boost::int128_type >(); diff --git a/test/ipc_atomic_ref_api.cpp b/test/ipc_atomic_ref_api.cpp index 1385de5..b2550e2 100644 --- a/test/ipc_atomic_ref_api.cpp +++ b/test/ipc_atomic_ref_api.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2020-2021 Andrey Semashev +// Copyright (c) 2020-2025 Andrey Semashev // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at @@ -7,8 +7,8 @@ #include #include +#include #include -#include #include "aligned_object.hpp" #include "atomic_wrapper.hpp" @@ -16,17 +16,17 @@ int main(int, char *[]) { - test_lock_free_integral_api< ipc_atomic_ref_wrapper, boost::uint8_t >(); - test_lock_free_integral_api< ipc_atomic_ref_wrapper, boost::int8_t >(); + test_lock_free_integral_api< ipc_atomic_ref_wrapper, std::uint8_t >(); + test_lock_free_integral_api< ipc_atomic_ref_wrapper, std::int8_t >(); - test_lock_free_integral_api< ipc_atomic_ref_wrapper, boost::uint16_t >(); - test_lock_free_integral_api< ipc_atomic_ref_wrapper, boost::int16_t >(); + test_lock_free_integral_api< ipc_atomic_ref_wrapper, std::uint16_t >(); + test_lock_free_integral_api< ipc_atomic_ref_wrapper, std::int16_t >(); - test_lock_free_integral_api< ipc_atomic_ref_wrapper, boost::uint32_t >(); - test_lock_free_integral_api< ipc_atomic_ref_wrapper, boost::int32_t >(); + test_lock_free_integral_api< ipc_atomic_ref_wrapper, std::uint32_t >(); + test_lock_free_integral_api< ipc_atomic_ref_wrapper, std::int32_t >(); - test_lock_free_integral_api< ipc_atomic_ref_wrapper, boost::uint64_t >(); - test_lock_free_integral_api< ipc_atomic_ref_wrapper, boost::int64_t >(); + test_lock_free_integral_api< ipc_atomic_ref_wrapper, std::uint64_t >(); + test_lock_free_integral_api< ipc_atomic_ref_wrapper, std::int64_t >(); #if defined(BOOST_HAS_INT128) && !defined(BOOST_ATOMIC_TESTS_NO_INT128) test_lock_free_integral_api< ipc_atomic_ref_wrapper, boost::int128_type >(); diff --git a/test/ipc_wait_api.cpp b/test/ipc_wait_api.cpp index 153f6ed..a39c531 100644 --- a/test/ipc_wait_api.cpp +++ b/test/ipc_wait_api.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2020 Andrey Semashev +// Copyright (c) 2020-2025 Andrey Semashev // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at @@ -8,8 +8,8 @@ #include #include +#include #include -#include #include "ipc_wait_test_helpers.hpp" @@ -17,10 +17,10 @@ int main(int, char *[]) { test_flag_wait_notify_api(); - test_wait_notify_api< ipc_atomic_wrapper, boost::uint8_t >(1, 2, 3, BOOST_ATOMIC_HAS_NATIVE_INT8_IPC_WAIT_NOTIFY); - test_wait_notify_api< ipc_atomic_wrapper, boost::uint16_t >(1, 2, 3, BOOST_ATOMIC_HAS_NATIVE_INT16_IPC_WAIT_NOTIFY); - test_wait_notify_api< ipc_atomic_wrapper, boost::uint32_t >(1, 2, 3, BOOST_ATOMIC_HAS_NATIVE_INT32_IPC_WAIT_NOTIFY); - test_wait_notify_api< ipc_atomic_wrapper, boost::uint64_t >(1, 2, 3, BOOST_ATOMIC_HAS_NATIVE_INT64_IPC_WAIT_NOTIFY); + test_wait_notify_api< ipc_atomic_wrapper, std::uint8_t >(1, 2, 3, BOOST_ATOMIC_HAS_NATIVE_INT8_IPC_WAIT_NOTIFY); + test_wait_notify_api< ipc_atomic_wrapper, std::uint16_t >(1, 2, 3, BOOST_ATOMIC_HAS_NATIVE_INT16_IPC_WAIT_NOTIFY); + test_wait_notify_api< ipc_atomic_wrapper, std::uint32_t >(1, 2, 3, BOOST_ATOMIC_HAS_NATIVE_INT32_IPC_WAIT_NOTIFY); + test_wait_notify_api< ipc_atomic_wrapper, std::uint64_t >(1, 2, 3, BOOST_ATOMIC_HAS_NATIVE_INT64_IPC_WAIT_NOTIFY); #if defined(BOOST_HAS_INT128) && !defined(BOOST_ATOMIC_TESTS_NO_INT128) test_wait_notify_api< ipc_atomic_wrapper, boost::uint128_type >(1, 2, 3, BOOST_ATOMIC_HAS_NATIVE_INT128_IPC_WAIT_NOTIFY); #endif diff --git a/test/ipc_wait_ref_api.cpp b/test/ipc_wait_ref_api.cpp index 6d2b5e5..53d4de3 100644 --- a/test/ipc_wait_ref_api.cpp +++ b/test/ipc_wait_ref_api.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2020 Andrey Semashev +// Copyright (c) 2020-2025 Andrey Semashev // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at @@ -7,17 +7,17 @@ #include #include +#include #include -#include #include "ipc_wait_test_helpers.hpp" int main(int, char *[]) { - test_wait_notify_api< ipc_atomic_ref_wrapper, boost::uint8_t >(1, 2, 3, BOOST_ATOMIC_HAS_NATIVE_INT8_IPC_WAIT_NOTIFY); - test_wait_notify_api< ipc_atomic_ref_wrapper, boost::uint16_t >(1, 2, 3, BOOST_ATOMIC_HAS_NATIVE_INT16_IPC_WAIT_NOTIFY); - test_wait_notify_api< ipc_atomic_ref_wrapper, boost::uint32_t >(1, 2, 3, BOOST_ATOMIC_HAS_NATIVE_INT32_IPC_WAIT_NOTIFY); - test_wait_notify_api< ipc_atomic_ref_wrapper, boost::uint64_t >(1, 2, 3, BOOST_ATOMIC_HAS_NATIVE_INT64_IPC_WAIT_NOTIFY); + test_wait_notify_api< ipc_atomic_ref_wrapper, std::uint8_t >(1, 2, 3, BOOST_ATOMIC_HAS_NATIVE_INT8_IPC_WAIT_NOTIFY); + test_wait_notify_api< ipc_atomic_ref_wrapper, std::uint16_t >(1, 2, 3, BOOST_ATOMIC_HAS_NATIVE_INT16_IPC_WAIT_NOTIFY); + test_wait_notify_api< ipc_atomic_ref_wrapper, std::uint32_t >(1, 2, 3, BOOST_ATOMIC_HAS_NATIVE_INT32_IPC_WAIT_NOTIFY); + test_wait_notify_api< ipc_atomic_ref_wrapper, std::uint64_t >(1, 2, 3, BOOST_ATOMIC_HAS_NATIVE_INT64_IPC_WAIT_NOTIFY); #if defined(BOOST_HAS_INT128) && !defined(BOOST_ATOMIC_TESTS_NO_INT128) test_wait_notify_api< ipc_atomic_ref_wrapper, boost::uint128_type >(1, 2, 3, BOOST_ATOMIC_HAS_NATIVE_INT128_IPC_WAIT_NOTIFY); #endif diff --git a/test/wait_api.cpp b/test/wait_api.cpp index e76651c..dec5f31 100644 --- a/test/wait_api.cpp +++ b/test/wait_api.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2020 Andrey Semashev +// Copyright (c) 2020-2025 Andrey Semashev // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at @@ -8,8 +8,8 @@ #include #include +#include #include -#include #include "wait_test_helpers.hpp" @@ -17,10 +17,10 @@ int main(int, char *[]) { test_flag_wait_notify_api(); - test_wait_notify_api< atomic_wrapper, boost::uint8_t >(1, 2, 3, BOOST_ATOMIC_HAS_NATIVE_INT8_WAIT_NOTIFY); - test_wait_notify_api< atomic_wrapper, boost::uint16_t >(1, 2, 3, BOOST_ATOMIC_HAS_NATIVE_INT16_WAIT_NOTIFY); - test_wait_notify_api< atomic_wrapper, boost::uint32_t >(1, 2, 3, BOOST_ATOMIC_HAS_NATIVE_INT32_WAIT_NOTIFY); - test_wait_notify_api< atomic_wrapper, boost::uint64_t >(1, 2, 3, BOOST_ATOMIC_HAS_NATIVE_INT64_WAIT_NOTIFY); + test_wait_notify_api< atomic_wrapper, std::uint8_t >(1, 2, 3, BOOST_ATOMIC_HAS_NATIVE_INT8_WAIT_NOTIFY); + test_wait_notify_api< atomic_wrapper, std::uint16_t >(1, 2, 3, BOOST_ATOMIC_HAS_NATIVE_INT16_WAIT_NOTIFY); + test_wait_notify_api< atomic_wrapper, std::uint32_t >(1, 2, 3, BOOST_ATOMIC_HAS_NATIVE_INT32_WAIT_NOTIFY); + test_wait_notify_api< atomic_wrapper, std::uint64_t >(1, 2, 3, BOOST_ATOMIC_HAS_NATIVE_INT64_WAIT_NOTIFY); #if defined(BOOST_HAS_INT128) && !defined(BOOST_ATOMIC_TESTS_NO_INT128) test_wait_notify_api< atomic_wrapper, boost::uint128_type >(1, 2, 3, BOOST_ATOMIC_HAS_NATIVE_INT128_WAIT_NOTIFY); #endif diff --git a/test/wait_ref_api.cpp b/test/wait_ref_api.cpp index c861fe4..3e51cc8 100644 --- a/test/wait_ref_api.cpp +++ b/test/wait_ref_api.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2020 Andrey Semashev +// Copyright (c) 2020-2025 Andrey Semashev // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at @@ -7,17 +7,17 @@ #include #include +#include #include -#include #include "wait_test_helpers.hpp" int main(int, char *[]) { - test_wait_notify_api< atomic_ref_wrapper, boost::uint8_t >(1, 2, 3, BOOST_ATOMIC_HAS_NATIVE_INT8_WAIT_NOTIFY); - test_wait_notify_api< atomic_ref_wrapper, boost::uint16_t >(1, 2, 3, BOOST_ATOMIC_HAS_NATIVE_INT16_WAIT_NOTIFY); - test_wait_notify_api< atomic_ref_wrapper, boost::uint32_t >(1, 2, 3, BOOST_ATOMIC_HAS_NATIVE_INT32_WAIT_NOTIFY); - test_wait_notify_api< atomic_ref_wrapper, boost::uint64_t >(1, 2, 3, BOOST_ATOMIC_HAS_NATIVE_INT64_WAIT_NOTIFY); + test_wait_notify_api< atomic_ref_wrapper, std::uint8_t >(1, 2, 3, BOOST_ATOMIC_HAS_NATIVE_INT8_WAIT_NOTIFY); + test_wait_notify_api< atomic_ref_wrapper, std::uint16_t >(1, 2, 3, BOOST_ATOMIC_HAS_NATIVE_INT16_WAIT_NOTIFY); + test_wait_notify_api< atomic_ref_wrapper, std::uint32_t >(1, 2, 3, BOOST_ATOMIC_HAS_NATIVE_INT32_WAIT_NOTIFY); + test_wait_notify_api< atomic_ref_wrapper, std::uint64_t >(1, 2, 3, BOOST_ATOMIC_HAS_NATIVE_INT64_WAIT_NOTIFY); #if defined(BOOST_HAS_INT128) && !defined(BOOST_ATOMIC_TESTS_NO_INT128) test_wait_notify_api< atomic_ref_wrapper, boost::uint128_type >(1, 2, 3, BOOST_ATOMIC_HAS_NATIVE_INT128_WAIT_NOTIFY); #endif