The return value of the OS system call

The return value of the system call is passed through the dedicated stack area

In the parameter passing process of the system call, different system calls need to pass different parameters to the system subroutine,

Moreover, the execution result of the system call is also returned to the user program in the form of parameters.

Parameter passing between user programs and system programs uses:

1. The parameters that come with the trapping instruction

2. Pass parameters through relevant general-purpose registers

However, due to the short register length, it is impossible to pass more parameters. Therefore, in more systems, most of them open up a dedicated stack area in the memory to pass parameters.

Guess you like

Origin blog.csdn.net/qq_45157635/article/details/120242258