diff options
author | Tom <tomut@yahoo.com> | 2021-01-03 16:58:50 -0700 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-01-04 19:13:52 +0100 |
commit | 901ef3f1c87d15d2140be8a880250d09286e10a1 (patch) | |
tree | 2a8104d378a30cc5b23d61c13c65872c3ea0b6c2 /Kernel/TimerQueue.h | |
parent | fb84f0ec9c4d5e1a810dc05965ddbec7ff5d99ec (diff) | |
download | serenity-901ef3f1c87d15d2140be8a880250d09286e10a1.zip |
Kernel: Specify default memory order for some non-synchronizing Atomics
Diffstat (limited to 'Kernel/TimerQueue.h')
-rw-r--r-- | Kernel/TimerQueue.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Kernel/TimerQueue.h b/Kernel/TimerQueue.h index a70911e972..87f73af7f8 100644 --- a/Kernel/TimerQueue.h +++ b/Kernel/TimerQueue.h @@ -64,7 +64,7 @@ private: Function<void()> m_callback; Timer* m_next { nullptr }; Timer* m_prev { nullptr }; - Atomic<bool> m_queued { false }; + Atomic<bool, AK::MemoryOrder::memory_order_relaxed> m_queued { false }; bool operator<(const Timer& rhs) const { @@ -78,8 +78,8 @@ private: { return m_id == rhs.m_id; } - bool is_queued() const { return m_queued.load(AK::MemoryOrder::memory_order_relaxed); } - void set_queued(bool queued) { m_queued.store(queued, AK::MemoryOrder::memory_order_relaxed); } + bool is_queued() const { return m_queued; } + void set_queued(bool queued) { m_queued = queued; } u64 now(bool) const; }; |