summaryrefslogtreecommitdiff
path: root/kern/printk.c
diff options
context:
space:
mode:
Diffstat (limited to 'kern/printk.c')
-rw-r--r--kern/printk.c8
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);
+}