getgid.2, getpid.2, getuid.2, pipe.2, syscall.2: Minor tweaks to Eugene's patch

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2019-01-09 19:10:30 +13:00
parent 70ea1968cc
commit 03936fb4ce
5 changed files with 28 additions and 20 deletions

View File

@ -60,9 +60,9 @@ and
.BR getegid () .BR getegid ()
wrapper functions transparently deal with the variations across kernel versions. wrapper functions transparently deal with the variations across kernel versions.
.PP .PP
On Alpha, instead of pair of On Alpha, instead of a pair of
.BR getgid "() and " getegid () .BR getgid "() and " getegid ()
system calls, single system calls, a single
.BR getxgid () .BR getxgid ()
system call is provided, which returns a pair of real and effective GIDs. system call is provided, which returns a pair of real and effective GIDs.
The glibc The glibc
@ -75,7 +75,7 @@ See
for details regarding register mapping. for details regarding register mapping.
Other examples of such peculiarity are Alpha-specific Other examples of such peculiarity are Alpha-specific
.BR getxpid "(2) and " getxuid (2), .BR getxpid "(2) and " getxuid (2),
along with as well as
.BR pipe (2) .BR pipe (2)
on several architectures. on several architectures.
.SH SEE ALSO .SH SEE ALSO

View File

@ -137,9 +137,9 @@ always invoke the actual system call, rather than returning a cached value.
.\" FIXME . .\" FIXME .
.\" Review progress of https://bugzilla.redhat.com/show_bug.cgi?id=1469757 .\" Review progress of https://bugzilla.redhat.com/show_bug.cgi?id=1469757
.PP .PP
On Alpha, instead of pair of On Alpha, instead of a pair of
.BR getpid "() and " getppid () .BR getpid "() and " getppid ()
system calls, single system calls, a single
.BR getxpid () .BR getxpid ()
system call is provided, which returns a pair of PID and parent PID. system call is provided, which returns a pair of PID and parent PID.
The glibc The glibc
@ -152,7 +152,7 @@ See
for details regarding register mapping. for details regarding register mapping.
Other examples of such peculiarity are Alpha-specific Other examples of such peculiarity are Alpha-specific
.BR getxuid "(2) and " getxgid (2), .BR getxuid "(2) and " getxgid (2),
along with as well as
.BR pipe (2) .BR pipe (2)
on several architectures. on several architectures.
.SH SEE ALSO .SH SEE ALSO

View File

@ -71,9 +71,9 @@ and
.BR geteuid () .BR geteuid ()
wrapper functions transparently deal with the variations across kernel versions. wrapper functions transparently deal with the variations across kernel versions.
.PP .PP
On Alpha, instead of pair of On Alpha, instead of a pair of
.BR getuid "() and " geteuid () .BR getuid "() and " geteuid ()
system calls, single system calls, a single
.BR getxuid () .BR getxuid ()
system call is provided, which returns a pair of real and effective UIDs. system call is provided, which returns a pair of real and effective UIDs.
The glibc The glibc
@ -86,7 +86,7 @@ See
for details regarding register mapping. for details regarding register mapping.
Other examples of such peculiarity are Alpha-specific Other examples of such peculiarity are Alpha-specific
.BR getxpid "(2) and " getxgid (2), .BR getxpid "(2) and " getxgid (2),
along with as well as
.BR pipe (2) .BR pipe (2)
on several architectures. on several architectures.
.SH SEE ALSO .SH SEE ALSO

View File

@ -194,21 +194,25 @@ version 2.9.
.SH NOTES .SH NOTES
.\" See http://math-atlas.sourceforge.net/devel/assembly/64.psabi.1.33.ps.Z .\" See http://math-atlas.sourceforge.net/devel/assembly/64.psabi.1.33.ps.Z
.\" for example, section 3.2.1 "Registers and the Stack Frame". .\" for example, section 3.2.1 "Registers and the Stack Frame".
SystemV ABI on some architectures allows using more than one register The SystemV ABI on some architectures allows the use of more than one register
for returning multiple values; several architectures for returning multiple values; several architectures
(namely, Alpha, IA-64, MIPS, SuperH, and SPARC/SPARC64) (namely, Alpha, IA-64, MIPS, SuperH, and SPARC/SPARC64)
(ab)use this feature in order to implement (ab)use this feature in order to implement the
.BR pipe () .BR pipe ()
system call in a functional manner: it doesn't take any arguments and returns system call in a functional manner:
a pair of file descriptors as a return value on success. the call doesn't take any arguments and returns
a pair of file descriptors as the return value on success.
The glibc The glibc
.BR pipe () .BR pipe ()
wrapper function transparently deal with this. wrapper function transparently deals with this.
See See
.BR syscall (2) .BR syscall (2)
for information regarding registers used for storing second file descriptor. for information regarding registers used for storing second file descriptor.
Other examples of such peculiarity are Other examples of such peculiarity are
.BR getxpid (2)/ getxuid (2)/ getxgid (2) .BR getxpid (2),
.BR getxuid (2),
and
.BR getxgid (2)
on Alpha. on Alpha.
.SH CONFORMING TO .SH CONFORMING TO
.BR pipe (): .BR pipe ():

View File

@ -281,15 +281,19 @@ argument in a single register and not two, as is done in every other ABI.
.RE .RE
.IP [6] .IP [6]
Some architectures Some architectures
(namely, Alpha, IA-64, MIPS, SuperH, and SPARC/SPARC64) (namely, Alpha, IA-64, MIPS, SuperH, sparc/32, and sparc/64)
use second return value register in order to pass second return value in use an additional register ("Retval2" in the above table)
to pass back a second return value from the
.BR pipe (2) .BR pipe (2)
system call; system call;
Alpha uses it in the architecture-specific Alpha uses this technique in the architecture-specific
.BR getxpid "(2), " getxuid "(2), and " getxgid (2) .BR getxpid (2),
.BR getxuid (2),
and
.BR getxgid (2)
system calls as well. system calls as well.
Other architectures do not use the second return value register Other architectures do not use the second return value register
in the system call interface, even if it is defined in the SystemV ABI. in the system call interface, even if it is defined in the System V ABI.
.RE .RE
.if t \{\ .if t \{\
.in .in