diff options
| author | Miguel <m.i@gmx.at> | 2018-09-06 01:58:10 +0200 |
|---|---|---|
| committer | Miguel <m.i@gmx.at> | 2018-09-06 01:58:10 +0200 |
| commit | ef4943053475cd8bf341c42dd0b538bc630b92a3 (patch) | |
| tree | b7f59c937797a0ce0603af9ef46a194d4a64ef22 /kernel/log.c | |
| parent | f67ad595650954195ef064a8b91038dbd0e16842 (diff) | |
working on smp
Diffstat (limited to 'kernel/log.c')
| -rw-r--r-- | kernel/log.c | 6 |
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); } /* |
