Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

InterlockedExchangeSubtract function

Performs an atomic subtraction of two values.

Syntax


unsigned long WINAPI InterlockedExchangeSubtract(
  _Inout_  unsigned long volatile *Addend,
  _In_     unsigned long Value
);

Parameters

Addend [in, out]

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

Value [in]

The value to be subtracted from the variable pointed to by the Addend parameter.

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

Requirements

Minimum supported client

Windows 7 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 R2 [desktop apps | Windows Store apps]

Header

WinBase.h (include Windows.h)

See also

Interlocked Variable Access
InterlockedCompareExchange
InterlockedExchange
InterlockedExchangePointer
InterlockedExchangeAdd
Synchronization Functions

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.