1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 19:08:10 +00:00

Kernel: Specify default memory order for some non-synchronizing Atomics

This commit is contained in:
Tom 2021-01-03 16:58:50 -07:00 committed by Andreas Kling
parent fb84f0ec9c
commit 901ef3f1c8
12 changed files with 44 additions and 43 deletions

View file

@ -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;
};