aboutsummaryrefslogtreecommitdiff
path: root/kernel/drivers/tty/tty.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/tty/tty.c')
-rw-r--r--kernel/drivers/tty/tty.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/drivers/tty/tty.c b/kernel/drivers/tty/tty.c
index c47a582..e3c77be 100644
--- a/kernel/drivers/tty/tty.c
+++ b/kernel/drivers/tty/tty.c
@@ -80,9 +80,13 @@ ssize_t tty_read(chardev_t *cdev, size_t pos, void *buf, size_t count)
// lock the read mutex of the tty
kmutex_lock(&tty->tty_read_mutex);
+ dbg(DBG_DISK, "tty_read: before wait_read\n");
+
// wait until there is something in the line discipline's buffer
ldisc_wait_read(&tty->tty_ldisc);
+ dbg(DBG_DISK, "tty_read: after wait_read\n");
+
// read from the ldisc's buffer if there are new characters
ssize_t bytes_read = ldisc_read(&tty->tty_ldisc, buf, count);
// unlock the read mutex of the tty