Skip to content

Commit

Permalink
Updated gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
cfenollosa committed Mar 20, 2015
1 parent 6e5a099 commit 46094a0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Binary file removed .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
*.dis
*.elf
*.sym
.DS_STORE
8 changes: 5 additions & 3 deletions 19-interrupts-irqs/cpu/isr.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,11 @@ void register_interrupt_handler(u8 n, isr_t handler) {
}

void irq_handler(registers_t r) {
/* If the irq involves the slave (IRQ > 7), send an EOI to it */
if (r.int_no >= 40) port_byte_out(0xA0, 0x20);
port_byte_out(0x20, 0x20); /* Send EOI to master */
/* After every interrupt we need to send an EOI to the PICs
* or they will not send another interrupt again */
if (r.int_no >= 40) port_byte_out(0xA0, 0x20); /* slave */
port_byte_out(0x20, 0x20); /* master */

/* Handle the interrupt in a more modular way */
if (interrupt_handlers[r.int_no] != 0) {
isr_t handler = interrupt_handlers[r.int_no];
Expand Down

0 comments on commit 46094a0

Please sign in to comment.