#include "interrupt.h"
#include <stdint.h>
+#include "intr-stubs.h"
#include "debug.h"
#include "io.h"
#include "lib.h"
\f
uint64_t idt[256];
-extern void (*intr_stubs[256]) (void);
-
intr_handler_func *intr_handlers[256];
void intr_handler (struct intr_frame *args);
--- /dev/null
+#ifndef HEADER_INTR_STUBS_H
+#define HEADER_INTR_STUBS_H
+
+extern void (*intr_stubs[256]) (void);
+
+void intr_entry (void);
+void intr_exit (void);
+
+#endif /* intr-stubs.h */
$x = sprintf ("%02x", $i);
print "\t.globl intr${x}_stub\n";
print "intr${x}_stub:\n";
- print "\tpushl \$0\n" if $i != 8 && $i != 10 && $i != 11 && $i != 13 && $i != 14 && $i != 17;
+ print "\tpushl \$0\n"
+ if ($i != 8 && $i != 10 && $i != 11
+ && $i != 13 && $i != 14 && $i != 17);
print "\tpushl \$0x$x\n";
print "\tjmp intr_entry\n";
}
pushl %esp
.globl intr_handler
call intr_handler
+
+ .globl intr_exit
+intr_exit:
addl $4, %esp
# Restore caller's registers.