Stores 'writeThis' to the memory referenced by 'here' if the value
referenced by 'here' is equal to 'ifThis'. This operation is both
lock-free and atomic.
Params:
here
The address of the destination variable.
writeThis
The value to store.
ifThis
The comparison value.
Returns: true if the store occurred, false if not.
nothrow HeadUnshared!(T) atomicLoad(MemoryOrder ms = MemoryOrder.seq, T)(ref const shared T val);
Loads 'val' from memory and returns it. The memory barrier specified
by 'ms' is applied to the operation, which is fully sequenced by
default.
Params:
val
The target variable.
Returns:
The value of 'val'.
nothrow void atomicStore(MemoryOrder ms = MemoryOrder.seq, T, V1)(ref shared T val, V1 newval);
Writes 'newval' into 'val'. The memory barrier specified by 'ms' is
applied to the operation, which is fully sequenced by default.
Params:
val
The target variable.
newval
The value to store.
enum MemoryOrder;
Specifies the memory ordering semantics of an atomic operation.
raw
Not sequenced.
acq
Hoist-load + hoist-store barrier.
rel
Sink-load + sink-store barrier.
seq
Fully sequenced (acquire + release).
deprecated alias MemoryOrder msync;
Deprecated. Please use MemoryOrder instead.
nothrow void atomicFence();
Inserts a full load/store memory fence (on platforms that need it). This ensures
that all loads and stores before a call to this function are executed before any
loads and stores after the call.
Page generated by Ddoc. Copyright Sean Kelly 2005 - 2010.