# HG changeset patch # User John Tsiombikas # Date 1313548720 -10800 # Node ID 5b29b15c541246876e587f7b7dee72737a6586a0 # Parent 39188bbe8638a47f2c69e1bff8df95d1e44eb140 removed the unimplemented exit syscall diff -r 39188bbe8638 -r 5b29b15c5412 src/syscall.c --- a/src/syscall.c Wed Aug 17 05:37:30 2011 +0300 +++ b/src/syscall.c Wed Aug 17 05:38:40 2011 +0300 @@ -9,7 +9,6 @@ static void syscall(int inum); -static int sys_exit(int status); static int sys_hello(void); static int sys_sleep(int sec); static int sys_fork(void); @@ -17,7 +16,6 @@ void init_syscall(void) { - sys_func[SYS_EXIT] = sys_exit; sys_func[SYS_HELLO] = sys_hello; sys_func[SYS_SLEEP] = sys_sleep; sys_func[SYS_FORK] = sys_fork; @@ -45,12 +43,6 @@ frm->regs.eax = sys_func[idx](frm->regs.ebx, frm->regs.ecx, frm->regs.edx, frm->regs.esi, frm->regs.edi); } -static int sys_exit(int status) -{ - printf("SYSCALL: exit\n"); - return -1; /* not implemented yet */ -} - static int sys_hello(void) { printf("process %d says hello!\n", get_current_pid()); diff -r 39188bbe8638 -r 5b29b15c5412 src/syscall.h --- a/src/syscall.h Wed Aug 17 05:37:30 2011 +0300 +++ b/src/syscall.h Wed Aug 17 05:38:40 2011 +0300 @@ -4,13 +4,12 @@ #define SYSCALL_INT 0x80 /* when we get rid of test_proc.S we'll turn this into an enum */ -#define SYS_EXIT 0 -#define SYS_HELLO 1 -#define SYS_SLEEP 2 -#define SYS_FORK 3 -#define SYS_GETPID 4 +#define SYS_HELLO 0 +#define SYS_SLEEP 1 +#define SYS_FORK 2 +#define SYS_GETPID 3 -#define NUM_SYSCALLS 5 +#define NUM_SYSCALLS 4 #ifndef ASM void init_syscall(void);