1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-01-16 11:30:22 +00:00

Flip IRQ priority.

This commit is contained in:
Thomas Harte 2023-11-23 15:41:24 -05:00
parent 113fc9f757
commit 0674da0325

View File

@ -114,13 +114,11 @@ class PIC {
int acknowledge() {
awaiting_eoi_ = true;
// TODO: there's bound to be a better solution than this search?
// TODO: is this the right priority order?
in_service_ = 0x80;
int id = 7;
while(!(in_service_ & requests_)) {
in_service_ >>= 1;
--id;
in_service_ = 0x01;
int id = 0;
while(!(in_service_ & requests_) && in_service_) {
in_service_ <<= 1;
++id;
}
if(in_service_) {