From 5a8eb5196864cef8b3e700829a9432c2ab405d44 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Thu, 6 Jul 2023 21:32:34 +0300 Subject: [PATCH] Kernel: TTY now unblocks semaphore after read This allows concurrent reads not fully reading the buffer not block indefinately. --- kernel/kernel/Terminal/TTY.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/kernel/Terminal/TTY.cpp b/kernel/kernel/Terminal/TTY.cpp index e8e2046cb4..f9959efa21 100644 --- a/kernel/kernel/Terminal/TTY.cpp +++ b/kernel/kernel/Terminal/TTY.cpp @@ -645,6 +645,8 @@ flush: if (m_output.bytes == 0) m_output.flush = false; + m_output.semaphore.unblock(); + m_lock.unlock(); return to_copy;