[userprog] refactor syscall handler