mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:18:11 +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
1 changed files with 1 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue