InterlockedExchangeSubtract
InterlockedExchangeSubtract performs an atomic subtraction of two values.
Syntax
unsigned long InterlockedExchangeSubtract(
[in, out] unsigned long volatile *Addend,
[in] unsigned long Value
);
Parameters
[in, out] Addend
A pointer to a variable. The value of this variable is replaced with the result of the operation.
[in] 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 properly.
Requirements
| Minimum supported version | Header |
|---|---|
|
windows.h |
See Also: