This commit is contained in:
rsc 2007-08-14 19:41:01 +00:00
parent 5e8c5d8bb8
commit fe5f50a03d

View file

@ -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