[35/39] process_madvise.2: Use syscall(SYS_...); for system calls without a wrapper. Fix includes too.

Message ID 20210510175546.28445-36-alx.manpages@gmail.com
State New
Headers show
Series
  • man2: SYNOPSIS: Fix headers, use syscall(), and other fixes
Related show

Commit Message

Carlos O'Donell via Libc-alpha May 10, 2021, 5:55 p.m.
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>

---
 man2/process_madvise.2 | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

-- 
2.31.1

Patch

diff --git a/man2/process_madvise.2 b/man2/process_madvise.2
index e2b8c16ac..0cdcf9c9a 100644
--- a/man2/process_madvise.2
+++ b/man2/process_madvise.2
@@ -30,15 +30,22 @@ 
 process_madvise \- give advice about use of memory to a process
 .SH SYNOPSIS
 .nf
-.B #include <sys/uio.h>
+.BR "#include <sys/mman.h>" "      /* Definition of " MADV_* " constants */"
+.BR "#include <sys/syscall.h>" "   /* Definition of " SYS_* " constants */"
+.BR "#include <sys/uio.h>" "       /* Definition of " "struct iovec" " type */"
+.B #include <unistd.h>
 .PP
-.BI "ssize_t process_madvise(int " pidfd ", const struct iovec *" iovec ,
-.BI "                        size_t " vlen ", int " advice ,
-.BI "                        unsigned int " flags ");"
+.BI "ssize_t syscall(SYS_process_madvise, int " pidfd ,
+.BI "                const struct iovec *" iovec ", size_t " vlen \
+", int " advice ,
+.BI "                unsigned int " flags ");"
 .fi
 .PP
 .IR Note :
-There is no glibc wrapper for this system call; see NOTES.
+glibc provides no wrapper for
+.BR process_madvise (),
+necessitating the use of
+.BR syscall (2).
 .\" FIXME: See <https://sourceware.org/bugzilla/show_bug.cgi?id=27380>
 .SH DESCRIPTION
 The
@@ -205,9 +212,6 @@  configuration option.
 The
 .BR process_madvise ()
 system call is Linux-specific.
-.SH NOTES
-Glibc does not provide a wrapper for this system call; call it using
-.BR syscall (2).
 .SH SEE ALSO
 .BR madvise (2),
 .BR pidfd_open (2),