summaryrefslogtreecommitdiff
path: root/spinlock.c
diff options
context:
space:
mode:
authorFrans Kaashoek <[email protected]>2016-09-02 08:36:14 -0400
committerFrans Kaashoek <[email protected]>2016-09-02 08:36:14 -0400
commitb8fd4cba1367656b464a8ac303e4141107712c39 (patch)
tree79c9cc8d58978ccf4184da731728002e1bec0361 /spinlock.c
parentae15515d80559ff95b315e3342c3baa00b87be1c (diff)
parentbc8221a59c083811ee2d8c49c0342ea59caa6d51 (diff)
downloadxv6-labs-b8fd4cba1367656b464a8ac303e4141107712c39.tar.gz
xv6-labs-b8fd4cba1367656b464a8ac303e4141107712c39.tar.bz2
xv6-labs-b8fd4cba1367656b464a8ac303e4141107712c39.zip
Merge branch 'master' of g.csail.mit.edu:xv6-dev
Diffstat (limited to 'spinlock.c')
-rw-r--r--spinlock.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/spinlock.c b/spinlock.c
index a5f0b21..bf863ef 100644
--- a/spinlock.c
+++ b/spinlock.c
@@ -102,8 +102,9 @@ pushcli(void)
eflags = readeflags();
cli();
- if(cpu->ncli++ == 0)
+ if(cpu->ncli == 0)
cpu->intena = eflags & FL_IF;
+ cpu->ncli += 1;
}
void