From 1d58b77241437ffb6bc03bbe30310ed76c76b4b3 Mon Sep 17 00:00:00 2001 From: Mark Poliakov Date: Sun, 29 Dec 2024 13:04:51 +0200 Subject: [PATCH] tty: fix ring getting stuck with stale wakers registered --- kernel/libk/libk-util/src/ring.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/libk/libk-util/src/ring.rs b/kernel/libk/libk-util/src/ring.rs index 86bbbf0a..9bb02700 100644 --- a/kernel/libk/libk-util/src/ring.rs +++ b/kernel/libk/libk-util/src/ring.rs @@ -179,7 +179,7 @@ impl LossyRingQueue { pub fn write(&self, value: T) { self.ring.lock().write(value); - self.read_notify.wake_one(); + self.read_notify.wake_all(); } pub fn write_multiple(&self, values: &[T]) { @@ -187,7 +187,7 @@ impl LossyRingQueue { for &value in values { lock.write(value); } - self.read_notify.wake_one(); + self.read_notify.wake_all(); } pub fn try_read(&self) -> Option {