summaryrefslogtreecommitdiff
path: root/src/kernel/task/syscall.cpp
diff options
context:
space:
mode:
authorAlex AUVOLAT <alexis211@gmail.com>2012-05-18 16:16:07 +0200
committerAlex AUVOLAT <alexis211@gmail.com>2012-05-18 16:16:07 +0200
commit7e6454020ed1143e05e83a683606f318995458e5 (patch)
tree763ec6f5dda5f8f662f5eeb38f29d4279681b0a2 /src/kernel/task/syscall.cpp
parentdaa6c2450fa0646619698f0dc01b0456b2541317 (diff)
downloadTCE-7e6454020ed1143e05e83a683606f318995458e5.tar.gz
TCE-7e6454020ed1143e05e83a683606f318995458e5.zip
Can now spawn new processes.
Diffstat (limited to 'src/kernel/task/syscall.cpp')
-rw-r--r--src/kernel/task/syscall.cpp9
1 files changed, 7 insertions, 2 deletions
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,