Increase barrier strength on ABA.

This commit is contained in:
Matthew Parkinson
2021-12-17 12:41:27 +00:00
committed by Matthew Parkinson
parent 16875382c4
commit 927575dc86

View File

@@ -112,7 +112,7 @@ namespace snmalloc
std::atomic<Linked>& addr = parent->linked;
auto result = addr.compare_exchange_weak(
old, xchg, std::memory_order_relaxed, std::memory_order_relaxed);
old, xchg, std::memory_order_acq_rel, std::memory_order_relaxed);
# endif
return result;
}