Revert "Use a relaxed load before XCHG to not lock cache line on contention (AMD spinlock recommendation per <https://probablydance.com/2019/12/30/measuring-mutexes-spinlocks-and-how-bad-the-linux-scheduler-really-is/>)"

This reverts commit 8afe162910.
This commit is contained in:
Peter Dimov
2020-06-10 18:18:35 +03:00
parent 72ca834ae8
commit d35cf29b99

View File

@ -66,11 +66,6 @@ public:
bool try_lock()
{
if( *const_cast< long const volatile* >( &v_ ) != 0 )
{
return false;
}
long r = BOOST_SP_INTERLOCKED_EXCHANGE( &v_, 1 );
BOOST_COMPILER_FENCE