1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:47:44 +00:00

Kernel: Remove unnecessary spinlock in ~Thread::Blocker()

Instead, just VERIFY that nobody is holding the blocker's internal lock.
This commit is contained in:
Andreas Kling 2021-08-23 01:45:05 +02:00
parent a82b5e6e50
commit 39474830a9

View file

@ -41,7 +41,7 @@ bool Thread::Blocker::add_to_blocker_set(Thread::BlockerSet& blocker_set, void*
Thread::Blocker::~Blocker() Thread::Blocker::~Blocker()
{ {
SpinlockLocker lock(m_lock); VERIFY(!m_lock.is_locked());
if (m_blocker_set) if (m_blocker_set)
m_blocker_set->remove_blocker(*this, m_block_data); m_blocker_set->remove_blocker(*this, m_block_data);
} }