There are several variations on _InterlockedExchange that vary based on the data types they involve and whether processor-specific acquire or release semantics is used.
While the _InterlockedExchange function operates on 32-bit integer values, _InterlockedExchange64 operates on 64-bit integer values.
The _InterlockedExchange_acq and _InterlockedExchange64_acq intrinsic functions are the same as the corresponding functions without the _acq suffix except that the operation is performed with acquire semantics, which is useful when entering a critical section.
There is no version of this function that uses release semantics.
In Visual C++ 2005, these functions behave as read-write memory barriers. For more information, see _ReadWriteBarrier.
These routines are only available as intrinsics.