fixed memory ordering in atomic_integral

This commit is contained in:
joaquintides
2023-03-18 09:33:13 +01:00
committed by Christian Mazakas
parent 0d1fdae84c
commit fb4437219f

View File

@@ -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<Integral> n;
};