summaryrefslogtreecommitdiff
path: root/kernel/interrupts.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/interrupts.c')
-rw-r--r--kernel/interrupts.c8
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