diff --git a/test/osal-unix.cc b/test/osal-unix.cc index 757c8583..a85ce32a 100644 --- a/test/osal-unix.cc +++ b/test/osal-unix.cc @@ -23,6 +23,8 @@ #include #include +#include + #ifndef MDBX_LOCKING #error "Opps, MDBX_LOCKING is undefined!" #endif @@ -307,14 +309,14 @@ bool actor_config::osal_deserialize(const char *str, const char *end, static pid_t overlord_pid; -static volatile sig_atomic_t sigusr1_head, sigusr2_head; +static std::atomic sigusr1_head, sigusr2_head; static void handler_SIGUSR(int signum) { switch (signum) { case SIGUSR1: - sigusr1_head += 1; + ++sigusr1_head; return; case SIGUSR2: - sigusr2_head += 1; + ++sigusr2_head; return; default: abort(); @@ -335,10 +337,10 @@ bool osal_progress_push(bool active) { static std::unordered_map childs; -static volatile sig_atomic_t sigalarm_head; +static std::atomic sigalarm_head; static void handler_SIGCHLD(int signum) { if (signum == SIGALRM) - sigalarm_head += 1; + ++sigalarm_head; } mdbx_pid_t osal_getpid(void) { return getpid(); }