summaryrefslogtreecommitdiff
path: root/proc.c
diff options
context:
space:
mode:
authorRobert Morris <[email protected]>2019-06-05 14:05:46 -0400
committerRobert Morris <[email protected]>2019-06-05 14:05:46 -0400
commit31136437684b5987ef46f4c6947940cf96de75b3 (patch)
tree3c89b1f0e12bbddbf307259326ecb5f763ba6e09 /proc.c
parentf1a727b971a59bab6025b4c4111342c27356ca40 (diff)
downloadxv6-labs-31136437684b5987ef46f4c6947940cf96de75b3.tar.gz
xv6-labs-31136437684b5987ef46f4c6947940cf96de75b3.tar.bz2
xv6-labs-31136437684b5987ef46f4c6947940cf96de75b3.zip
spinlocks using gcc intrinsics
push_off() / pop_off() set up per-hart plic stuff so all harts get device interrupts
Diffstat (limited to 'proc.c')
-rw-r--r--proc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/proc.c b/proc.c
index 766fd93..28cac26 100644
--- a/proc.c
+++ b/proc.c
@@ -360,7 +360,7 @@ scheduler(void)
{
struct proc *p;
struct cpu *c = mycpu();
-
+
c->proc = 0;
for(;;){
// Enable interrupts on this processor.
@@ -385,7 +385,6 @@ scheduler(void)
c->proc = 0;
}
release(&ptable.lock);
-
}
}
@@ -393,7 +392,7 @@ scheduler(void)
// and have changed proc->state. Saves and restores
// intena because intena is a property of this
// kernel thread, not this CPU. It should
-// be proc->intena and proc->ncli, but that would
+// be proc->intena and proc->noff, but that would
// break in the few places where a lock is held but
// there's no process.
void