InterlockedDecrement - NtDoc

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

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

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

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

View the official Windows Driver Kit DDI reference

NtDoc

No description available.

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

InterlockedDecrement function (miniport.h)

Description

The InterlockedDecrement routine decrements a caller-supplied variable of type LONG as an atomic operation.

Parameters

Addend [in, out]

A pointer to a variable to be decremented.

Return value

InterlockedDecrement returns the decremented value.

Remarks

InterlockedDecrement should be used instead of ExInterlockedDecrementLong because it is both more efficient and faster.

InterlockedDecrement 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.

InterlockedDecrement is atomic only with respect to other InterlockedXxx calls.

Interlocked operations cannot be used on non-cached memory.

See also

ExInterlockedAddLargeInteger

ExInterlockedAddUlong

InterlockedExchange

InterlockedIncrement


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

InterlockedDecrement function (wdm.h)

Description

The InterlockedDecrement routine decrements a caller-supplied variable of type LONG as an atomic operation.

Parameters

Addend [in, out]

A pointer to a variable to be decremented.

Return value

InterlockedDecrement returns the decremented value.

Remarks

InterlockedDecrement should be used instead of ExInterlockedDecrementLong because it is both more efficient and faster.

InterlockedDecrement 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.

InterlockedDecrement is atomic only with respect to other InterlockedXxx calls.

Interlocked operations cannot be used on non-cached memory.

See also

ExInterlockedAddLargeInteger

ExInterlockedAddUlong

InterlockedExchange

InterlockedIncrement