diff options
author | Marvin Borner | 2020-05-09 17:39:31 +0200 |
---|---|---|
committer | Marvin Borner | 2020-05-09 17:39:31 +0200 |
commit | 09a66e91ec9e8a677aa48f27798753084f213713 (patch) | |
tree | 9685a13b459e60d830179c565417ed72ae855ebe /src/kernel/syscall/actions/sys_fork.c | |
parent | 3a97fef4bb4780e4bc2423699063d40cbf5da923 (diff) |
Replaced fork() with spawn()!
Who needs forks anyway
Diffstat (limited to 'src/kernel/syscall/actions/sys_fork.c')
-rw-r--r-- | src/kernel/syscall/actions/sys_fork.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/kernel/syscall/actions/sys_fork.c b/src/kernel/syscall/actions/sys_fork.c deleted file mode 100644 index ae1b17f..0000000 --- a/src/kernel/syscall/actions/sys_fork.c +++ /dev/null @@ -1,23 +0,0 @@ -#include <interrupts/interrupts.h> -#include <io/io.h> -#include <lib/lib.h> -#include <memory/paging.h> -#include <stdint.h> -#include <system.h> -#include <tasks/process.h> - -u32 sys_fork(struct regs *r) -{ - cli(); - struct page_directory *dir = paging_copy_user_directory(current_proc->cr3); - struct process *proc = process_make_new(); - proc->cr3 = dir; - memcpy(&proc->registers, r, sizeof(struct regs)); - proc->registers.eax = proc->pid; - proc->pid = current_proc->pid + 1; - - sti(); - process_spawn(proc); - - return 0; -}
\ No newline at end of file |