cpu->scheduler -> cpu->context to reduce confusion
This commit is contained in:
parent
5494c91705
commit
1e72d5ca08
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ struct context {
|
|||
// Per-CPU state.
|
||||
struct cpu {
|
||||
struct proc *proc; // The process running on this cpu, or null.
|
||||
struct context scheduler; // swtch() here to enter scheduler().
|
||||
struct context context; // swtch() here to enter scheduler().
|
||||
int noff; // Depth of push_off() nesting.
|
||||
int intena; // Were interrupts enabled before push_off()?
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue