Use atomic read for an atomic variable
authorRobin Gareus <robin@gareus.org>
Tue, 4 Dec 2018 21:12:43 +0000 (22:12 +0100)
committerRobin Gareus <robin@gareus.org>
Tue, 4 Dec 2018 21:12:43 +0000 (22:12 +0100)
This probably no real world effect since there is a mutex in the
loop that acts as a memory barrier.

libs/ardour/audioengine.cc

index 510788180e7cfa01379f3f8c19e44468d986615f..e568603020ac74238628c761b7063d4c614168a6 100644 (file)
@@ -578,7 +578,7 @@ AudioEngine::do_devicelist_update()
 
        while (!_stop_hw_devicelist_processing) {
 
-               if (_hw_devicelist_update_count) {
+               if (g_atomic_int_get (&_hw_devicelist_update_count)) {
 
                        _devicelist_update_lock.unlock();