mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-16 03:36:32 +01:00
gcc-11 compat, volatile atomic variables (1/2)
"While 'atomic' has a volatile qualifier, this is a historical artifact and the pointer passed to it should not be volatile." Furthermore "It is very important that all accesses to a particular integer or pointer be performed using only this API" (from https://developer.gnome.org/glib/2.68/glib-Atomic-Operations.html) Hence initialization of atomic variables is changed to also use this API, instead of directly initializing the value. This also fixes a few cases where atomic variables were accessed directly. see also libs/pbd/pbd/g_atomic_compat.h
This commit is contained in:
parent
bf64852fc2
commit
cc7b8b1bc5
61 changed files with 368 additions and 272 deletions
|
|
@ -254,9 +254,9 @@ WaveViewCache::set_image_cache_threshold (uint64_t sz)
|
|||
|
||||
/*-------------------------------------------------*/
|
||||
|
||||
WaveViewDrawRequest::WaveViewDrawRequest () : stop (0)
|
||||
WaveViewDrawRequest::WaveViewDrawRequest ()
|
||||
{
|
||||
|
||||
g_atomic_int_set (&_stop, 0);
|
||||
}
|
||||
|
||||
WaveViewDrawRequest::~WaveViewDrawRequest ()
|
||||
|
|
@ -407,8 +407,8 @@ WaveViewThreads::stop_threads ()
|
|||
|
||||
WaveViewDrawingThread::WaveViewDrawingThread ()
|
||||
: _thread(0)
|
||||
, _quit(0)
|
||||
{
|
||||
g_atomic_int_set (&_quit, 0);
|
||||
start ();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue