mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
gcc-11 compat, volatile atomic variables (2/2)
GUI part of previous commit.
This commit is contained in:
parent
cc7b8b1bc5
commit
8b4edaa950
5 changed files with 16 additions and 11 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue