diff options
author | Marvin Borner | 2021-04-02 01:27:36 +0200 |
---|---|---|
committer | Marvin Borner | 2021-04-02 01:27:36 +0200 |
commit | 192b756a6999a0637fcc72f3fd2f9f7099e32543 (patch) | |
tree | f936c42baeb54c8aebd0fc0ac0cb56f9dcf3c96c /kernel/drivers | |
parent | afa00abb2b68205bee539d7947130d6b1b1ec6e9 (diff) |
Huge scheduling/proc-management improvements
Diffstat (limited to 'kernel/drivers')
-rw-r--r-- | kernel/drivers/interrupts.asm | 3 | ||||
-rw-r--r-- | kernel/drivers/interrupts.c | 7 | ||||
-rw-r--r-- | kernel/drivers/keyboard.c | 2 | ||||
-rw-r--r-- | kernel/drivers/mouse.c | 2 |
4 files changed, 5 insertions, 9 deletions
diff --git a/kernel/drivers/interrupts.asm b/kernel/drivers/interrupts.asm index 59c323c..9f475fb 100644 --- a/kernel/drivers/interrupts.asm +++ b/kernel/drivers/interrupts.asm @@ -5,7 +5,6 @@ %macro IRQ 2 global irq%1 irq%1: - cli push byte 0 push byte %2 jmp irq_common_stub @@ -63,7 +62,6 @@ irq_common_stub: %macro ISR_NOERRCODE 1 global isr%1 isr%1: - cli push byte 0 push %1 jmp isr_common_stub @@ -72,7 +70,6 @@ irq_common_stub: %macro ISR_ERRCODE 1 global isr%1 isr%1: - cli push byte %1 jmp isr_common_stub %endmacro diff --git a/kernel/drivers/interrupts.c b/kernel/drivers/interrupts.c index 255f976..917733f 100644 --- a/kernel/drivers/interrupts.c +++ b/kernel/drivers/interrupts.c @@ -176,10 +176,9 @@ void isr_panic(struct regs *r) r->err_code, r->eip, r->cs & 3); struct proc *proc = proc_current(); if (proc) { - printf("\t-> Exception occurred in %s at addr 0x%x\n", proc->name, - r->eip - proc->entry); - proc_exit(proc, 1); - proc_yield(r); + printf("\t-> Exception occurred in %s at addr 0x%x (offset 0x%x)\n", proc->name, + r->eip, r->eip - proc->entry); + proc_exit(proc, r, 1); } else { __asm__ volatile("cli\nhlt"); } diff --git a/kernel/drivers/keyboard.c b/kernel/drivers/keyboard.c index b123bcc..63005b9 100644 --- a/kernel/drivers/keyboard.c +++ b/kernel/drivers/keyboard.c @@ -45,7 +45,7 @@ static void keyboard_handler(struct regs *r) state = 0; merged = 0; - proc_enable_waiting(dev_id, PROC_WAIT_DEV); + proc_unblock(dev_id, PROC_BLOCK_DEV); } /*static void keyboard_acknowledge(void) diff --git a/kernel/drivers/mouse.c b/kernel/drivers/mouse.c index ad36cc4..db0d2fb 100644 --- a/kernel/drivers/mouse.c +++ b/kernel/drivers/mouse.c @@ -47,7 +47,7 @@ static void mouse_handler(struct regs *r) event->but3 = (mouse_byte[0] >> 2) & 1; stack_push_bot(queue, event); mouse_cycle = 0; - proc_enable_waiting(dev_id, PROC_WAIT_DEV); + proc_unblock(dev_id, PROC_BLOCK_DEV); break; default: break; |