Skip to content

Commit 46094a0

Browse files
committed
Updated gitignore
1 parent 6e5a099 commit 46094a0

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

.DS_Store

-6 KB
Binary file not shown.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
*.dis
55
*.elf
66
*.sym
7+
.DS_STORE

19-interrupts-irqs/cpu/isr.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,11 @@ void register_interrupt_handler(u8 n, isr_t handler) {
129129
}
130130

131131
void irq_handler(registers_t r) {
132-
/* If the irq involves the slave (IRQ > 7), send an EOI to it */
133-
if (r.int_no >= 40) port_byte_out(0xA0, 0x20);
134-
port_byte_out(0x20, 0x20); /* Send EOI to master */
132+
/* After every interrupt we need to send an EOI to the PICs
133+
* or they will not send another interrupt again */
134+
if (r.int_no >= 40) port_byte_out(0xA0, 0x20); /* slave */
135+
port_byte_out(0x20, 0x20); /* master */
136+
135137
/* Handle the interrupt in a more modular way */
136138
if (interrupt_handlers[r.int_no] != 0) {
137139
isr_t handler = interrupt_handlers[r.int_no];

0 commit comments

Comments
 (0)