mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 07:45:00 +01:00
switch from glib atomic to std::atomic (libs edition)
This commit is contained in:
parent
d7922738f0
commit
4ba4cd69ff
77 changed files with 630 additions and 603 deletions
|
|
@ -618,7 +618,7 @@ PulseAudioBackend::_start (bool /*for_latency_measurement*/)
|
|||
engine.reconnect_ports ();
|
||||
|
||||
_run = true;
|
||||
g_atomic_int_set (&_port_change_flag, 0);
|
||||
_port_change_flag.store (0);
|
||||
|
||||
if (pbd_realtime_pthread_create (PBD_SCHED_FIFO, PBD_RT_PRI_MAIN, PBD_RT_STACKSIZE_PROC,
|
||||
&_main_thread, pthread_process, this)) {
|
||||
|
|
@ -1091,7 +1091,8 @@ PulseAudioBackend::main_process_thread ()
|
|||
bool connections_changed = false;
|
||||
bool ports_changed = false;
|
||||
if (!pthread_mutex_trylock (&_port_callback_mutex)) {
|
||||
if (g_atomic_int_compare_and_exchange (&_port_change_flag, 1, 0)) {
|
||||
int canderef (1);
|
||||
if (_port_change_flag.compare_exchange_strong (canderef, 0)) {
|
||||
ports_changed = true;
|
||||
}
|
||||
if (!_port_connection_queue.empty ()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue