Skip to content

Commit

Permalink
use atomics to fix tsan detected race condition in vsyncthread PLL
Browse files Browse the repository at this point in the history
  • Loading branch information
m0dB authored and m0dB committed Nov 10, 2024
1 parent 94f6eb9 commit 8b9b1bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/waveform/vsyncthread.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ class VSyncThread : public QThread {
// phase locked loop
std::mutex m_pllMutex;
PerformanceTimer m_pllTimer;
int m_pllInitCnt;
bool m_pllPendingUpdate;
std::atomic<int> m_pllInitCnt;
std::atomic<bool> m_pllPendingUpdate;
double m_pllInitSum;
double m_pllInitAvg;
double m_pllPhaseOut;
Expand Down

0 comments on commit 8b9b1bf

Please sign in to comment.