diff --git a/include/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp b/include/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp index f2c77f0..8cd7179 100644 --- a/include/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp +++ b/include/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp @@ -36,7 +36,7 @@ public: bool try_lock() { - return __atomic_load_n( &v_, __ATOMIC_RELAXED ) == 0 && __atomic_test_and_set( &v_, __ATOMIC_ACQUIRE ) == 0; + return __atomic_test_and_set( &v_, __ATOMIC_ACQUIRE ) == 0; } void lock()