diff -Nura original/boost_1_55_0/boost/atomic/detail/cas32strong.hpp boost_1_55_0/boost/atomic/detail/cas32strong.hpp --- original/boost_1_55_0/boost/atomic/detail/cas32strong.hpp 2013-07-20 20:01:35.000000000 +0200 +++ boost_1_55_0/boost/atomic/detail/cas32strong.hpp 2013-11-23 00:01:34.926327900 +0100 @@ -658,7 +658,7 @@ } void - store(value_type const& v, memory_order order = memory_order_seq_cst) ) volatile BOOST_NOEXCEPT + store(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { storage_type tmp = 0; memcpy(&tmp, &v, sizeof(value_type)); @@ -679,7 +679,7 @@ } value_type - exchange(value_type const& v, memory_order order = memory_order_seq_cst) ) volatile BOOST_NOEXCEPT + exchange(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { @@ -692,7 +692,7 @@ value_type & expected, value_type const& desired, memory_order success_order, - memory_order failure_order) ) volatile BOOST_NOEXCEPT + memory_order failure_order) volatile BOOST_NOEXCEPT { return compare_exchange_strong(expected, desired, success_order, failure_order); } @@ -702,7 +702,7 @@ value_type & expected, value_type const& desired, memory_order success_order, - memory_order failure_order) ) volatile BOOST_NOEXCEPT + memory_order failure_order) volatile BOOST_NOEXCEPT { storage_type expected_s = 0, desired_s = 0; memcpy(&expected_s, &expected, sizeof(value_type)); @@ -755,7 +755,7 @@ } void - store(value_type const& v, memory_order order = memory_order_seq_cst) ) volatile BOOST_NOEXCEPT + store(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { storage_type tmp = 0; memcpy(&tmp, &v, sizeof(value_type)); @@ -776,7 +776,7 @@ } value_type - exchange(value_type const& v, memory_order order = memory_order_seq_cst) ) volatile BOOST_NOEXCEPT + exchange(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { diff -Nura original/boost_1_55_0/boost/atomic/detail/gcc-cas.hpp boost_1_55_0/boost/atomic/detail/gcc-cas.hpp --- original/boost_1_55_0/boost/atomic/detail/gcc-cas.hpp 2013-07-20 20:01:35.000000000 +0200 +++ boost_1_55_0/boost/atomic/detail/gcc-cas.hpp 2013-11-23 00:08:50.941266500 +0100 @@ -104,6 +104,9 @@ return success; } +} +} + class atomic_flag { private: @@ -129,7 +132,7 @@ do { if (expected == 1) break; - } while (!atomics::detail::platform_cmpxchg32(expected, (uint32_t)1, &v_)); + } while (!atomics::detail::platform_cmpxchg32_strong(expected, (uint32_t)1, &v_)); atomics::detail::platform_fence_after(order); return expected; } @@ -138,8 +141,6 @@ #define BOOST_ATOMIC_FLAG_LOCK_FREE 2 } -} -} #include @@ -148,9 +149,9 @@ #define BOOST_ATOMIC_CHAR_LOCK_FREE 2 #define BOOST_ATOMIC_SHORT_LOCK_FREE 2 #define BOOST_ATOMIC_INT_LOCK_FREE 2 -#define BOOST_ATOMIC_LONG_LOCK_FREE (sizeof(long) <= 4 ? 2 : 0) -#define BOOST_ATOMIC_LLONG_LOCK_FREE (sizeof(long long) <= 4 ? 2 : 0) -#define BOOST_ATOMIC_POINTER_LOCK_FREE (sizeof(void *) <= 4 ? 2 : 0) +#define BOOST_ATOMIC_LONG_LOCK_FREE (__SIZEOF_LONG__ <= 4 ? 2 : 0) +#define BOOST_ATOMIC_LLONG_LOCK_FREE (__SIZEOF_LONG_LONG__ <= 4 ? 2 : 0) +#define BOOST_ATOMIC_POINTER_LOCK_FREE (__SIZEOF_POINTER__ <= 4 ? 2 : 0) #define BOOST_ATOMIC_BOOL_LOCK_FREE 2 #include diff -Nura original/boost_1_55_0/boost/atomic/detail/platform.hpp boost_1_55_0/boost/atomic/detail/platform.hpp --- original/boost_1_55_0/boost/atomic/detail/platform.hpp 2013-09-08 15:55:41.000000000 +0200 +++ boost_1_55_0/boost/atomic/detail/platform.hpp 2013-11-23 00:14:50.719844700 +0100 @@ -57,9 +57,8 @@ #include -#elif 0 && defined(__GNUC__) /* currently does not work correctly */ +#elif BOOST_ATOMIC_ALLOW_GCC_CAS && defined(__GNUC__) /* currently may not work correctly */ - #include #include #else