diff options
author | Sergey Vojtovich <svoj@mariadb.org> | 2018-12-28 23:51:15 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2018-12-29 14:09:32 +0400 |
commit | e2d96e8a16704c02248c9039028f9de17c887846 (patch) | |
tree | cc1251bf8c903dffa8b1fb7b821659d495e03356 | |
parent | 66bca0dfa9909ff4078a9973d35c2c80e1927d07 (diff) | |
download | mariadb-git-e2d96e8a16704c02248c9039028f9de17c887846.tar.gz |
MDEV-17441 - InnoDB transition to C++11 atomics
buf_pool_t::n_pend_unzip transition to Atomic_counter.
-rw-r--r-- | storage/innobase/buf/buf0buf.cc | 4 | ||||
-rw-r--r-- | storage/innobase/include/buf0buf.h | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc index bc52f53e604..5da61183e80 100644 --- a/storage/innobase/buf/buf0buf.cc +++ b/storage/innobase/buf/buf0buf.cc @@ -5939,10 +5939,10 @@ buf_page_io_complete(buf_page_t* bpage, bool dblwr, bool evict) } if (bpage->zip.data && uncompressed) { - my_atomic_addlint(&buf_pool->n_pend_unzip, 1); + buf_pool->n_pend_unzip++; ibool ok = buf_zip_decompress((buf_block_t*) bpage, FALSE); - my_atomic_addlint(&buf_pool->n_pend_unzip, ulint(-1)); + buf_pool->n_pend_unzip--; if (!ok) { ib::info() << "Page " diff --git a/storage/innobase/include/buf0buf.h b/storage/innobase/include/buf0buf.h index 0f8bbea3527..d4157fbd040 100644 --- a/storage/innobase/include/buf0buf.h +++ b/storage/innobase/include/buf0buf.h @@ -2082,7 +2082,8 @@ struct buf_pool_t{ indexed by block->frame */ ulint n_pend_reads; /*!< number of pending read operations */ - ulint n_pend_unzip; /*!< number of pending decompressions */ + Atomic_counter<ulint> + n_pend_unzip; /*!< number of pending decompressions */ time_t last_printout_time; /*!< when buf_print_io was last time |