xref: /linux/tools/perf/perf-sys.h (revision 24bce201d79807b668bf9d9e0aca801c5c0d5f78)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _PERF_SYS_H
3 #define _PERF_SYS_H
4 
5 #include <unistd.h>
6 #include <sys/types.h>
7 #include <sys/syscall.h>
8 #include <linux/compiler.h>
9 
10 struct perf_event_attr;
11 
12 static inline int
13 sys_perf_event_open(struct perf_event_attr *attr,
14 		      pid_t pid, int cpu, int group_fd,
15 		      unsigned long flags)
16 {
17 	return syscall(__NR_perf_event_open, attr, pid, cpu,
18 		       group_fd, flags);
19 }
20 
21 #endif /* _PERF_SYS_H */
22