atomicIncrement

Supported msync values: msync.raw, msync.ssb, msync.acq, msync.rel, msync.seq

  1. T atomicIncrement(T val)
    template atomicIncrement(msync ms, T)
    version(TangoDoc)
    deprecated
    T
    atomicIncrement
    (
    ref T val
    )
  2. template atomicIncrement(msync ms = msync.seq, T)
  3. template atomicIncrement(msync ms = msync.seq, T)
  4. template atomicIncrement(msync ms = msync.seq, T)

Members

Functions

atomicIncrement
deprecated T atomicIncrement(T val)

This operation is only legal for built-in value and pointer types, and is equivalent to an atomic "val = val + 1" operation. This function exists to facilitate use of the optimized increment instructions provided by some architecures. If no such instruction exists on the target platform then the behavior will perform the operation using more traditional means. This operation is both lock-free and atomic.

Meta