summaryrefslogtreecommitdiff
path: root/sys/include/dev/cons
diff options
context:
space:
mode:
authorQuinn Stephens <quinn@osmora.org>2025-05-22 17:14:01 -0400
committerIan Moffett <ian@osmora.org>2025-05-22 22:05:12 -0400
commit06260dd6aeedc5c4ab0d42215fc38ab459365ce3 (patch)
tree9ce9da80e914c0265237304d5b211f475b8f7a5c /sys/include/dev/cons
parentdef5182fdeb9ea60df0d3de6365dfa368943c3f0 (diff)
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 <quinn@osmora.org> Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/include/dev/cons')
-rw-r--r--sys/include/dev/cons/cons.h1
1 files changed, 1 insertions, 0 deletions
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;