diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-12-03 08:44:49 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-12-03 11:05:18 +0200 |
commit | 57444a3b3086e96272cf10c3749c5ddb5f990492 (patch) | |
tree | 65e5616d80af04e1cc37d8d8d6db43142c3756e7 /tpool/aio_linux.cc | |
parent | cd92c6c83dd92cee2ccccd107988da032b2026f8 (diff) | |
download | mariadb-git-57444a3b3086e96272cf10c3749c5ddb5f990492.tar.gz |
MDEV-16264: Minor cleanup
aio_linux::m_max_io_count: Unused data member; remove.
aiocb::m_ret_len: Declare as the more compatible type size_t.
Unfortunately, ssize_t is not available on Microsoft Visual Studio.
Diffstat (limited to 'tpool/aio_linux.cc')
-rw-r--r-- | tpool/aio_linux.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tpool/aio_linux.cc b/tpool/aio_linux.cc index 0a4820a2412..24bc04c75ba 100644 --- a/tpool/aio_linux.cc +++ b/tpool/aio_linux.cc @@ -39,7 +39,6 @@ namespace tpool class aio_linux : public aio { - int m_max_io_count; thread_pool* m_pool; io_context_t m_io_ctx; bool m_in_shutdown; @@ -62,7 +61,7 @@ class aio_linux : public aio long long res = event.res; if (res < 0) { - iocb->m_err = -res; + iocb->m_err = static_cast<int>(-res); iocb->m_ret_len = 0; } else @@ -93,8 +92,8 @@ class aio_linux : public aio } public: - aio_linux(io_context_t ctx, thread_pool* pool, size_t max_count) - : m_max_io_count(max_count), m_pool(pool), m_io_ctx(ctx), + aio_linux(io_context_t ctx, thread_pool* pool) + : m_pool(pool), m_io_ctx(ctx), m_in_shutdown(), m_getevent_thread(getevent_thread_routine, this) { } @@ -146,7 +145,7 @@ aio* create_linux_aio(thread_pool* pool, int max_io) fprintf(stderr, "io_setup(%d) returned %d\n", max_io, ret); return nullptr; } - return new aio_linux(ctx, pool, max_io); + return new aio_linux(ctx, pool); } #else aio* create_linux_aio(thread_pool* pool, int max_aio) |