finish syscall() in kern/syscall.c