mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-15 19:16:40 +01:00
Prefer atomic dec_and_test (instead of atomic get+set)
This commit is contained in:
parent
2e2a4be3b2
commit
b95bb0bdac
1 changed files with 1 additions and 3 deletions
|
|
@ -71,7 +71,7 @@ PresentationInfo::unsuspend_change_signal ()
|
||||||
{
|
{
|
||||||
Glib::Threads::Mutex::Lock lm (static_signal_lock);
|
Glib::Threads::Mutex::Lock lm (static_signal_lock);
|
||||||
|
|
||||||
if (g_atomic_int_get (&_change_signal_suspended) == 1) {
|
if (g_atomic_int_dec_and_test (&_change_signal_suspended)) {
|
||||||
|
|
||||||
/* atomically grab currently pending flags */
|
/* atomically grab currently pending flags */
|
||||||
|
|
||||||
|
|
@ -92,8 +92,6 @@ PresentationInfo::unsuspend_change_signal ()
|
||||||
lm.acquire ();
|
lm.acquire ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
g_atomic_int_add (&_change_signal_suspended, -1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue