summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_tty.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_tty.c b/sys/kern/kern_tty.c
index 39b94f7..641e7ba 100644
--- a/sys/kern/kern_tty.c
+++ b/sys/kern/kern_tty.c
@@ -135,12 +135,12 @@ tty_putc(struct tty *tty, int c)
ring = &tty->ring;
spinlock_acquire(&tty->rlock);
+ ring->data[ring->enq_index++] = c;
if (ring->enq_index >= TTY_RING_SIZE) {
__tty_flush(tty);
}
- ring->data[ring->enq_index++] = c;
spinlock_release(&tty->rlock);
return 0;
}