aboutsummaryrefslogtreecommitdiff
path: root/kernel/isr.c
diff options
context:
space:
mode:
authorFranklin Wei <frankhwei536@gmail.com>2015-02-11 17:13:26 -0500
committerFranklin Wei <frankhwei536@gmail.com>2015-02-11 17:13:26 -0500
commite3305e8f7c119c83fd04f1995e07ff71a1110887 (patch)
treef95921215c215a60d80b1be068b2cccd72459ee2 /kernel/isr.c
parent90fda5287e3dae56508a4b31e1bc4e29cd83e377 (diff)
downloadkappa-e3305e8f7c119c83fd04f1995e07ff71a1110887.zip
kappa-e3305e8f7c119c83fd04f1995e07ff71a1110887.tar.gz
kappa-e3305e8f7c119c83fd04f1995e07ff71a1110887.tar.bz2
kappa-e3305e8f7c119c83fd04f1995e07ff71a1110887.tar.xz
optimize interrupt performance
Diffstat (limited to 'kernel/isr.c')
-rw-r--r--kernel/isr.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/kernel/isr.c b/kernel/isr.c
index 569ecd0..e6887c6 100644
--- a/kernel/isr.c
+++ b/kernel/isr.c
@@ -4,22 +4,22 @@
#include "idt.h"
#include "panic.h"
-void (*int_callbacks[256])(struct regs_t) = { NULL };
+void (*int_callbacks[256])(struct regs_t*) = { NULL };
-void set_interrupt_handler(uint8_t n, void (*callback)(struct regs_t))
+void set_interrupt_handler(uint8_t n, void (*callback)(struct regs_t*))
{
int_callbacks[n] = callback;
}
-void isr_handler(struct regs_t regs)
+void isr_handler(struct regs_t *regs)
{
- if(int_callbacks[regs.int_no])
+ if(int_callbacks[regs->int_no])
{
- int_callbacks[regs.int_no](regs);
+ int_callbacks[regs->int_no](regs);
}
else
{
- printf("WARNING: unhandled ISR 0x%x!\n", regs.int_no);
+ printf("WARNING: unhandled ISR 0x%x!\n", regs->int_no);
}
}