InterlockedIncrement - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// miniport.h

LONG InterlockedIncrement(
  [in, out] LONG volatile *Addend
);

View the official Windows Driver Kit DDI reference
// wdm.h

LONG CDECL_NON_WVMPURE InterlockedIncrement(
  [in, out] LONG volatile *Addend
);

View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-miniport-interlockedincrement)

InterlockedIncrement function (miniport.h)

Description

The InterlockedIncrement routine increments a caller-supplied variable as an atomic operation.

Parameters

Addend [in, out]

A pointer to a variable of type LONG.

Return value

InterlockedIncrement returns the incremented value.

Remarks

InterlockedIncrement should be used instead of ExInterlockedIncrementLong because it is both more efficient and faster.

InterlockedIncrement is implemented inline by the compiler when appropriate and possible. It does not require a spin lock and can therefore be safely used on pageable data.

InterlockedIncrement is atomic only with respect to other InterlockedXxx calls.

Interlocked operations cannot be used on non-cached memory.

See also

ExInterlockedAddLargeInteger

ExInterlockedAddUlong

InterlockedDecrement

InterlockedExchange


Windows Driver Kit DDI reference (nf-wdm-interlockedincrement)

InterlockedIncrement function (wdm.h)

Description

The InterlockedIncrement routine increments a caller-supplied variable as an atomic operation.

Parameters

Addend [in, out]

A pointer to a variable of type LONG.

Return value

InterlockedIncrement returns the incremented value.

Remarks

InterlockedIncrement should be used instead of ExInterlockedIncrementLong because it is both more efficient and faster.

InterlockedIncrement is implemented inline by the compiler when appropriate and possible. It does not require a spin lock and can therefore be safely used on pageable data.

InterlockedIncrement is atomic only with respect to other InterlockedXxx calls.

Interlocked operations cannot be used on non-cached memory.

See also

ExInterlockedAddLargeInteger

ExInterlockedAddUlong

InterlockedDecrement

InterlockedExchange