This documentation is archived and is not being maintained.


Microsoft Specific

_InterlockedExchangeAdd provides compiler intrinsic support for the Win32 Platform SDK InterlockedExchangeAdd function.

Note that the intrinsic form of this function has a leading underscore in the name. Also note that to generate the intrinsic expansion, you need to use /Oi. /Oi is implied with /O2.

To declare one of the interlocked functions for use as an intrinsic, the function must be declared with the leading underscore and the new function must appear in a #pragma intrinsic statement. For convenience, the intrinsic versions of the functions may be #define'd to appear in the source code without the leading underscore.

For a sample of how to use _InterlockedExchangeAdd, see _InterlockedDecrement.

END Microsoft Specific

See Also

Compiler Intrinsics | C++ Keywords