From fe3aab170c33ae4530f0580c52509f4c414a8769 Mon Sep 17 00:00:00 2001 From: Danny Holman Date: Tue, 22 Mar 2022 13:48:09 -0500 Subject: 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 --- include/kernel/serial.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'include/kernel') 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 + 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 -- cgit v1.2.3