diff options
Diffstat (limited to 'src/btop_tools.hpp')
-rw-r--r-- | src/btop_tools.hpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/btop_tools.hpp b/src/btop_tools.hpp index 7bb0445..97e010a 100644 --- a/src/btop_tools.hpp +++ b/src/btop_tools.hpp @@ -269,15 +269,9 @@ namespace Tools { string hostname(); string username(); -// #if __GNUC__ < 11 inline void atomic_wait(const atomic<bool>& atom, const bool old=true) noexcept { while (atom.load() == old) sleep_ms(1); } - inline void atomic_notify(const atomic<bool>& atom) noexcept { (void)atom; } -// #else -// inline void atomic_wait(const atomic<bool>& atom, const bool old=true) noexcept { if (atom == old) atom.wait(old); } -// inline void atomic_notify(const atomic<bool>& atom) noexcept { atom.notify_all(); } -// #endif - //* Waits for atomic<bool> to be false and sets it to true on construct, sets to false and notifies on destruct + //* Waits for atomic<bool> to be false and sets it to true on construct, sets to false on destruct class atomic_lock { atomic<bool>& atom; bool not_true = false; |