toaruos/kernel/cpu/isrs.c

20 lines
360 B
C
Raw Normal View History

/* vim: tabstop=4 shiftwidth=4 noexpandtab
*
* Interrupt Services Requests
*/
2011-01-16 06:41:17 +03:00
#include <system.h>
2011-12-27 05:23:58 +04:00
#include <logging.h>
2011-01-16 06:41:17 +03:00
2013-06-06 10:10:36 +04:00
irq_handler_t isrs_routines[256];
extern void fault_error(struct regs *r);
2011-01-21 04:49:35 +03:00
void fault_handler(struct regs *r) {
2013-06-06 10:10:36 +04:00
irq_handler_t handler;
2011-03-30 06:08:56 +04:00
handler = isrs_routines[r->int_no];
if (handler) {
handler(r);
} else {
2013-06-06 10:10:36 +04:00
fault_error(r);
2011-01-16 06:41:17 +03:00
}
}