public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* manual: add syscall list appendix
@ 2024-05-15 20:52 DJ Delorie
  2024-05-16  5:02 ` Florian Weimer
  0 siblings, 1 reply; 38+ messages in thread
From: DJ Delorie @ 2024-05-15 20:52 UTC (permalink / raw)
  To: libc-alpha


[the choice, wording, and formatting is - I admit - rough, but this
was the best I could come up with without feedback ;]

diff --git a/manual/Makefile b/manual/Makefile
index b5fda4a7ae..1e2800f409 100644
--- a/manual/Makefile
+++ b/manual/Makefile
@@ -55,7 +55,8 @@ examples = $(filter %.c.texi, $(texis))
 
 # Generated files directly included from libc.texinfo.
 libc-texi-generated = chapters.texi top-menu.texi dir-add.texi \
-		      libm-err.texi version.texi pkgvers.texi
+		      libm-err.texi version.texi pkgvers.texi \
+		      syscalls.texi
 
 # Add path to build dir for generated files
 texis-path := $(filter-out $(libc-texi-generated) summary.texi $(examples), \
@@ -138,6 +139,18 @@ $(objpfx)%.c.texi: examples/%.c
 	    $< | expand > $@.new
 	mv -f $@.new $@
 
+# Generate a list of wrapped syscalls
+$(objpfx)syscalls.texi: $(objpfx)stamp-syscalls ;
+$(objpfx)stamp-syscalls: $(common-objpfx)config.make
+	cat `find ../sysdeps -name syscalls.list -print` \
+	| sed -e '/^[^_a-zA-Z]/d' \
+	      -e 's/[ \t].*//' \
+	      -e 's/^/@code{/; s/$$/}/' \
+	| sort -u \
+	> $(objpfx)syscalls-tmp
+	$(move-if-change) $(objpfx)syscalls-tmp $(objpfx)syscalls.texi
+	touch $@
+
 $(objpfx)%.info: %.texinfo
 	LANGUAGE=C LC_ALL=C $(MAKEINFO) -P $(objpfx) --output=$@ $<
 
diff --git a/manual/platform.texi b/manual/platform.texi
index 478b6fdcdf..92541208a5 100644
--- a/manual/platform.texi
+++ b/manual/platform.texi
@@ -2,12 +2,13 @@
 @c %MENU% Describe all platform-specific facilities provided
 @appendix Platform-specific facilities
 
-@Theglibc{} can provide machine-specific functionality.
+@Theglibc{} can provide machine-specific and kernel-specific functionality.
 
 @menu
 * PowerPC::           Facilities Specific to the PowerPC Architecture
 * RISC-V::            Facilities Specific to the RISC-V Architecture
 * X86::               Facilities Specific to the X86 Architecture
+* Syscalls::	      System Call Interface for Supported Kernels
 @end menu
 
 @node PowerPC
@@ -772,3 +773,21 @@ avx_active (void)
   return CPU_FEATURE_ACTIVE (AVX);
 @}
 @end smallexample
+
+@node Syscalls
+@appendixsec Kernel System Calls
+
+@Theglibc{} provides, in addition to its own API, an interface to the
+kernel for which it's configured.  This interface is a purely
+mechanical translation from the kernel's ABI to the C ABI.  Where such
+functions are not otherwise documented in this manual, please refer to
+the relvent kernel's documentation (for the Linux kernel, this is the
+@uref{https://www.kernel.org/doc/man-pages/,Linux man-pages Project})
+for information on calling these functions.
+
+The comprehensive list of kernel system calls that may be mapped to C
+functions follows.  Note that this list includes calls for all kernels
+@theglibc{} supports, whereas in the real world only those calls
+supported by the configured and/or running kernel will be available.
+
+@include{syscalls.texi}


^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2024-05-23 21:18 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-15 20:52 manual: add syscall list appendix DJ Delorie
2024-05-16  5:02 ` Florian Weimer
2024-05-16 11:44   ` Carlos O'Donell
2024-05-16 12:06     ` Florian Weimer
2024-05-16 13:37     ` Alejandro Colomar
2024-05-16 14:52       ` Carlos O'Donell
2024-05-16 15:03         ` Alejandro Colomar
2024-05-16 17:57       ` DJ Delorie
2024-05-16 17:55     ` DJ Delorie
2024-05-16 21:08       ` Alejandro Colomar
2024-05-17 13:21       ` Carlos O'Donell
2024-05-17 15:31         ` DJ Delorie
2024-05-17 19:16           ` Carlos O'Donell
2024-05-20 21:43             ` [patch v2] manual: add syscall list DJ Delorie
2024-05-20 22:10               ` Alejandro Colomar
2024-05-21  1:12                 ` DJ Delorie
2024-05-21 10:22                   ` Alejandro Colomar
2024-05-21 17:16                     ` DJ Delorie
2024-05-21 20:04                 ` [patch v3] " DJ Delorie
2024-05-22 19:07                   ` Carlos O'Donell
2024-05-22 19:40                     ` DJ Delorie
2024-05-22 19:41                     ` [patch v4] " DJ Delorie
2024-05-22 19:42                       ` DJ Delorie
2024-05-22 20:54                       ` Florian Weimer
2024-05-22 21:00                         ` Florian Weimer
2024-05-22 21:26                         ` DJ Delorie
2024-05-23  7:31                           ` Florian Weimer
2024-05-23  8:49                             ` Andreas Schwab
2024-05-22 22:45                       ` DJ Delorie
2024-05-22 23:12                       ` Alejandro Colomar
2024-05-23 16:59                       ` Zack Weinberg
2024-05-23 19:38                         ` DJ Delorie
2024-05-23 19:41                           ` Zack Weinberg
2024-05-23 19:46                             ` DJ Delorie
2024-05-23 19:51                             ` Joseph Myers
2024-05-23 21:18                         ` Alejandro Colomar
2024-05-16 17:37   ` manual: add syscall list appendix DJ Delorie
2024-05-16 17:55     ` Joe Simmons-Talbott

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).