mirror of https://github.com/mkerrisk/man-pages
intro.2: Describe policy on documenting differences between syscall and glibc API
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
051ec121f0
commit
49bd7f5828
25
man2/intro.2
25
man2/intro.2
|
@ -26,7 +26,7 @@
|
|||
.\" new _syscall(2) page, and substantially enhanced and rewrote
|
||||
.\" the remaining material on this page.
|
||||
.\"
|
||||
.TH INTRO 2 2010-11-11 "Linux" "Linux Programmer's Manual"
|
||||
.TH INTRO 2 2014-02-20 "Linux" "Linux Programmer's Manual"
|
||||
.SH NAME
|
||||
intro \- introduction to system calls
|
||||
.SH DESCRIPTION
|
||||
|
@ -40,6 +40,29 @@ the system call.
|
|||
Thus, making a system call looks the same as invoking a normal
|
||||
library function.
|
||||
|
||||
In many cases, the C library wrapper function does nothing more than:
|
||||
.IP * 3
|
||||
copying arguments and the unique system call number to the
|
||||
registers where the kernel expects them;
|
||||
.IP *
|
||||
trapping to kernel mode,
|
||||
at which point the kernel does the real work of the system call; and
|
||||
.IP *
|
||||
setting
|
||||
.I errno
|
||||
if the system call returns an error number when the kernel returns the
|
||||
CPU to user mode.
|
||||
.LP
|
||||
However, in a few cases, a wrapper function may do rather more than this,
|
||||
for example, performing some preprocessing
|
||||
of the arguments of arguments before trapping to kernel mode,
|
||||
or postprocessing of values returned by the system call.
|
||||
Where this is the case, the manual pages in Section 2 generally
|
||||
try to note the details of both the (usually GNU) C library API
|
||||
interface and the raw system call.
|
||||
Most commonly, the main DESCRIPTION will focus on the C library interface,
|
||||
and differences for the system call are covered in the NOTES section.
|
||||
|
||||
For a list of the Linux system calls, see
|
||||
.BR syscalls (2).
|
||||
.SH RETURN VALUE
|
||||
|
|
Loading…
Reference in New Issue