diff options
author | Max Kellermann <max@duempel.org> | 2013-02-27 20:35:44 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-02-27 20:35:44 +0100 |
commit | 19c67ab72457d68fa35bdad8b4c5ed5ecf04816e (patch) | |
tree | a1a7a72c1e25ffc586d48777e88a63f06835a714 /src/Idle.cxx | |
parent | a046b6e10538ec8d31d63701b8fa6309bf26fe16 (diff) | |
download | mpd-19c67ab72457d68fa35bdad8b4c5ed5ecf04816e.tar.gz mpd-19c67ab72457d68fa35bdad8b4c5ed5ecf04816e.tar.xz mpd-19c67ab72457d68fa35bdad8b4c5ed5ecf04816e.zip |
Idle, GlobalEvents: use std::atomic::exchange()
Less overhead than fetch_and() for what we do.
Diffstat (limited to 'src/Idle.cxx')
-rw-r--r-- | src/Idle.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Idle.cxx b/src/Idle.cxx index fefbd2fe9..840a5d4e5 100644 --- a/src/Idle.cxx +++ b/src/Idle.cxx @@ -61,7 +61,7 @@ idle_add(unsigned flags) unsigned idle_get(void) { - return idle_flags.fetch_and(0); + return idle_flags.exchange(0); } const char*const* |