The OpenD Programming Language

atomic_compare_exchange_strong_explicit_impl

pragma(inline, true) @trusted
bool
atomic_compare_exchange_strong_explicit_impl
(
A
C
)
(
shared(A)* obj
,,,
memory_order succ
,
memory_order fail
)

Examples

shared(int) obj = 3;
int expected = 3;
assert(atomic_compare_exchange_strong_explicit_impl(&obj, &expected, 2, memory_order.memory_order_seq_cst, memory_order.memory_order_seq_cst));

Meta