diff --git a/include/boost/detail/interlocked.hpp b/include/boost/detail/interlocked.hpp index 1802e34..916db81 100644 --- a/include/boost/detail/interlocked.hpp +++ b/include/boost/detail/interlocked.hpp @@ -33,6 +33,15 @@ #elif defined(_WIN32_WCE) +#if _WIN32_WCE >= 0x600 + +extern "C" long __cdecl _InterlockedIncrement( long volatile * ); +extern "C" long __cdecl _InterlockedDecrement( long volatile * ); +extern "C" long __cdecl _InterlockedCompareExchange( long volatile *, long, long ); +extern "C" long __cdecl _InterlockedExchange( long volatile *, long ); +extern "C" long __cdecl _InterlockedExchangeAdd( long volatile *, long ); + +#else // under Windows CE we still have old-style Interlocked* functions extern "C" long __cdecl InterlockedIncrement( long* ); @@ -41,6 +50,8 @@ extern "C" long __cdecl InterlockedCompareExchange( long*, long, long ); extern "C" long __cdecl InterlockedExchange( long*, long ); extern "C" long __cdecl InterlockedExchangeAdd( long*, long ); +#endif + # define BOOST_INTERLOCKED_INCREMENT InterlockedIncrement # define BOOST_INTERLOCKED_DECREMENT InterlockedDecrement # define BOOST_INTERLOCKED_COMPARE_EXCHANGE InterlockedCompareExchange