Fix some keyboard keypressed still being missed
This commit is contained in:
@ -218,11 +218,9 @@ void intr_handleintr(IntrStackFrame *frame) {
|
||||
intr_eoi(frame->trapnum - INTR_IRQBASE);
|
||||
if (c >= 0) {
|
||||
uint8_t *bytes = (uint8_t *)&c;
|
||||
spinlock_acquire(&PS2KB_BUF.spinlock);
|
||||
for (size_t i = 0; i < sizeof(c); i++) {
|
||||
rbuf_push(&PS2KB_BUF.rbuf, bytes[i]);
|
||||
}
|
||||
spinlock_release(&PS2KB_BUF.spinlock);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user