From b9b94f8cf706bc0a75ddd1e763046c4bccc76662 Mon Sep 17 00:00:00 2001 From: Ryan Pavlik Date: Wed, 5 May 2021 14:38:23 -0500 Subject: [PATCH] Disambiguate the type of atomic_fetch_xxx --- src/percetto.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/percetto.cc b/src/percetto.cc index 9ac3979..d0c6e1d 100644 --- a/src/percetto.cc +++ b/src/percetto.cc @@ -288,8 +288,9 @@ class PercettoDataSource std::end(s_percetto.categories[i]->ext->strings), std::begin(tags)); if (IsCategoryEnabled(s_percetto.categories[i]->ext->name, tags, config)) { - std::atomic_fetch_or(&s_percetto.categories[i]->sessions, - 1ul << args.internal_instance_index); + std::atomic_fetch_or( + &s_percetto.categories[i]->sessions, + 1ul << args.internal_instance_index); } } UpdateGroupCategories(); @@ -300,7 +301,8 @@ class PercettoDataSource void OnStop(const DataSourceBase::StopArgs& args) override { int count = s_percetto.category_count.load(std::memory_order_acquire); for (int i = 0; i < count; i++) { - std::atomic_fetch_and(&s_percetto.categories[i]->sessions, + std::atomic_fetch_and( + &s_percetto.categories[i]->sessions, ~(1ul << args.internal_instance_index)); } UpdateGroupCategories();