The OpenD Programming Language

atomic_compare_exchange_weak_impl

pragma(inline, true) @trusted
bool
atomic_compare_exchange_weak_impl
(
A
C
)
(
shared(A)* obj
,,)

Examples

shared(int) obj = 3;
int expected = 3;
static assert(__traits(compiles, {atomic_compare_exchange_weak_impl(&obj, &expected, 2);}));

Meta