diff options
| author | Miguel <m.i@gmx.at> | 2018-10-18 12:26:18 +0200 |
|---|---|---|
| committer | Miguel <m.i@gmx.at> | 2018-10-18 12:26:18 +0200 |
| commit | a282cb8c921299b54a719452ec2bdaff63d8d3e9 (patch) | |
| tree | a8e88f37f855436d515f995135ded66e564c33f1 /kernel/interrupts.c | |
| parent | ad94570c78a8d9e426fd0d48e9709dba27803b71 (diff) | |
New Scheduling / Syscalls!
Diffstat (limited to 'kernel/interrupts.c')
| -rw-r--r-- | kernel/interrupts.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/kernel/interrupts.c b/kernel/interrupts.c index 8bc4f47..702112c 100644 --- a/kernel/interrupts.c +++ b/kernel/interrupts.c @@ -122,9 +122,9 @@ uint32_t interrupt_handler(uint32_t esp, uint32_t irq) if(irq==INTERRUPT_SYSCALL) { int pid=task_get_current_pid(); - uint32_t *stack; - stack=esp; + stack=esp; + task_set_esp(pid,esp); // this will get fucked if we get scheduled away... // extract variables from stack // (NOTE we pass them in some fucked up order, @@ -148,11 +148,9 @@ uint32_t interrupt_handler(uint32_t esp, uint32_t irq) // it will also not work with SMP while(true) { - // x86_cli(); int ok=syscall_generic_test(eax,edx,ecx,ebx,pid); - // x86_sti(); if(ok)break; - else __asm__("int $0x81"); + __asm__("int $0x81");// does NOT requie interrupts } // uff, once we got through we can do the syscall and get out |
