mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:37:36 +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:
parent
30fcb07fe8
commit
51e5cc4e13
2 changed files with 7 additions and 33 deletions
|
@ -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
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue