mirror of
https://github.com/boostorg/container.git
synced 2025-08-02 05:54:28 +02:00
Use <boost/detail/interlocked.hpp> for interlocked operations
This commit is contained in:
@@ -74,19 +74,7 @@
|
|||||||
//...
|
//...
|
||||||
#elif BOOST_MUTEX_HELPER == BOOST_MUTEX_HELPER_SPINLOCKS
|
#elif BOOST_MUTEX_HELPER == BOOST_MUTEX_HELPER_SPINLOCKS
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
#ifndef _M_AMD64
|
#include <boost/detail/interlocked.hpp>
|
||||||
/* These are already defined on AMD64 builds */
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif /* __cplusplus */
|
|
||||||
long __cdecl _InterlockedCompareExchange(long volatile *Dest, long Exchange, long Comp);
|
|
||||||
long __cdecl _InterlockedExchange(long volatile *Target, long Value);
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif /* __cplusplus */
|
|
||||||
#endif /* _M_AMD64 */
|
|
||||||
#pragma intrinsic (_InterlockedCompareExchange)
|
|
||||||
#pragma intrinsic (_InterlockedExchange)
|
|
||||||
#define interlockedcompareexchange _InterlockedCompareExchange
|
#define interlockedcompareexchange _InterlockedCompareExchange
|
||||||
#define interlockedexchange _InterlockedExchange
|
#define interlockedexchange _InterlockedExchange
|
||||||
#elif defined(WIN32) && defined(__GNUC__)
|
#elif defined(WIN32) && defined(__GNUC__)
|
||||||
|
Reference in New Issue
Block a user