InterlockedExchangeSubtract

InterlockedExchangeSubtract performs an atomic subtraction of two values.

Syntax

Copy
unsigned long InterlockedExchangeSubtract(
        unsigned long volatile *Addend,
        unsigned long          Value
);

Parameters

Addend

A pointer to a variable. The value of this variable is replaced with the result of the operation.

Value

The value to be exchanged with the value pointed to by Target.

Return Value

The function returns the initial value of the Addend parameter.

Remarks

This function generates a full memory barrier (or fence) to ensure that memory operations are completed in the proper sequence.

Requirements

Minimum supported version Header Library

eRTOS 1.0 SDK

windows.h

rtkrnl.lib

See Also: