summaryrefslogtreecommitdiff
path: root/spinlock.c
diff options
context:
space:
mode:
authorrsc <rsc>2006-07-16 15:50:13 +0000
committerrsc <rsc>2006-07-16 15:50:13 +0000
commitb74f4b57ae48719fca4fc621732b055b2debaf3e (patch)
treec485febec4a42c66783c05690a9bfb5c1b47b07f /spinlock.c
parentef2bd07ae4cb2e27d62cfdcb7e71d82948fb80ed (diff)
downloadxv6-labs-b74f4b57ae48719fca4fc621732b055b2debaf3e.tar.gz
xv6-labs-b74f4b57ae48719fca4fc621732b055b2debaf3e.tar.bz2
xv6-labs-b74f4b57ae48719fca4fc621732b055b2debaf3e.zip
Keep interrupts disabled during startup.
Diffstat (limited to 'spinlock.c')
-rw-r--r--spinlock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/spinlock.c b/spinlock.c
index 7ab0bbe..c0f236d 100644
--- a/spinlock.c
+++ b/spinlock.c
@@ -10,7 +10,7 @@
// because cprintf uses them itself.
#define cprintf dont_use_cprintf
-extern int bootstrap;
+extern int use_console_lock;
int
getcallerpc(void *v)
@@ -34,7 +34,7 @@ release(struct spinlock * lock)
{
cpuid(0, 0, 0, 0, 0); // memory barrier
lock->locked = 0;
- if(--cpus[cpu()].nlock == 0 && !bootstrap)
+ if(--cpus[cpu()].nlock == 0)
sti();
}