[USER] Exit and wait syscalls

This commit is contained in:
2017-02-24 15:30:45 +01:00
parent 5e4946e8e4
commit e3e661e7e5
6 changed files with 76 additions and 9 deletions

View File

@@ -3,4 +3,6 @@
#define SYS_WRITE 0x001
#define SYS_BRK 0x002
#define SYS_FORK 0x003
#define SYS_EXIT 0x004
#define SYS_WAIT 0x005
#define SYS_DEBUG 0x3FF

View File

@@ -42,3 +42,15 @@ SYSCALL_DEF(gettid)
SYSCALL_INIT();
return 0;
}
SYSCALL_DEF(exit_group)
{
SYSCALL_INIT(int, result);
return kernel_syscall(SYS_EXIT, result);
}
SYSCALL_DEF(wait4)
{
SYSCALL_INIT(int, pid, int *, result, int, options, void *, rusage);
return kernel_syscall(SYS_WAIT, result);
}