Kernel: Free keyboard mutex while waiting for data to read
This was making select hang if one thread was trying to read from keyboard.
This commit is contained in:
parent
301dcd78cc
commit
f1e366d36f
|
@ -204,7 +204,10 @@ namespace Kernel::Input
|
|||
while (m_event_queue.empty())
|
||||
{
|
||||
m_event_lock.unlock(state);
|
||||
TRY(Thread::current().block_or_eintr_indefinite(m_semaphore));
|
||||
{
|
||||
LockFreeGuard _(m_mutex);
|
||||
TRY(Thread::current().block_or_eintr_indefinite(m_semaphore));
|
||||
}
|
||||
state = m_event_lock.lock();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue