diff options
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/proc.c | 4 | ||||
| -rw-r--r-- | kernel/proc.h | 2 | 
2 files changed, 3 insertions, 3 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;  } diff --git a/kernel/proc.h b/kernel/proc.h index 02e7bc3..c257eb7 100644 --- a/kernel/proc.h +++ b/kernel/proc.h @@ -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()?  }; | 
