mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 11:18:13 +00:00
LibThread: Remove redundant --m_level in Lock::unlock() (#3040)
This commit is contained in:
parent
5a5b687014
commit
91d259ef1c
1 changed files with 3 additions and 2 deletions
|
@ -84,9 +84,10 @@ inline void Lock::unlock()
|
|||
{
|
||||
ASSERT(m_holder == gettid());
|
||||
ASSERT(m_level);
|
||||
--m_level;
|
||||
if (!m_level)
|
||||
if (m_level == 1)
|
||||
m_holder.store(0, AK::memory_order_release);
|
||||
else
|
||||
--m_level;
|
||||
}
|
||||
|
||||
#define LOCKER(lock) LibThread::Locker locker(lock)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue