Skip to content

Commit

Permalink
fix race condition in isHWTMAL1Supported
Browse files Browse the repository at this point in the history
Change-Id: Iea0760d1edc95d5ccd66ee69ab83314229e6f458
  • Loading branch information
rdementi committed Nov 10, 2023
1 parent 8032c63 commit 8656a39
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/cpucounters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3504,6 +3504,7 @@ PCM::ErrorCode PCM::program(const PCM::ProgramMode mode_, const void * parameter
lastProgrammedCustomCounters.clear();
lastProgrammedCustomCounters.resize(num_cores);
core_global_ctrl_value = 0ULL;
isHWTMAL1Supported(); // ínit value to prevent MT races

std::vector<std::future<void> > asyncCoreResults;
std::vector<PCM::ErrorCode> programmingStatuses(num_cores, PCM::Success);
Expand Down

0 comments on commit 8656a39

Please sign in to comment.