aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/core/idt.c
diff options
context:
space:
mode:
authorAlex Auvolat <alex.auvolat@ens.fr>2015-03-08 19:07:48 +0100
committerAlex Auvolat <alex.auvolat@ens.fr>2015-03-08 19:07:48 +0100
commit6dd488b87fdc47fb377ba648a6cd598bdab87f59 (patch)
tree2e69225353054eb43a9869af4ca9766a0f39c828 /src/kernel/core/idt.c
parentbcee004478c6448541ce583e75c706e185190800 (diff)
downloadkogata-6dd488b87fdc47fb377ba648a6cd598bdab87f59.tar.gz
kogata-6dd488b87fdc47fb377ba648a6cd598bdab87f59.zip
Implement select ; add two tests for channels.
Diffstat (limited to 'src/kernel/core/idt.c')
-rw-r--r--src/kernel/core/idt.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/kernel/core/idt.c b/src/kernel/core/idt.c
index fcf8074..6bfe8b5 100644
--- a/src/kernel/core/idt.c
+++ b/src/kernel/core/idt.c
@@ -119,12 +119,17 @@ void idt_irq_handler(registers_t *regs) {
}
outb(0x20, 0x20);
- if (regs->err_code != 0) dbg_printf("IRQ%d\n", regs->err_code);
- if (irq_handlers[regs->err_code] != 0) {
- irq_handlers[regs->err_code](regs);
- }
+ if (regs->err_code == 0) {
+ irq0_handler(regs, st);
+ } else {
+ dbg_printf("IRQ%d\n", regs->err_code);
- exit_critical(st);
+ if (irq_handlers[regs->err_code] != 0) {
+ irq_handlers[regs->err_code](regs);
+ }
+
+ exit_critical(st);
+ }
// maybe exit
if (current_thread != 0 && regs->eip < K_HIGHHALF_ADDR && current_thread->must_exit) {