diff mbox series

[28/39] perf_event_open.2: Use syscall(SYS_...); for system calls without a wrapper

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

Commit Message

Alejandro Colomar \(man-pages\) May 10, 2021, 5:55 p.m. UTC
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
 man2/perf_event_open.2 | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)
diff mbox series

Patch

diff --git a/man2/perf_event_open.2 b/man2/perf_event_open.2
index 1d5d1aada..3bfc7c103 100644
--- a/man2/perf_event_open.2
+++ b/man2/perf_event_open.2
@@ -29,16 +29,21 @@ 
 perf_event_open \- set up performance monitoring
 .SH SYNOPSIS
 .nf
-.B #include <linux/perf_event.h>
-.B #include <linux/hw_breakpoint.h>
+.BR "#include <linux/perf_event.h>" "    /* Definition of " PERF_* " constants */"
+.BR "#include <linux/hw_breakpoint.h>" " /* Definition of " HW_* " constants */"
+.BR "#include <sys/syscall.h>" "         /* Definition of " SYS_* " constants */"
+.B #include <unistd.h>
 .PP
-.BI "int perf_event_open(struct perf_event_attr *" attr ,
-.BI "                    pid_t " pid ", int " cpu ", int " group_fd ,
-.BI "                    unsigned long " flags  );
+.BI "int syscall(SYS_perf_event_open, struct perf_event_attr *" attr ,
+.BI "            pid_t " pid ", int " cpu ", int " group_fd \
+", unsigned long " flags  );
 .fi
 .PP
 .IR Note :
-There is no glibc wrapper for this system call; see NOTES.
+glibc provides no wrapper for
+.BR perf_event_open (),
+necessitating the use of
+.BR syscall (2).
 .SH DESCRIPTION
 Given a list of parameters,
 .BR perf_event_open ()
@@ -3641,10 +3646,6 @@  This
 system call Linux-specific
 and should not be used in programs intended to be portable.
 .SH NOTES
-Glibc does not provide a wrapper for this system call; call it using
-.BR syscall (2).
-See the example below.
-.PP
 The official way of knowing if
 .BR perf_event_open ()
 support is enabled is checking