2
0
mirror of https://github.com/boostorg/thread.git synced 2026-02-13 00:42:09 +00:00

Added #ifdef _WIN64 around a direct call to InterlockedCompareExchange rather than the existing call through ice_wrapper. The

platform SDK library for Win64 doesn't include a library version of InterlockedCompareExchange which the ice_wrapper code requires.


[SVN r35340]
This commit is contained in:
Anthony Williams
2006-09-26 16:31:41 +00:00
parent 1cb08ff60c
commit c30b65a0ea

View File

@@ -113,7 +113,11 @@ inline LONG ice_wrapper(LPVOID (__stdcall *ice)(LPVOID*, LPVOID, LPVOID),
// according to the above function type wrappers.
inline LONG compare_exchange(volatile LPLONG dest, LONG exch, LONG cmp)
{
#ifdef _WIN64
return InterlockedCompareExchange(dest, exch, cmp);
#else
return ice_wrapper(&InterlockedCompareExchange, dest, exch, cmp);
#endif
}
}
#endif