summaryrefslogtreecommitdiff
path: root/kernel/proc.c
diff options
context:
space:
mode:
authorRobert Morris <[email protected]>2020-07-17 16:40:57 -0400
committerFrans Kaashoek <[email protected]>2020-08-10 11:19:10 -0400
commit1e72d5ca087985938589ce509ace4914039860d3 (patch)
tree59175bed3c14e765d5cb4210ac3d6f19d9a03593 /kernel/proc.c
parent5494c9170587b17c9d749e19753fa3e7fb6958b9 (diff)
downloadxv6-labs-1e72d5ca087985938589ce509ace4914039860d3.tar.gz
xv6-labs-1e72d5ca087985938589ce509ace4914039860d3.tar.bz2
xv6-labs-1e72d5ca087985938589ce509ace4914039860d3.zip
cpu->scheduler -> cpu->context to reduce confusion
Diffstat (limited to 'kernel/proc.c')
-rw-r--r--kernel/proc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/proc.c b/kernel/proc.c
index d4ff37c..f7652f6 100644
--- a/kernel/proc.c
+++ b/kernel/proc.c
@@ -456,7 +456,7 @@ scheduler(void)
// before jumping back to us.
p->state = RUNNING;
c->proc = p;
- swtch(&c->scheduler, &p->context);
+ swtch(&c->context, &p->context);
// Process is done running for now.
// It should have changed its p->state before coming back.
@@ -490,7 +490,7 @@ sched(void)
panic("sched interruptible");
intena = mycpu()->intena;
- swtch(&p->context, &mycpu()->scheduler);
+ swtch(&p->context, &mycpu()->context);
mycpu()->intena = intena;
}