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

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

Commit Message

Wilco Dijkstra via Libc-alpha April 4, 2021, 11:58 a.m.
<linux/unistd.h> is not needed.  We need <unistd.h> for syscall(),
and <sys/syscall.h> for SYS_exit_group.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>

---
 man2/exit_group.2 | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

-- 
2.31.0

Comments

Wilco Dijkstra via Libc-alpha April 5, 2021, 11:36 a.m. | #1
Hi Alex,

On 4/4/21 1:58 PM, Alejandro Colomar wrote:
> <linux/unistd.h> is not needed.  We need <unistd.h> for syscall(),

> and <sys/syscall.h> for SYS_exit_group.

> 

> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>


Patch applied.

Thanks,

Michael


> ---

>  man2/exit_group.2 | 5 +++--

>  1 file changed, 3 insertions(+), 2 deletions(-)

> 

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

> index 4fd314262..b512927d4 100644

> --- a/man2/exit_group.2

> +++ b/man2/exit_group.2

> @@ -27,9 +27,10 @@

>  exit_group \- exit all threads in a process

>  .SH SYNOPSIS

>  .nf

> -.B #include <linux/unistd.h>

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

> +.B #inlcude <unistd.h>

>  .PP

> -.BI "noreturn void exit_group(int " status );

> +.BI "noreturn void syscall(SYS_exit_group, int " status );

>  .fi

>  .SH DESCRIPTION

>  This system call is equivalent to

> 



-- 
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/exit_group.2 b/man2/exit_group.2
index 4fd314262..b512927d4 100644
--- a/man2/exit_group.2
+++ b/man2/exit_group.2
@@ -27,9 +27,10 @@ 
 exit_group \- exit all threads in a process
 .SH SYNOPSIS
 .nf
-.B #include <linux/unistd.h>
+.BR "#include <sys/syscall.h>" "       /* Definition of " SYS_* " constants */"
+.B #inlcude <unistd.h>
 .PP
-.BI "noreturn void exit_group(int " status );
+.BI "noreturn void syscall(SYS_exit_group, int " status );
 .fi
 .SH DESCRIPTION
 This system call is equivalent to