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:Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by:
Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Loading
Please sign in to comment