The Open
D
Programming Language
Learn
Language
Library
Contribute
Blog
cas.cas
core
atomic
cas
Compare-and-exchange for non-
shared
types
bool
cas
(T* here, V1 ifThis, V2 writeThis)
bool
cas
(shared(T)* here, V1 ifThis, V2 writeThis)
bool
cas
(shared(T)* here, shared(V1) ifThis, shared(V2) writeThis)
bool
cas
(T* here, T* ifThis, V writeThis)
template
cas
(MemoryOrder succ = MemoryOrder.seq, MemoryOrder fail = MemoryOrder.seq)
pragma(
inline
, true) pure nothrow @
nogc
@
trusted
bool
cas
(
T
V
)
(
T
*
here
,
T
*
ifThis
,
V
writeThis
)
if
(
!
is
(
T
== shared) &&
!
is
(
V
== shared)
)
bool
cas
(shared(T)* here, V1* ifThis, V2 writeThis)
bool
cas
(shared(T)* here, shared(T)* ifThis, shared(V) writeThis)
Meta
Source
See Implementation
core
atomic
cas
functions
cas
Compare-and-exchange for non-shared types