From 36e36fae364dec02999f58edbe997780d901b674 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sun, 16 Aug 2020 15:35:43 +0200 Subject: Added WM and exec parameters --- kernel/features/proc.c | 2 +- kernel/features/syscall.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'kernel') diff --git a/kernel/features/proc.c b/kernel/features/proc.c index f59ff32..f6e1fe6 100644 --- a/kernel/features/proc.c +++ b/kernel/features/proc.c @@ -49,7 +49,7 @@ void scheduler(struct regs *regs) regs->cs = GDT_USER_CODE_OFFSET; regs->eflags = EFLAGS_ALWAYS | EFLAGS_INTERRUPTS; } - printf("%d", current->pid); + /* printf("%d", current->pid); */ } void proc_print() diff --git a/kernel/features/syscall.c b/kernel/features/syscall.c index b486deb..e6bcb83 100644 --- a/kernel/features/syscall.c +++ b/kernel/features/syscall.c @@ -39,6 +39,10 @@ void syscall_handler(struct regs *r) case SYS_EXEC: { char *path = (char *)r->ebx; struct proc *proc = proc_make(); + ((u32 *)proc->regs.esp)[0] = r->ecx; + ((u32 *)proc->regs.esp)[1] = r->edx; + ((u32 *)proc->regs.esp)[2] = r->esi; + ((u32 *)proc->regs.esp)[3] = r->edi; r->eax = bin_load(path, proc); break; } -- cgit v1.2.3