gcc-11 compat, volatile atomic variables (2/2)

GUI part of previous commit.
This commit is contained in:
Robin Gareus 2021-03-19 06:20:21 +01:00
parent cc7b8b1bc5
commit 8b4edaa950
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
5 changed files with 16 additions and 11 deletions

View file

@ -22,6 +22,7 @@
#include "pbd/timer.h"
#include "pbd/debug.h"
#include "pbd/compose.h"
#include "pbd/g_atomic_compat.h"
#include "debug.h"
@ -87,8 +88,8 @@ public:
, rapid(100)
, super_rapid(40)
, fps(40)
, _suspend_counter(0)
{
g_atomic_int_set (&_suspend_counter, 0);
#ifndef NDEBUG
second.connect (sigc::mem_fun (*this, &UITimers::on_second_timer));
#endif
@ -100,7 +101,7 @@ public:
StandardTimer super_rapid;
StandardTimer fps;
gint _suspend_counter;
GATOMIC_QUAL gint _suspend_counter;
#ifndef NDEBUG
std::vector<uint64_t> rapid_eps_count;
@ -212,7 +213,7 @@ fps_connect(const sigc::slot<void>& slot)
TimerSuspender::TimerSuspender ()
{
if (g_atomic_int_add(&get_timers()._suspend_counter, 1) == 0) {
if (g_atomic_int_add (&get_timers()._suspend_counter, 1) == 0) {
get_timers().rapid.suspend();
get_timers().super_rapid.suspend();
get_timers().fps.suspend();