[USER] Fork syscall
This commit is contained in:
@@ -2,4 +2,5 @@
|
||||
|
||||
#define SYS_WRITE 0x001
|
||||
#define SYS_BRK 0x002
|
||||
#define SYS_FORK 0x003
|
||||
#define SYS_DEBUG 0x3FF
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user