Relax Average value access memory ordering

As there are no requirements with regards to the visibility of writes to
the Average, the access can be relaxed.
This commit is contained in:
Markus Mäkelä
2018-09-20 09:54:34 +03:00
parent aa649a2754
commit 6d82de811f

View File

@ -210,7 +210,7 @@ public:
*/
uint8_t value() const
{
return mxb::atomic::load(&m_value);
return mxb::atomic::load(&m_value, mxb::atomic::RELAXED);
}
protected:
@ -220,7 +220,7 @@ protected:
protected:
void set_value(uint32_t value)
{
mxb::atomic::store(&m_value, value);
mxb::atomic::store(&m_value, value, mxb::atomic::RELAXED);
}
};