From 3bf79b49fd765f6175829a676bb6ac50b72f6990 Mon Sep 17 00:00:00 2001 From: surtur Date: Sat, 22 Jan 2022 21:39:45 +0100 Subject: [PATCH] accumulator: make reg bool atomic --- accumulator.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/accumulator.cpp b/accumulator.cpp index 6a623bc..a85deb3 100644 --- a/accumulator.cpp +++ b/accumulator.cpp @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -54,7 +55,7 @@ auto Accumulator::_p_pools_equal( // check if given source id is an id of an already registered entropy source auto Accumulator::src_is_registered(const uint8_t& id) -> bool { - bool reg{false}; + std::atomic reg{false}; static uint8_t _src_id{}; if (std::any_of(this->entropy_sources.begin(),