MXS-1632: Take mxb::atomic::add into use

The function now mostly replaces the use of atomic_add_ functions declared
in atomic.h.
This commit is contained in:
Markus Mäkelä
2018-09-17 13:32:49 +03:00
parent 4d792c3410
commit 2e069fa892
20 changed files with 104 additions and 86 deletions

View File

@ -289,10 +289,11 @@ private:
{
if (session_trx_is_ending(m_client->session))
{
atomic_add_uint64(m_qc.is_trx_still_read_only()
? &m_router->stats().n_ro_trx
: &m_router->stats().n_rw_trx,
1);
mxb::atomic::add(m_qc.is_trx_still_read_only()
? &m_router->stats().n_ro_trx
: &m_router->stats().n_rw_trx,
1,
mxb::atomic::RELAXED);
}
}
};