mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:58:11 +00:00
Kernel: Use a dedicated thread state for wait-queued threads
Instead of using the generic block mechanism, wait-queued threads now go into the special Queued state. This fixes an issue where signal dispatch would unblock a wait-queued thread (because signal dispatch unblocks blocked threads) and cause confusion since the thread only expected to be awoken by the queue.
This commit is contained in:
parent
7126a42d4d
commit
5859e16e53
5 changed files with 42 additions and 59 deletions
|
@ -19,7 +19,7 @@ void Lock::lock()
|
|||
return;
|
||||
}
|
||||
m_lock.store(false, AK::memory_order_release);
|
||||
(void)current->donate_remaining_timeslice_and_block<Thread::WaitQueueBlocker>(m_holder, m_name, m_queue);
|
||||
current->wait_on(m_queue, m_holder, m_name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue