Explorar el Código

Updated gitignore

Carlos hace 10 años
padre
commit
46094a0e96
Se han modificado 3 ficheros con 6 adiciones y 3 borrados
  1. BIN
      .DS_Store
  2. 1 0
      .gitignore
  3. 5 3
      19-interrupts-irqs/cpu/isr.c

BIN
.DS_Store


+ 1 - 0
.gitignore

@@ -4,3 +4,4 @@
 *.dis
 *.elf
 *.sym
+.DS_STORE

+ 5 - 3
19-interrupts-irqs/cpu/isr.c

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