mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-07 16:49:54 +00:00
Kernel: Require a reason to be passed to Thread::wait_on
The Lock class still permits no reason, but for everything else require a reason to be passed to Thread::wait_on. This makes it easier to diagnose why a Thread is in Queued state.
This commit is contained in:
parent
0c4b0c0312
commit
788b2d64c6
Notes:
sideshowbarker
2024-07-19 05:07:41 +09:00
Author: https://github.com/tomuta
Commit: 788b2d64c6
Pull-request: https://github.com/SerenityOS/serenity/pull/2706
Reviewed-by: https://github.com/awesomekling
11 changed files with 19 additions and 11 deletions
|
@ -67,7 +67,7 @@ void Lock::lock(Mode mode)
|
|||
return;
|
||||
}
|
||||
timeval* timeout = nullptr;
|
||||
current_thread->wait_on(m_queue, timeout, &m_lock, m_holder, m_name);
|
||||
current_thread->wait_on(m_queue, m_name, timeout, &m_lock, m_holder);
|
||||
} else if (Processor::current().in_critical()) {
|
||||
// If we're in a critical section and trying to lock, no context
|
||||
// switch will happen, so yield.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue