What's the difference between InterlockedCompareExchange Release() and Acquire()?
What's the difference between InterlockedCompareExchangeRelease() and InterlockedCompareExchangeAcquire() ? When I try to learn the synchronization functions with WIN32 API, I find there are two functions named differently but seems to do the same thing: LONG __cdecl InterlockedCompareExchangeRelease( __inout LONG volatile *Destination, __in LONG Exchange, __in LONG Comparand ); and LONG __cdecl InterlockedCompareExchangeAcquire( __inout LONG volatile *Destination, __in LONG Exchange, __in LONG Comparand ); I check the MSDN, it says those functions are: Performs an atomic compare-and-exchange