summaryrefslogtreecommitdiff
path: root/kernel/log.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/log.c')
-rw-r--r--kernel/log.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/log.c b/kernel/log.c
index c7c1bb7..b0eeab5 100644
--- a/kernel/log.c
+++ b/kernel/log.c
@@ -1,8 +1,12 @@
#include "log.h"
+#include "kernel.h"
+
#include <stdarg.h>
#include <stdbool.h>
+#include "spinlock.h"
+
#include "kernel/kernel.h"
#include "kernel/fifo.h"
#include "driver/serial.h"
@@ -43,7 +47,9 @@ void log(char *module_name, int prio, char *format_string, ...)
tfp_sprintf(buf_log,"\033[36;40m%s\033[31;40m %s:\033[37;40m %s\n",buf_time,module_name,buf_info);
+ spinlock_spin(SPINLOCK_LOG);
log_string(buf_log);
+ spinlock_release(SPINLOCK_LOG);
}
/*