From 06260dd6aeedc5c4ab0d42215fc38ab459365ce3 Mon Sep 17 00:00:00 2001 From: Quinn Stephens Date: Thu, 22 May 2025 17:14:01 -0400 Subject: kernel: Optimize console & logging * Modified draw loops to use `fbdev_get_index()` less often. * Created `cons_fast_putch()`, then used it to implement `cons_putch()` and `cons_putstr()`. This way, when printing an entire string, the lock acquire/release and cursor hide/show will only happen once, instead of once per character. * Modified `syslog_write()` to use `cons_putstr()`. Signed-off-by: Quinn Stephens Signed-off-by: Ian Moffett --- sys/include/dev/cons/cons.h | 1 + 1 file changed, 1 insertion(+) (limited to 'sys/include/dev/cons/cons.h') diff --git a/sys/include/dev/cons/cons.h b/sys/include/dev/cons/cons.h index 3569c52..b27be23 100644 --- a/sys/include/dev/cons/cons.h +++ b/sys/include/dev/cons/cons.h @@ -65,6 +65,7 @@ struct cons_screen { void cons_init(void); void cons_expose(void); int cons_putch(struct cons_screen *scr, char c); +int cons_putstr(struct cons_screen *scr, const char *s, size_t len); extern struct cons_screen g_root_scr; -- cgit v1.2.3