1 #ifndef BOOST_DETAIL_ATOMIC_CAS64STRONG_HPP 2 #define BOOST_DETAIL_ATOMIC_CAS64STRONG_HPP 23 template<
typename T,
bool Sign>
35 value_type expected =
v_;
43 value_type v =
const_cast<const volatile value_type &
>(
v_);
45 }
while (!const_cast<base_atomic *>(
this)->compare_exchange_strong(v, v, order,
memory_order_relaxed));
60 value_type & expected,
70 value_type & expected,
77 bool success = platform_cmpxchg64_strong(expected, desired, &
v_);
160 value_type expected =
v_;
168 value_type v =
const_cast<const volatile value_type &
>(
v_);
170 }
while (!const_cast<base_atomic *>(
this)->compare_exchange_strong(v, v, order,
memory_order_relaxed));
185 value_type & expected,
195 value_type & expected,
202 bool success = platform_cmpxchg64_strong(expected, desired, &
v_);
244 template<
typename T,
bool Sign>
256 value_type expected =
v_;
264 value_type v =
const_cast<const volatile value_type &
>(
v_);
266 }
while (!const_cast<base_atomic *>(
this)->compare_exchange_strong(v, v, order,
memory_order_relaxed));
281 value_type & expected,
291 value_type & expected,
298 bool success = platform_cmpxchg64_strong(expected, desired, &
v_);
342 template<
typename T,
bool Sign>
350 memcpy(&
v_, &v,
sizeof(value_type));
358 memcpy(&expected, const_cast<storage_type *>(&
v_),
sizeof(value_type));
367 memcpy(&v, const_cast<storage_type *>(&
v_),
sizeof(value_type));
384 value_type & expected,
394 value_type & expected,
400 storage_type expected_s = 0, desired_s = 0;
401 memcpy(&expected_s, &expected,
sizeof(value_type));
402 memcpy(&desired_s, &desired,
sizeof(value_type));
405 bool success = platform_cmpxchg64_strong(expected_s, desired_s, &
v_);
411 memcpy(&expected, &expected_s,
sizeof(value_type));
value_type exchange(value_type v, memory_order order=memory_order_seq_cst) volatile
bool compare_exchange_strong(value_type &expected, value_type desired, memory_order, memory_order) volatile
value_type fetch_sub(difference_type v, memory_order order=memory_order_seq_cst) volatile
bool compare_exchange_strong(value_type &expected, value_type desired, memory_order success_order, memory_order failure_order) volatile
void store(value_type v, memory_order order=memory_order_seq_cst) volatile
bool compare_exchange_weak(value_type &expected, value_type desired, memory_order success_order, memory_order failure_order) volatile
base_atomic(value_type v)
bool compare_exchange_weak(value_type &expected, value_type desired, memory_order success_order, memory_order failure_order) volatile
value_type fetch_add(value_type v, memory_order order=memory_order_seq_cst) volatile
value_type fetch_and(value_type v, memory_order order=memory_order_seq_cst) volatile
void store(value_type v, memory_order order=memory_order_seq_cst) volatile
value_type fetch_add(difference_type v, memory_order order=memory_order_seq_cst) volatile
base_atomic(value_type v)
base_atomic(value_type v)
value_type fetch_sub(difference_type v, memory_order order=memory_order_seq_cst) volatile
bool is_lock_free(void) const volatile
value_type fetch_sub(value_type v, memory_order order=memory_order_seq_cst) volatile
value_type exchange(value_type v, memory_order order=memory_order_seq_cst) volatile
#define BOOST_ATOMIC_DECLARE_POINTER_OPERATORS
bool compare_exchange_strong(value_type &expected, value_type desired, memory_order success_order, memory_order failure_order) volatile
value_type fetch_xor(value_type v, memory_order order=memory_order_seq_cst) volatile
bool is_lock_free(void) const volatile
value_type exchange(value_type v, memory_order order=memory_order_seq_cst) volatile
value_type load(memory_order=memory_order_seq_cst) volatileconst
bool compare_exchange_weak(value_type &expected, value_type desired, memory_order success_order, memory_order failure_order) volatile
bool compare_exchange_strong(value_type &expected, value_type desired, memory_order success_order, memory_order failure_order) volatile
ptrdiff_t difference_type
static void platform_fence_after(memory_order order)
void store(value_type v, memory_order order=memory_order_seq_cst) volatile
#define BOOST_ATOMIC_DECLARE_BASE_OPERATORS
bool is_lock_free(void) const volatile
ptrdiff_t difference_type
value_type load(memory_order order=memory_order_seq_cst) const volatile
value_type fetch_add(difference_type v, memory_order order=memory_order_seq_cst) volatile
void store(value_type v, memory_order order=memory_order_seq_cst) volatile
value_type load(memory_order order=memory_order_seq_cst) const volatile
value_type exchange(value_type v, memory_order order=memory_order_seq_cst) volatile
bool compare_exchange_weak(value_type &expected, value_type desired, memory_order success_order, memory_order failure_order) volatile
bool is_lock_free(void) const volatile
bool compare_exchange_weak(value_type &expected, value_type desired, memory_order success_order, memory_order failure_order) volatile
value_type fetch_or(value_type v, memory_order order=memory_order_seq_cst) volatile
value_type load(memory_order order=memory_order_seq_cst) const volatile
value_type load(memory_order order=memory_order_seq_cst) const volatile
#define BOOST_ATOMIC_DECLARE_INTEGRAL_OPERATORS
static void platform_fence_before(memory_order order)
base_atomic(value_type v)
void operator=(const base_atomic &)
bool compare_exchange_strong(value_type &expected, value_type desired, memory_order success_order, memory_order failure_order) volatile