fixes
This commit is contained in:
parent
5e8c5d8bb8
commit
fe5f50a03d
1 changed files with 7 additions and 7 deletions
14
console.c
14
console.c
|
@ -207,7 +207,7 @@ kbd_intr(void)
|
||||||
};
|
};
|
||||||
uint st, data, c;
|
uint st, data, c;
|
||||||
|
|
||||||
acquire(&kbd_lock);
|
acquire(&kbd.lock);
|
||||||
|
|
||||||
st = inb(KBSTATP);
|
st = inb(KBSTATP);
|
||||||
if((st & KBS_DIB) == 0)
|
if((st & KBS_DIB) == 0)
|
||||||
|
@ -253,17 +253,17 @@ kbd_intr(void)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if(((kbd_w + 1) % KBD_BUF) != kbd_r){
|
if(((kbd.w + 1) % KBD_BUF) != kbd.r){
|
||||||
kbd_buf[kbd_w++] = c;
|
kbd.buf[kbd.w++] = c;
|
||||||
if(kbd_w >= KBD_BUF)
|
if(kbd.w >= KBD_BUF)
|
||||||
kbd_w = 0;
|
kbd.w = 0;
|
||||||
wakeup(&kbd_r);
|
wakeup(&kbd.r);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
out:
|
out:
|
||||||
release(&kbd_lock);
|
release(&kbd.lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
//PAGEBREAK: 25
|
//PAGEBREAK: 25
|
||||||
|
|
Loading…
Reference in a new issue