mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 02:51:44 +01:00
MDEV-17441 - InnoDB transition to C++11 atomics
os_aio_validate_count transition to Atomic_counter.
This commit is contained in:
parent
dbd40edfe6
commit
4ef481f5bc
1 changed files with 2 additions and 9 deletions
|
@ -1084,15 +1084,8 @@ os_aio_validate_skip()
|
|||
/** Try os_aio_validate() every this many times */
|
||||
# define OS_AIO_VALIDATE_SKIP 13
|
||||
|
||||
static int os_aio_validate_count;
|
||||
|
||||
if (my_atomic_add32_explicit(&os_aio_validate_count, -1,
|
||||
MY_MEMORY_ORDER_RELAXED)
|
||||
% OS_AIO_VALIDATE_SKIP) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return(os_aio_validate());
|
||||
static Atomic_counter<uint32_t> os_aio_validate_count;
|
||||
return (os_aio_validate_count++ % OS_AIO_VALIDATE_SKIP) || os_aio_validate();
|
||||
}
|
||||
#endif /* UNIV_DEBUG */
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue