1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 16:07:46 +00:00

AK: Remove thread safety gunk from userspace WeakPtr

The implicit thread safety stuff is only needed by the kernel version
of WeakPtr, as userspace already makes no guarantees about this.
This commit is contained in:
Andreas Kling 2022-01-31 12:40:30 +01:00
parent 30fcb07fe8
commit 51e5cc4e13
2 changed files with 7 additions and 33 deletions

View file

@ -113,7 +113,9 @@ protected:
~Weakable()
{
#ifdef KERNEL
m_being_destroyed.store(true, AK::MemoryOrder::memory_order_release);
#endif
revoke_weak_ptrs();
}
@ -125,7 +127,9 @@ protected:
private:
mutable RefPtr<WeakLink> m_link;
#ifdef KERNEL
Atomic<bool> m_being_destroyed { false };
#endif
};
}