diff options
author | Richard Braun <rbraun@sceen.net> | 2014-08-15 20:55:19 +0200 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2014-08-15 20:55:19 +0200 |
commit | 40502c5f7465300b2bc0cb44325db38b23449deb (patch) | |
tree | a820b4d136c20b70e25fc8e2652a08e27c8331fa /kern/printk.c | |
parent | 6d1f6eefcee5fad60b5b674135996414ecc17a2d (diff) |
kern/printk: don't use static spin lock initializer
Diffstat (limited to 'kern/printk.c')
-rw-r--r-- | kern/printk.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/kern/printk.c b/kern/printk.c index 6d1b9754..df3ba715 100644 --- a/kern/printk.c +++ b/kern/printk.c @@ -31,7 +31,7 @@ extern void console_write_byte(char c); static char printk_buffer[PRINTK_BUFSIZE]; -static struct spinlock printk_lock = SPINLOCK_INITIALIZER; +static struct spinlock printk_lock; int printk(const char *format, ...) @@ -64,3 +64,9 @@ vprintk(const char *format, va_list ap) return length; } + +void +printk_setup(void) +{ + spinlock_init(&printk_lock); +} |