This changes the memory order used in the spin wait code to match
that of libc++.
libstdc++-v3/ChangeLog:
* include/bits/atomic_wait.h (__waiter_base::_S_do_spin,
__waiter_base::_S_do_spin_v): Change memory order from relaxed
to acquire.
(cherry picked from commit
b25a7c05f120e46a60430dcefe529c72303b7022)
}
else
{
- __atomic_load(__addr, &__val, __ATOMIC_RELAXED);
+ __atomic_load(__addr, &__val, __ATOMIC_ACQUIRE);
}
return __atomic_spin(__pred, __spin);
}
__platform_wait_t& __val,
_Spin __spin = _Spin{ })
{
- __atomic_load(__addr, &__val, __ATOMIC_RELAXED);
+ __atomic_load(__addr, &__val, __ATOMIC_ACQUIRE);
return __atomic_spin(__pred, __spin);
}