16-bit increment operation, performed atomically with respect to all devices that participate in the coherency architecture of the platform.
- macOS 10.0+
The 2-byte aligned address of the value to update atomically.
The value before the increment.
The OSIncrementAtomic16 function increments the value at the specified address by one and returns the original value.
This function guarantees atomicity only with main system memory. It is specifically unsuitable for use on noncacheable memory such as that in devices; this function cannot guarantee atomicity, for example, on memory mapped from a PCI device. Previous incarnations of this function incorporated a memory barrier on systems with weakly-ordered memory architectures, but current versions contain no barriers.