Skip to content

Commit b18aabe

Browse files
committed
tools headers: Sync uapi/linux/fcntl.h with the kernel source
To pick up the changes in this cset: 3941e37 uapi/fcntl: add FD_PIDFS_ROOT cd5d200 uapi/fcntl: add FD_INVALID 67fcec2 fcntl/pidfd: redefine PIDFD_SELF_THREAD_GROUP a4c746f uapi/fcntl: mark range as reserved This addresses these perf build warnings: Warning: Kernel ABI header differences: diff -u tools/perf/trace/beauty/include/uapi/linux/fcntl.h include/uapi/linux/fcntl.h Please see tools/include/uapi/README for further details. Cc: Christian Brauner <[email protected]> Cc: [email protected] Signed-off-by: Namhyung Kim <[email protected]>
1 parent 52174e0 commit b18aabe

File tree

1 file changed

+18
-0
lines changed
  • tools/perf/trace/beauty/include/uapi/linux

1 file changed

+18
-0
lines changed

tools/perf/trace/beauty/include/uapi/linux/fcntl.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,28 @@
9090
#define DN_ATTRIB 0x00000020 /* File changed attibutes */
9191
#define DN_MULTISHOT 0x80000000 /* Don't remove notifier */
9292

93+
/* Reserved kernel ranges [-100], [-10000, -40000]. */
9394
#define AT_FDCWD -100 /* Special value for dirfd used to
9495
indicate openat should use the
9596
current working directory. */
9697

98+
/*
99+
* The concept of process and threads in userland and the kernel is a confusing
100+
* one - within the kernel every thread is a 'task' with its own individual PID,
101+
* however from userland's point of view threads are grouped by a single PID,
102+
* which is that of the 'thread group leader', typically the first thread
103+
* spawned.
104+
*
105+
* To cut the Gideon knot, for internal kernel usage, we refer to
106+
* PIDFD_SELF_THREAD to refer to the current thread (or task from a kernel
107+
* perspective), and PIDFD_SELF_THREAD_GROUP to refer to the current thread
108+
* group leader...
109+
*/
110+
#define PIDFD_SELF_THREAD -10000 /* Current thread. */
111+
#define PIDFD_SELF_THREAD_GROUP -10001 /* Current thread group leader. */
112+
113+
#define FD_PIDFS_ROOT -10002 /* Root of the pidfs filesystem */
114+
#define FD_INVALID -10009 /* Invalid file descriptor: -10000 - EBADF = -10009 */
97115

98116
/* Generic flags for the *at(2) family of syscalls. */
99117

0 commit comments

Comments
 (0)