atomicDecrement

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

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

Members

Functions

atomicDecrement
deprecated T atomicDecrement(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 decrement 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