Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 04906bdc authored by Chris Manton's avatar Chris Manton
Browse files

Use atomic common::benchmark::thread_performance_benchmark::g_counter

Bug: 341998407
Test: m .
Flag: EXEMPT, Mechanical Refactor

Change-Id: I6c3edaead312d25ce1e7dc941517dd02bc069594
parent 136891d1
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@
#include <benchmark/benchmark.h>
#include <bluetooth/log.h>

#include <atomic>
#include <future>
#include <memory>
#include <thread>
@@ -34,7 +35,7 @@ using bluetooth::common::MessageLoopThread;

#define NUM_MESSAGES_TO_SEND 100000

volatile static int g_counter = 0;
static std::atomic<int> g_counter = 0;
static std::unique_ptr<std::promise<void>> g_counter_promise = nullptr;

void pthread_callback_batch(void* context) {