aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/syscall/syscall.c
diff options
context:
space:
mode:
authorMarvin Borner2020-05-09 17:39:31 +0200
committerMarvin Borner2020-05-09 17:39:31 +0200
commit09a66e91ec9e8a677aa48f27798753084f213713 (patch)
tree9685a13b459e60d830179c565417ed72ae855ebe /src/kernel/syscall/syscall.c
parent3a97fef4bb4780e4bc2423699063d40cbf5da923 (diff)
Replaced fork() with spawn()!
Who needs forks anyway
Diffstat (limited to 'src/kernel/syscall/syscall.c')
-rw-r--r--src/kernel/syscall/syscall.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/kernel/syscall/syscall.c b/src/kernel/syscall/syscall.c
index 2ae60b2..d46d3fa 100644
--- a/src/kernel/syscall/syscall.c
+++ b/src/kernel/syscall/syscall.c
@@ -11,10 +11,10 @@ typedef u32 (*syscall_func)(u32, ...);
u32 (*syscalls[])() = { [SYS_HALT] = (u32(*)())halt_loop, // DEBUG!
[SYS_EXIT] = sys_exit,
- [SYS_FORK] = sys_fork,
[SYS_READ] = sys_read,
[SYS_WRITE] = sys_write,
[SYS_EXEC] = sys_exec,
+ [SYS_SPAWN] = sys_spawn,
[SYS_WAIT] = sys_wait,
[SYS_GET_PID] = sys_get_pid,
[SYS_MALLOC] = sys_malloc,
@@ -36,10 +36,7 @@ void syscall_handler(struct regs *r)
log("[SYSCALL] %d at [0x%x] with 0x%x 0x%x 0x%x 0x%x", r->eax, location, r->ebx, r->ecx,
r->edx, r->esi, r->edi);
- if (r->eax == SYS_FORK) // TODO: Fix hardcoded fork parameters
- r->eax = location(r);
- else
- r->eax = location(r->ebx, r->ecx, r->edx, r->esi, r->edi);
+ r->eax = location(r->ebx, r->ecx, r->edx, r->esi, r->edi);
sti();
}