diff --git a/kernel/proc.c b/kernel/proc.c index 57528f9..e63cc9f 100644 --- a/kernel/proc.c +++ b/kernel/proc.c @@ -49,7 +49,7 @@ mycpu(void) { return c; } -// Return the current struct proc *. +// Return the current struct proc *, or zero if none. struct proc* myproc(void) { push_off(); @@ -421,7 +421,7 @@ scheduler(void) c->proc = 0; for(;;){ - // Let devices interrupt when no lock is held. + // Avoid deadlock by ensuring that devices can interrupt. intr_on(); for(p = proc; p < &proc[NPROC]; p++) {