UPSTREAM: selftests/pidfd: add new PIDFD_SELF* defines
They will be needed in selftests in follow-up patches. Signed-off-by: Christian Brauner <brauner@kernel.org> (cherry picked from commit e943271f7956e439e4c9ef3b7a13f7f00f6c9885) Bug: 402449065 Change-Id: Ib7f535613edd87e0d2975358e8794db197af2ecf Signed-off-by: Suren Baghdasaryan <surenb@google.com>
This commit is contained in:
committed by
Carlos Llamas
parent
1734a4ad6b
commit
7a879200c9
@@ -50,6 +50,22 @@
|
|||||||
#define PIDFD_NONBLOCK O_NONBLOCK
|
#define PIDFD_NONBLOCK O_NONBLOCK
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef PIDFD_SELF_THREAD
|
||||||
|
#define PIDFD_SELF_THREAD -10000 /* Current thread. */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef PIDFD_SELF_THREAD_GROUP
|
||||||
|
#define PIDFD_SELF_THREAD_GROUP -20000 /* Current thread group leader. */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef PIDFD_SELF
|
||||||
|
#define PIDFD_SELF PIDFD_SELF_THREAD
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef PIDFD_SELF_PROCESS
|
||||||
|
#define PIDFD_SELF_PROCESS PIDFD_SELF_THREAD_GROUP
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The kernel reserves 300 pids via RESERVED_PIDS in kernel/pid.c
|
* The kernel reserves 300 pids via RESERVED_PIDS in kernel/pid.c
|
||||||
* That means, when it wraps around any pid < 300 will be skipped.
|
* That means, when it wraps around any pid < 300 will be skipped.
|
||||||
|
|||||||
Reference in New Issue
Block a user