summaryrefslogtreecommitdiff
path: root/spinlock.c
diff options
context:
space:
mode:
Diffstat (limited to 'spinlock.c')
-rw-r--r--spinlock.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/spinlock.c b/spinlock.c
index 3784b24..d6e952d 100644
--- a/spinlock.c
+++ b/spinlock.c
@@ -102,8 +102,8 @@ pushcli(void)
eflags = readeflags();
cli();
- if(cpus[cpu()].ncli++ == 0)
- cpus[cpu()].intena = eflags & FL_IF;
+ if(c->ncli++ == 0)
+ c->intena = eflags & FL_IF;
}
void
@@ -111,9 +111,9 @@ popcli(void)
{
if(readeflags()&FL_IF)
panic("popcli - interruptible");
- if(--cpus[cpu()].ncli < 0)
+ if(--c->ncli < 0)
panic("popcli");
- if(cpus[cpu()].ncli == 0 && cpus[cpu()].intena)
+ if(c->ncli == 0 && c->intena)
sti();
}