mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:48:11 +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
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