From fb4437219fb9f5b0e8463e35986cdb001ab898de Mon Sep 17 00:00:00 2001 From: joaquintides Date: Sat, 18 Mar 2023 09:33:13 +0100 Subject: [PATCH] fixed memory ordering in atomic_integral --- include/boost/unordered/detail/foa/concurrent_table.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/unordered/detail/foa/concurrent_table.hpp b/include/boost/unordered/detail/foa/concurrent_table.hpp index 066f49cf..cbd7611e 100644 --- a/include/boost/unordered/detail/foa/concurrent_table.hpp +++ b/include/boost/unordered/detail/foa/concurrent_table.hpp @@ -137,8 +137,8 @@ struct atomic_integral { operator Integral()const{return n.load(std::memory_order_acquire);} void operator=(Integral m){n.store(m,std::memory_order_release);} - void operator|=(Integral m){n.fetch_or(m,std::memory_order_release);} - void operator&=(Integral m){n.fetch_and(m,std::memory_order_release);} + void operator|=(Integral m){n.fetch_or(m,std::memory_order_acq_rel);} + void operator&=(Integral m){n.fetch_and(m,std::memory_order_acq_rel);} std::atomic n; };