From 7e6454020ed1143e05e83a683606f318995458e5 Mon Sep 17 00:00:00 2001 From: Alex AUVOLAT Date: Fri, 18 May 2012 16:16:07 +0200 Subject: Can now spawn new processes. --- src/kernel/task/syscall.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/kernel/task/syscall.cpp') diff --git a/src/kernel/task/syscall.cpp b/src/kernel/task/syscall.cpp index e9f9d3a..4eddb61 100644 --- a/src/kernel/task/syscall.cpp +++ b/src/kernel/task/syscall.cpp @@ -28,6 +28,7 @@ CALL1V(idt_waitIrq, irq_wait_sc); CALL0(proc_priv, proc_priv_sc); CALL1(process_sbrk, proc_sbrk_sc); CALL1V(process_brk, proc_brk_sc); +CALL1(process_waitpid, waitpid_sc); CALL1V(close, close_sc); @@ -41,6 +42,10 @@ static void thread_new_sc(registers* r) { sti(); } +static void run_sc(registers *r) { + r->eax = process_run((char*)r->ebx, (char**)r->ecx); +} + static void open_sc(registers *r) { r->eax = open((char*)r->ebx, r->ecx); } @@ -89,8 +94,8 @@ int_callback syscalls[NUMBER_OF_SYSCALLS] = { // This must correspond to common proc_brk_sc, 0, 0, - 0, - 0, //15 + run_sc, + waitpid_sc, //15 0, 0, 0, -- cgit v1.2.3