diff options
Diffstat (limited to 'kernel/l0/dbglog.c')
-rw-r--r-- | kernel/l0/dbglog.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/l0/dbglog.c b/kernel/l0/dbglog.c index 5a7251b..e042625 100644 --- a/kernel/l0/dbglog.c +++ b/kernel/l0/dbglog.c @@ -1,6 +1,8 @@ #include <stdarg.h> #include <string.h> #include <printf.h> +#include <mutex.h> + #include <dbglog.h> #include <config.h> #include <sys.h> @@ -121,13 +123,17 @@ static void serial_puts(const char *c) { // ================================================================== +STATIC_MUTEX(dbglog_mutex); + void dbglog_setup() { + mutex_lock(&dbglog_mutex); #ifdef DBGLOG_TO_SCREEN vga_init(); #endif #ifdef DBGLOG_TO_SERIAL serial_init(); #endif + mutex_unlock(&dbglog_mutex); } void dbg_print(const char* str) { |