summaryrefslogtreecommitdiff
path: root/sql/sql_handler.h
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2018-05-15 14:39:50 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2018-05-15 23:01:18 +0300
commitcd15e764a8a4f3e799f1efaede413c95e3233df6 (patch)
tree825f8258f23b3140534f0d3cf40c64190da3993f /sql/sql_handler.h
parent442a6e6b257e335f70730b0e18394c2f638f2962 (diff)
downloadmariadb-git-cd15e764a8a4f3e799f1efaede413c95e3233df6.tar.gz
MDEV-16159 Use atomic memory access for purge_sys
Thanks to Sergey Vojtovich for feedback and many ideas. purge_state_t: Remove. The states are replaced with purge_sys_t::enabled() and purge_sys_t::paused() as follows: PURGE_STATE_INIT, PURGE_STATE_EXIT, PURGE_STATE_DISABLED: !enabled(). PURGE_STATE_RUN, PURGE_STATE_STOP: paused() distinguishes these. purge_sys_t::m_paused: Renamed from purge_sys_t::n_stop. Protected by atomic memory access only, not purge_sys_t::latch. purge_sys_t::m_enabled: An atomically updated Boolean that replaces purge_sys_t::state. purge_sys_t::running: Remove, because it duplicates srv_sys.n_threads_active[SRV_PURGE]. purge_sys_t::running(): Accessor for srv_sys.n_threads_active[SRV_PURGE]. purge_sys_t::stop(): Renamed from trx_purge_stop(). purge_sys_t::resume(): Renamed from trx_purge_run(). Do not acquire latch; solely rely on atomics. purge_sys_t::is_initialised(), purge_sys_t::m_initialised: Remove. purge_sys_t::create(), purge_sys_t::close(): Instead of invoking is_initialised(), check whether event is NULL. purge_sys_t::event: Move before latch, so that fields that are protected by latch can reside on the same cache line with latch. srv_start_wait_for_purge_to_start(): Merge to the only caller srv_start().
Diffstat (limited to 'sql/sql_handler.h')
0 files changed, 0 insertions, 0 deletions