summaryrefslogtreecommitdiff
path: root/kernel/syscalls.c
diff options
context:
space:
mode:
authorMiguel <m.i@gmx.at>2018-09-13 03:12:12 +0200
committerMiguel <m.i@gmx.at>2018-09-13 03:12:12 +0200
commitb9f10c8a65a24db1c6a52d9df67230b75fa38d1a (patch)
tree548d1d5d26e422230fd59b75d19fe2ebef3c8d5f /kernel/syscalls.c
parent6a886cb2a4af303fae01b61a2e6590ca22bb4a3e (diff)
inside the scheduler
Diffstat (limited to 'kernel/syscalls.c')
-rw-r--r--kernel/syscalls.c29
1 files changed, 25 insertions, 4 deletions
diff --git a/kernel/syscalls.c b/kernel/syscalls.c
index f092a75..8246df8 100644
--- a/kernel/syscalls.c
+++ b/kernel/syscalls.c
@@ -331,6 +331,27 @@ int syscall_open(char *name, int flags, int mode)
return next_fd-1;
}
+uint32_t syscall_fork(int pid)
+{
+ return task_fork(pid);
+
+}
+uint32_t syscall_clone(int pid)
+{
+ return task_clone(pid);
+}
+
+uint32_t syscall_wait(int pid)
+{
+ fixme("implement syscall_wait");
+ return 0;
+}
+
+uint32_t syscall_exit(int pid)
+{
+ fixme("free allll mem");
+ return 0;
+}
//newcomers
//
@@ -380,15 +401,15 @@ uint32_t syscall_generic(uint32_t nr,uint32_t p1, uint32_t p2, uint32_t p3, uint
{
switch(nr){
case SYSCALL_EXIT :
- return task_exit(pid);
+ return syscall_exit(pid);
case SYSCALL_CLOSE :
return syscall_close(p1,p2,p3);
case SYSCALL_EXECVE :
return syscall_execve(p1,p2,p3,pid);
case SYSCALL_FORK :
- return task_fork(pid);
+ return syscall_fork(pid);
case SYSCALL_CLONE :
- return task_clone(pid);
+ return syscall_clone(pid);
case SYSCALL_GETPID :
// return syscall_getpid(p1,p2,p3);
return -1;
@@ -418,7 +439,7 @@ uint32_t syscall_generic(uint32_t nr,uint32_t p1, uint32_t p2, uint32_t p3, uint
// return syscall_unlink(p1,p2,p3);
return -1;
case SYSCALL_WAIT :
- return task_wait(pid);
+ return syscall_wait(pid);
case SYSCALL_WRITE :
return syscall_write(p1,p2,p3);
case SYSCALL_GETTIMEOFDAY: