summaryrefslogtreecommitdiff
path: root/Kernel/TimerQueue.h
diff options
context:
space:
mode:
authorTom <tomut@yahoo.com>2021-01-03 16:58:50 -0700
committerAndreas Kling <kling@serenityos.org>2021-01-04 19:13:52 +0100
commit901ef3f1c87d15d2140be8a880250d09286e10a1 (patch)
tree2a8104d378a30cc5b23d61c13c65872c3ea0b6c2 /Kernel/TimerQueue.h
parentfb84f0ec9c4d5e1a810dc05965ddbec7ff5d99ec (diff)
downloadserenity-901ef3f1c87d15d2140be8a880250d09286e10a1.zip
Kernel: Specify default memory order for some non-synchronizing Atomics
Diffstat (limited to 'Kernel/TimerQueue.h')
-rw-r--r--Kernel/TimerQueue.h6
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;
};