Implement the practice syscall
In the previous section, you stepped through a user program to the int $0x30 instruction in proj-pregame/src/lib/user/syscall.c and watched it trap into syscall_handler in the kernel. Now you will implement your first system call, practice.
practice takes one integer argument i and returns i + 1.
Task
Implement the practice system call so that the practice-rc test passes. Your change belongs entirely in syscall_handler in proj-pregame/src/userprog/syscall.c.
When you’re done, run pintos-test practice-rc and confirm that practice-rc passes while do-nothing, do-not-much, and stack-align-v still pass.
Hint: Your answer should only be a few lines of code.
Take the time to reflect on how system calls work end to end, how arguments are passed on the user stack, how the kernel reads them, and how a return value is delivered back to the user program. This will come up again in the next project.