The system call is usually called through a function, the function returns 0, the execution succeeds, if the call error occurs, the error code will be written to the errno global variable, by calling the Perror () library function, you can translate the variable into the user can understand the error string.
In Linux, each system call is given a system call number. When a user-space process executes a system call, the system call number is used to indicate which system call is being executed. The system call number is critical, and once the assignment can no longer be changed, the compiled application crashes. In addition, if a system call is deleted, the system call number it occupies is not allowed to be recycled, otherwise the previously compiled code calls the system call, but in fact it calls another system call.
Linux system calls are performed faster than many other operating systems. Linux's incredible down-and-down file switching time is an important reason, and access to the kernel is optimized for simplicity and efficiency. Another reason is that the system call handlers and each system call itself are also very concise.