|Syscall related support|
The system calls are actually called from arch/mips/mips/syscall.c. Pointer arguments are cast to userptr_t in order to use the compiler to help prevent accidentally dereferencing user-supplied pointers without calling copyin/copyout/copyinstr/copyoutstr properly. The in-kernel prototypes for the system call functions are defined in include/syscall.h. They use the same error reporting/return value handling as the rest of the kernel: the return value of the function is an error code (0 for success) and any additional integer return value to be returned from the system call (such as with read or write) is handed back as an additional pointer argument.