summaryrefslogtreecommitdiff
path: root/asm/int_syscall_handler.asm
diff options
context:
space:
mode:
Diffstat (limited to 'asm/int_syscall_handler.asm')
-rw-r--r--asm/int_syscall_handler.asm26
1 files changed, 14 insertions, 12 deletions
diff --git a/asm/int_syscall_handler.asm b/asm/int_syscall_handler.asm
index a26592f..4031f3d 100644
--- a/asm/int_syscall_handler.asm
+++ b/asm/int_syscall_handler.asm
@@ -148,29 +148,31 @@ call_exit:
;;;;
call_fork:
+
+ pusha ;Push all standard registers
- cli
-
- pusha ;Push all standard registers
-
- mov ebx, esp ;save current stack pointer in esp
- mov esp, 0x7000 ;now put the stack outside of virtual memory in kernel space!
+ push ds
+ push es
+ push fs
+ push gs
+ mov ebx, esp ; pass it in
push ebx
call task_fork ;Call C code
- mov [pid],eax
+ pop ebx
- mov esp, ebx ;Replace the stack with what the C code gave us
-
+ pop ds
+ pop es
+ pop fs
+ pop gs
+
+ mov [pid],eax ; save return val, so it survives popa
popa ;Put the standard registers back
mov ebx,[pid]
- sti
-
iretd ;Interrupt-Return
- ;;;;
call_timeofday:
call syscall_gettimeofday