tty: drop interrupt-safety todo

This is better handled as work.
This commit is contained in:
Matheus
2026-10-14 23:52:03 -03:00
parent 027c292fa2
commit 0f4b072a47
2 changed files with 0 additions and 9 deletions
-1
View File
@@ -183,7 +183,6 @@ static size_t write_tty(void *internal, char *str, size_t size) {
return size; return size;
} }
// TODO enqueue dpc and call tty_process directly from it once it is safe to be called from an interrupt context
static void irq(isr_t *self, context_t *) { static void irq(isr_t *self, context_t *) {
pc_com_t *pc_com = self->priv; pc_com_t *pc_com = self->priv;
-8
View File
@@ -43,14 +43,6 @@ static int setforeground(tty_t *tty, proc_t *proc) {
return ENOTTY; return ENOTTY;
} }
// TODO: make this interrupt safe
// this would mean:
// - preventing the leaders from reaching refcnt = 1 during the getforeground() call until it is done
// - list mutex -> list spinlock
//
// however, for it to truly be interrupt safe, the tty->writetodevice callback would also need to be interrupt safe,
// which means that any drivers expecting to call this from an interrupt context would REQUIRE to have the callback to also be interrupt safe
// the main console is an example of a driver which would not be able to do so.
void tty_process(tty_t *tty, char c) { void tty_process(tty_t *tty, char c) {
if (c == '\r' && (tty->termios.c_iflag & IGNCR)) if (c == '\r' && (tty->termios.c_iflag & IGNCR))
return; return;