diff options
| author | Miguel <m.i@gmx.at> | 2018-10-04 02:17:13 +0200 |
|---|---|---|
| committer | Miguel <m.i@gmx.at> | 2018-10-04 02:17:13 +0200 |
| commit | 81a8252db679351f5ba388b420519724c9c2c2be (patch) | |
| tree | d21bb88fb36f9492c0daf14d67c46f0b22b66def /kernel/interrupts.c | |
| parent | ce16fe524c14ccaae67fb634105da5aef08ead48 (diff) | |
reverting userspace idea
Diffstat (limited to 'kernel/interrupts.c')
| -rw-r--r-- | kernel/interrupts.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/kernel/interrupts.c b/kernel/interrupts.c index 4aa9db3..94ed54a 100644 --- a/kernel/interrupts.c +++ b/kernel/interrupts.c @@ -68,23 +68,34 @@ uint32_t interrupt_handler(uint32_t esp, uint32_t irq) { uint32_t (*f)(uint32_t esp)=handlers[irq]; esp=f(esp); + scheduler_wake_worker(esp); apic_eoi(); + esp=scheduler_run(esp,-1); return esp; } - if(irq==INTERRUPT_APIC_TIMER) + if(irq==INTERRUPT_APIC_TIMER || irq==INTERRUPT_IPI) { - klog ("tick"); esp=scheduler_run(esp,-1); apic_eoi(); return esp; } + if(irq==INTERRUPT_SYSCALL) // do not EOI + { + uint32_t *stack; + stack=esp; + task_syscall(stack[11],stack[8],stack[10],stack[9]); //eax,ebx,ecx,edx + scheduler_wake_worker(esp); + esp=scheduler_run(esp,-1); + return esp; + } + kpanic("unhandled interrupt %d",irq); - uint32_t *stack; + /* if(handlers[irq]!=0) { //uint32_t (*f)(uint32_t esp)=handlers[irq]; @@ -132,6 +143,7 @@ uint32_t interrupt_handler(uint32_t esp, uint32_t irq) return esp; + */ } /** |
