[4] Linux Network Programming system calls

Disclaimer: This article is a blogger original article, shall not be reproduced without the bloggers allowed. https://blog.csdn.net/zztingfeng/article/details/90573320

Kernel version: Linux-4.19

Providing services to run on its operating system call on the process through the system.
So, in the application, invoking a system call is the process like?
We call xyz with a hypothetical system () for example, describes all aspects of a system call.

Description:

As shown above, the flow system calls is as follows:
1. The application code calls XYZ (), the function is a library function call packaging system;
2. XYZ library function () is responsible for preparing the parameters passed to the kernel, and trigger soft interrupt to switch to kernel;
the soft interrupt 3. CPU is interrupted by executing the interrupt handler, i.e., the system call handler (the system_call);
4. the system call handler system call service routine (sys_xyz), the processing actually starts the system calls.

Implement a system call from Glibc, almost all C programs should call the library function dynamic link library libc.so Glibc in. The source library functions are not visible, and the like may be compiled by decompilation tools objdump or gdb code, find out the process substantially.

Guess you like

Origin blog.csdn.net/zztingfeng/article/details/90573320