[v5,08/35] arch_prctl.2: Use syscall(SYS_...); for system calls without a wrapper

Message ID 20210404115847.78166-9-alx.manpages@gmail.com
State New
Headers show
Series
  • Untitled series #36391
Related show

Commit Message

Noah Goldstein via Libc-alpha April 4, 2021, 11:58 a.m.
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>

---
 man2/arch_prctl.2 | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

-- 
2.31.0

Comments

Noah Goldstein via Libc-alpha April 5, 2021, 11:25 a.m. | #1
Hi Alex,

On 4/4/21 1:58 PM, Alejandro Colomar wrote:
> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>

> ---

>  man2/arch_prctl.2 | 14 +++++---------

>  1 file changed, 5 insertions(+), 9 deletions(-)



Patch applied.

Thanks,

Michael


> diff --git a/man2/arch_prctl.2 b/man2/arch_prctl.2

> index 1ddeca595..f8073d625 100644

> --- a/man2/arch_prctl.2

> +++ b/man2/arch_prctl.2

> @@ -27,15 +27,14 @@

>  arch_prctl \- set architecture-specific thread state

>  .SH SYNOPSIS

>  .nf

> -.B #include <asm/prctl.h>

> +.BR "#include <asm/prctl.h>" "        /* Definition of " ARCH_* " constants */"

>  .B #include <sys/prctl.h>

> +.BR "#include <sys/syscall.h>" "      /* Definition of " SYS_* " constants */"

> +.B #include <unistd.h>

>  .PP

> -.BI "int arch_prctl(int " code ", unsigned long " addr );

> -.BI "int arch_prctl(int " code ", unsigned long *" addr );

> +.BI "int syscall(SYS_arch_prctl, int " code ", unsigned long " addr );

> +.BI "int syscall(SYS_arch_prctl, int " code ", unsigned long *" addr );

>  .fi

> -.PP

> -.IR Note :

> -There is no glibc wrapper for this system call; see NOTES.

>  .SH DESCRIPTION

>  .BR arch_prctl ()

>  sets architecture-specific process or thread state.

> @@ -177,9 +176,6 @@ and

>  in the same thread is dangerous, as they may overwrite each other's

>  TLS entries.

>  .PP

> -Glibc does not provide a wrapper for this system call; call it using

> -.BR syscall (2).

> -.PP

>  .I FS

>  may be already used by the threading library.

>  Programs that use

> 



-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

Patch

diff --git a/man2/arch_prctl.2 b/man2/arch_prctl.2
index 1ddeca595..f8073d625 100644
--- a/man2/arch_prctl.2
+++ b/man2/arch_prctl.2
@@ -27,15 +27,14 @@ 
 arch_prctl \- set architecture-specific thread state
 .SH SYNOPSIS
 .nf
-.B #include <asm/prctl.h>
+.BR "#include <asm/prctl.h>" "        /* Definition of " ARCH_* " constants */"
 .B #include <sys/prctl.h>
+.BR "#include <sys/syscall.h>" "      /* Definition of " SYS_* " constants */"
+.B #include <unistd.h>
 .PP
-.BI "int arch_prctl(int " code ", unsigned long " addr );
-.BI "int arch_prctl(int " code ", unsigned long *" addr );
+.BI "int syscall(SYS_arch_prctl, int " code ", unsigned long " addr );
+.BI "int syscall(SYS_arch_prctl, int " code ", unsigned long *" addr );
 .fi
-.PP
-.IR Note :
-There is no glibc wrapper for this system call; see NOTES.
 .SH DESCRIPTION
 .BR arch_prctl ()
 sets architecture-specific process or thread state.
@@ -177,9 +176,6 @@  and
 in the same thread is dangerous, as they may overwrite each other's
 TLS entries.
 .PP
-Glibc does not provide a wrapper for this system call; call it using
-.BR syscall (2).
-.PP
 .I FS
 may be already used by the threading library.
 Programs that use