Commit 4ef481f5 authored by Sergey Vojtovich's avatar Sergey Vojtovich

MDEV-17441 - InnoDB transition to C++11 atomics

os_aio_validate_count transition to Atomic_counter.
parent dbd40edf
...@@ -1084,15 +1084,8 @@ os_aio_validate_skip() ...@@ -1084,15 +1084,8 @@ os_aio_validate_skip()
/** Try os_aio_validate() every this many times */ /** Try os_aio_validate() every this many times */
# define OS_AIO_VALIDATE_SKIP 13 # define OS_AIO_VALIDATE_SKIP 13
static int os_aio_validate_count; static Atomic_counter<uint32_t> os_aio_validate_count;
return (os_aio_validate_count++ % OS_AIO_VALIDATE_SKIP) || os_aio_validate();
if (my_atomic_add32_explicit(&os_aio_validate_count, -1,
MY_MEMORY_ORDER_RELAXED)
% OS_AIO_VALIDATE_SKIP) {
return true;
}
return(os_aio_validate());
} }
#endif /* UNIV_DEBUG */ #endif /* UNIV_DEBUG */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment