mirror of
https://github.com/SerenityOS/serenity
synced 2024-09-06 17:06:31 +00:00
Kernel: Take scheduler lock before block lock in unblock_from_mutex()
This matches the acquisition order used elsewhere.
This commit is contained in:
parent
cffcfca80a
commit
fcd3844da6
|
@ -269,9 +269,8 @@ void Thread::block(Kernel::Mutex& lock, SpinlockLocker<Spinlock>& lock_lock, u32
|
|||
ScopedCritical critical;
|
||||
VERIFY(!Memory::s_mm_lock.is_locked_by_current_processor());
|
||||
|
||||
SpinlockLocker block_lock(m_block_lock);
|
||||
|
||||
SpinlockLocker scheduler_lock(g_scheduler_lock);
|
||||
SpinlockLocker block_lock(m_block_lock);
|
||||
|
||||
switch (state()) {
|
||||
case Thread::State::Stopped:
|
||||
|
|
Loading…
Reference in a new issue