summaryrefslogtreecommitdiff
path: root/include/kernel
diff options
context:
space:
mode:
authorDanny Holman <dholman@gymli.org>2022-03-22 13:48:09 -0500
committerDanny Holman <dholman@gymli.org>2022-03-22 13:54:37 -0500
commitfe3aab170c33ae4530f0580c52509f4c414a8769 (patch)
tree4eeb7c2d1ef7e2a7b177fe6d25eeb2a4dfff21a6 /include/kernel
parent84332707f1df86c25c1f94883044c5e8fe2e20a3 (diff)
arch: i386: make serial_writestring inline
The serial_writestring function is small enough and platform-agnostic, and therefore it should be moved into the main serial header and marked as inline. Signed-off-by: Danny Holman <dholman@gymli.org>
Diffstat (limited to 'include/kernel')
-rw-r--r--include/kernel/serial.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/kernel/serial.h b/include/kernel/serial.h
index a815766..23f6907 100644
--- a/include/kernel/serial.h
+++ b/include/kernel/serial.h
@@ -1,9 +1,15 @@
#ifndef SERIAL_H
#define SERIAL_H
+#include <kernel/string.h>
+
int serial_init(void);
char read_serial(void);
void write_serial(char a);
-void serial_writestring(const char *str);
+
+inline void serial_writestring(const char *str) {
+ for (size_t i = 0; i < strlen(str); i++)
+ write_serial(str[i]);
+}
#endif