View source code Display the source code in core/atomic.d from which this page was generated on github. Improve this page Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone. Page wiki View or edit the community-maintained wiki page associated with this page.

Function core.atomic.atomicStore

Writes 'newval' into 'val'. The memory barrier specified by 'ms' is applied to the operation, which is fully sequenced by default.

Prototype

void atomicStore(core.atomic.MemoryOrder ms, T, V1)(
  T val,
  V1 newval
) pure nothrow @nogc
if (__traits(compiles, ()
{
val = newval;
}
));

Parameters

NameDescription
val The target variable.
newval The value to store.

Authors

Sean Kelly, Alex Rønne Petersen

License

Boost License 1.0

Comments