it's not clear that the release will always enable interrupts
This commit is contained in:
parent
dbd729b32d
commit
2418ac380c
1 changed files with 3 additions and 3 deletions
|
@ -419,11 +419,11 @@ scheduler(void)
|
||||||
struct proc *p;
|
struct proc *p;
|
||||||
struct cpu *c = mycpu();
|
struct cpu *c = mycpu();
|
||||||
|
|
||||||
|
c->proc = 0;
|
||||||
|
for(;;){
|
||||||
// Let devices interrupt when no lock is held.
|
// Let devices interrupt when no lock is held.
|
||||||
intr_on();
|
intr_on();
|
||||||
|
|
||||||
c->proc = 0;
|
|
||||||
for(;;){
|
|
||||||
for(p = proc; p < &proc[NPROC]; p++) {
|
for(p = proc; p < &proc[NPROC]; p++) {
|
||||||
acquire(&p->lock);
|
acquire(&p->lock);
|
||||||
if(p->state == RUNNABLE) {
|
if(p->state == RUNNABLE) {
|
||||||
|
|
Loading…
Reference in a new issue