InterlockedIncrementAcquire routine

The InterlockedIncrementAcquire routine uses acquire semantics to increment a caller-supplied variable.

Syntax

LONG InterlockedIncrementAcquire(
  _Inout_ LONG volatile *Addend
);

Parameters

  • Addend [in, out]
    A pointer to the variable to increment.

Return value

InterlockedIncrementAcquire returns the incremented value.

Remarks

The InterlockedIncrementAcquire routine performs the same operation as InterlockedIncrement, except that the former guarantees only acquire semantics whereas the latter guarantees both acquire and release semantics. For more information about acquire and release semantics, see Acquire and Release Semantics.

On processors that do not support acquire-semantics operations, InterlockedIncrementAcquire is identical to InterlockedIncrement. On processors such as Intel Itanium-based processors, which do support these operations, InterlockedIncrementAcquire runs faster.

Interlocked operations cannot be used on non-cached memory.

Requirements

Target platform

Desktop

Version

Available only on Windows Server 2003 and later versions of the Windows operating system.

Header

Wdm.h (include Wdm.h, Ntddk.h, or Ntifs.h)

IRQL

Any level

See also

InterlockedIncrement

InterlockedIncrementRelease

 

 

Send comments about this topic to Microsoft