Skip to content
Commit d705f740 authored by Evgeniy Paltsev's avatar Evgeniy Paltsev Committed by Fabio Baltieri
Browse files

samples/subsys/zbus/benchmark: fix counter synchronization issue



Current implementation has obvious synchronization issue with
global counter variable which is updated (RMW) in multiple threads
without any locking.

Replace regular variable by atomic type. As the maximum possible
value is much less than INT32_MAX it's OK to replace the original
uint64_t by (32-bit) atomic_t.

Signed-off-by: default avatarEugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: default avatarEvgeniy Paltsev <PaltsevEvgeniy@gmail.com>
parent b43dfa27
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment