[USER] Fork syscall

This commit is contained in:
thomas committed 2017-03-27 23:09:09 +02:00
1 parent a2cba95346
commit 5e4946e8e4
6 files changed
+63 -10

No files matched your search

+1
View File
@@ -2,4 +2,5 @@
#define SYS_WRITE 0x001
#define SYS_BRK 0x002
#define SYS_FORK 0x003
#define SYS_DEBUG 0x3FF
+23
View File
@@ -1,4 +1,8 @@
#include "syscalls.h"
#include "syscall_num.h"
#include <pthread.h>
#include <signal.h>
long kernel_syscall(int num, ...);
struct pthread *__pt;
@@ -19,3 +23,22 @@ SYSCALL_DEF(set_tid_address)
SYSCALL_INIT();
return 0;
}
SYSCALL_DEF(rt_sigprocmask)
{
SYSCALL_INIT(int, how, const sigset_t *, set, sigset_t *, oldset);
return 0;
}
SYSCALL_DEF(fork)
{
SYSCALL_INIT();
return kernel_syscall(SYS_FORK);
}
SYSCALL_DEF(gettid)
{
SYSCALL_INIT();
return 0;
}