aboutsummaryrefslogtreecommitdiff
path: root/manual/startup.texi
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2024-07-08 17:52:15 -0400
committerAndreas K. Hüttel <dilfridge@gentoo.org>2024-07-09 11:54:29 +0200
commit6c0be74305745c8f78bcfb69442c8c379459d99b (patch)
treefac67d679685e56d7c379911f5803332592d9317 /manual/startup.texi
parent2213b37b705843908355a89648017f4e597b2bbb (diff)
downloadglibc-6c0be74305745c8f78bcfb69442c8c379459d99b.zip
glibc-6c0be74305745c8f78bcfb69442c8c379459d99b.tar.gz
glibc-6c0be74305745c8f78bcfb69442c8c379459d99b.tar.bz2
manual: add syscalls
The purpose of this patch is to add some system calls that (1) aren't otherwise documented, and (2) are merely redirected to the kernel, so can refer to their documentation; and define a standard way of doing so in the future. A more detailed explaination of how system calls are wrapped is added along with reference to the Linux Man-Pages project. Default version of man-pages is in configure.ac but can be overridden by --with-man-pages=X.Y Reviewed-by: Alejandro Colomar <alx@kernel.org>
Diffstat (limited to 'manual/startup.texi')
-rw-r--r--manual/startup.texi22
1 files changed, 21 insertions, 1 deletions
diff --git a/manual/startup.texi b/manual/startup.texi
index 224dd98..747beed 100644
--- a/manual/startup.texi
+++ b/manual/startup.texi
@@ -689,7 +689,25 @@ you don't need to know about it because you can just use @theglibc{}'s
@code{chmod} function.
@cindex kernel call
-System calls are sometimes called kernel calls.
+System calls are sometimes called syscalls or kernel calls, and this
+interface is mostly a purely mechanical translation from the kernel's
+ABI to the C ABI. For the set of syscalls where we do not guarantee
+POSIX Thread cancellation the wrappers only organize the incoming
+arguments from the C calling convention to the calling convention of
+the target kernel. For the set of syscalls where we provided POSIX
+Thread cancellation the wrappers set some internal state in the
+library to support cancellation, but this does not impact the
+behaviour of the syscall provided by the kernel.
+
+In some cases, if @theglibc{} detects that a system call has been
+superseded by a more capable one, the wrapper may map the old call to
+the new one. For example, @code{dup2} is implemented via @code{dup3}
+by passing an additional empty flags argument, and @code{open} calls
+@code{openat} passing the additional @code{AT_FDCWD}. Sometimes even
+more is done, such as converting between 32-bit and 64-bit time
+values. In general, though, such processing is only to make the
+system call better match the C ABI, rather than change its
+functionality.
However, there are times when you want to make a system call explicitly,
and for that, @theglibc{} provides the @code{syscall} function.
@@ -711,6 +729,8 @@ we won't describe it here either because anyone who is coding
library source code as a specification of the interface between them
anyway.
+@code{syscall} does not provide cancellation logic, even if the system
+call you're calling is listed as cancellable above.
@code{syscall} is declared in @file{unistd.h}.