kern
changeset 61:5b29b15c5412
removed the unimplemented exit syscall
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Wed, 17 Aug 2011 05:38:40 +0300 |
parents | 39188bbe8638 |
children | 38f768da2f31 |
files | src/syscall.c src/syscall.h |
diffstat | 2 files changed, 5 insertions(+), 14 deletions(-) [+] |
line diff
1.1 --- a/src/syscall.c Wed Aug 17 05:37:30 2011 +0300 1.2 +++ b/src/syscall.c Wed Aug 17 05:38:40 2011 +0300 1.3 @@ -9,7 +9,6 @@ 1.4 1.5 static void syscall(int inum); 1.6 1.7 -static int sys_exit(int status); 1.8 static int sys_hello(void); 1.9 static int sys_sleep(int sec); 1.10 static int sys_fork(void); 1.11 @@ -17,7 +16,6 @@ 1.12 1.13 void init_syscall(void) 1.14 { 1.15 - sys_func[SYS_EXIT] = sys_exit; 1.16 sys_func[SYS_HELLO] = sys_hello; 1.17 sys_func[SYS_SLEEP] = sys_sleep; 1.18 sys_func[SYS_FORK] = sys_fork; 1.19 @@ -45,12 +43,6 @@ 1.20 frm->regs.eax = sys_func[idx](frm->regs.ebx, frm->regs.ecx, frm->regs.edx, frm->regs.esi, frm->regs.edi); 1.21 } 1.22 1.23 -static int sys_exit(int status) 1.24 -{ 1.25 - printf("SYSCALL: exit\n"); 1.26 - return -1; /* not implemented yet */ 1.27 -} 1.28 - 1.29 static int sys_hello(void) 1.30 { 1.31 printf("process %d says hello!\n", get_current_pid());
2.1 --- a/src/syscall.h Wed Aug 17 05:37:30 2011 +0300 2.2 +++ b/src/syscall.h Wed Aug 17 05:38:40 2011 +0300 2.3 @@ -4,13 +4,12 @@ 2.4 #define SYSCALL_INT 0x80 2.5 2.6 /* when we get rid of test_proc.S we'll turn this into an enum */ 2.7 -#define SYS_EXIT 0 2.8 -#define SYS_HELLO 1 2.9 -#define SYS_SLEEP 2 2.10 -#define SYS_FORK 3 2.11 -#define SYS_GETPID 4 2.12 +#define SYS_HELLO 0 2.13 +#define SYS_SLEEP 1 2.14 +#define SYS_FORK 2 2.15 +#define SYS_GETPID 3 2.16 2.17 -#define NUM_SYSCALLS 5 2.18 +#define NUM_SYSCALLS 4 2.19 2.20 #ifndef ASM 2.21 void init_syscall(void);