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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Alejandro Colomar <alx.manpages@xxxxxxxxx>
---
 man2/perf_event_open.2 | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

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




[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux