arch_prctl.2: Use syscall(SYS_...); for system calls without a wrapper

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Alejandro Colomar 2021-04-04 13:58:21 +02:00 committed by Michael Kerrisk
parent 58d15b72da
commit a9a96d8a5b
1 changed files with 5 additions and 9 deletions

View File

@ -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