forked from boostorg/unordered
tried relaxing atomic operations
This commit is contained in:
@ -144,10 +144,10 @@ private:
|
|||||||
template<typename Integral>
|
template<typename Integral>
|
||||||
struct atomic_integral
|
struct atomic_integral
|
||||||
{
|
{
|
||||||
operator Integral()const{return n.load(std::memory_order_acquire);}
|
operator Integral()const{return n.load(std::memory_order_relaxed);}
|
||||||
void operator=(Integral m){n.store(m,std::memory_order_release);}
|
void operator=(Integral m){n.store(m,std::memory_order_relaxed);}
|
||||||
void operator|=(Integral m){n.fetch_or(m,std::memory_order_acq_rel);}
|
void operator|=(Integral m){n.fetch_or(m,std::memory_order_relaxed);}
|
||||||
void operator&=(Integral m){n.fetch_and(m,std::memory_order_acq_rel);}
|
void operator&=(Integral m){n.fetch_and(m,std::memory_order_relaxed);}
|
||||||
|
|
||||||
std::atomic<Integral> n;
|
std::atomic<Integral> n;
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user