summaryrefslogtreecommitdiff
path: root/kalloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'kalloc.c')
-rw-r--r--kalloc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kalloc.c b/kalloc.c
index c13a639..989e3e8 100644
--- a/kalloc.c
+++ b/kalloc.c
@@ -15,7 +15,7 @@
#include "proc.h"
#include "spinlock.h"
-struct spinlock kalloc_lock = { "kalloc" };
+struct spinlock kalloc_lock;
struct run {
struct run *next;
@@ -37,6 +37,7 @@ kinit(void)
uint mem;
char *start;
+ initlock(&kalloc_lock, "kalloc");
start = (char *) &end;
start = (char *) (((uint)start + PAGE) & ~(PAGE-1));
mem = 256; // XXX