The OpenD Programming Language

atomic_init

Initializes an atomic variable, the destination should not have any expression associated with it prior to this call.

We use an out parameter instead of a pointer for destination in an attempt to communicate to the compiler that it initializers.

pragma(inline, true) @trusted
void
atomic_init
(
A
C
)
(
out shared(A) obj
,)

Examples

shared int val;
atomic_init(val, 2);

Meta