blob: b8f39ddd0a54a87c4c36d57e6f7ef8866b155ea3 [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _UAPI_LINUX_SCHED_H
20#define _UAPI_LINUX_SCHED_H
Christopher Ferrisb8a95e22019-10-02 18:29:20 -070021#include <linux/types.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070022#define CSIGNAL 0x000000ff
23#define CLONE_VM 0x00000100
Ben Cheng655a7c02013-10-16 16:09:24 -070024#define CLONE_FS 0x00000200
25#define CLONE_FILES 0x00000400
26#define CLONE_SIGHAND 0x00000800
Christopher Ferrisaeddbcf2019-07-08 12:45:46 -070027#define CLONE_PIDFD 0x00001000
Ben Cheng655a7c02013-10-16 16:09:24 -070028#define CLONE_PTRACE 0x00002000
Ben Cheng655a7c02013-10-16 16:09:24 -070029#define CLONE_VFORK 0x00004000
30#define CLONE_PARENT 0x00008000
31#define CLONE_THREAD 0x00010000
32#define CLONE_NEWNS 0x00020000
Ben Cheng655a7c02013-10-16 16:09:24 -070033#define CLONE_SYSVSEM 0x00040000
34#define CLONE_SETTLS 0x00080000
35#define CLONE_PARENT_SETTID 0x00100000
36#define CLONE_CHILD_CLEARTID 0x00200000
Ben Cheng655a7c02013-10-16 16:09:24 -070037#define CLONE_DETACHED 0x00400000
38#define CLONE_UNTRACED 0x00800000
39#define CLONE_CHILD_SETTID 0x01000000
Christopher Ferris106b3a82016-08-24 12:15:38 -070040#define CLONE_NEWCGROUP 0x02000000
Christopher Ferris106b3a82016-08-24 12:15:38 -070041#define CLONE_NEWUTS 0x04000000
Ben Cheng655a7c02013-10-16 16:09:24 -070042#define CLONE_NEWIPC 0x08000000
43#define CLONE_NEWUSER 0x10000000
44#define CLONE_NEWPID 0x20000000
Christopher Ferris106b3a82016-08-24 12:15:38 -070045#define CLONE_NEWNET 0x40000000
Ben Cheng655a7c02013-10-16 16:09:24 -070046#define CLONE_IO 0x80000000
Christopher Ferrisd32ca142020-02-04 16:16:51 -080047#define CLONE_CLEAR_SIGHAND 0x100000000ULL
Christopher Ferris9584fa42019-12-09 15:36:13 -080048#ifndef __ASSEMBLY__
Christopher Ferrisb8a95e22019-10-02 18:29:20 -070049struct clone_args {
50 __aligned_u64 flags;
51 __aligned_u64 pidfd;
52 __aligned_u64 child_tid;
53 __aligned_u64 parent_tid;
54 __aligned_u64 exit_signal;
55 __aligned_u64 stack;
56 __aligned_u64 stack_size;
57 __aligned_u64 tls;
Christopher Ferrisd32ca142020-02-04 16:16:51 -080058 __aligned_u64 set_tid;
59 __aligned_u64 set_tid_size;
Christopher Ferrisb8a95e22019-10-02 18:29:20 -070060};
Christopher Ferris9584fa42019-12-09 15:36:13 -080061#endif
62#define CLONE_ARGS_SIZE_VER0 64
Christopher Ferrisd32ca142020-02-04 16:16:51 -080063#define CLONE_ARGS_SIZE_VER1 80
Ben Cheng655a7c02013-10-16 16:09:24 -070064#define SCHED_NORMAL 0
65#define SCHED_FIFO 1
Christopher Ferris106b3a82016-08-24 12:15:38 -070066#define SCHED_RR 2
Ben Cheng655a7c02013-10-16 16:09:24 -070067#define SCHED_BATCH 3
68#define SCHED_IDLE 5
Christopher Ferris38062f92014-07-09 15:33:25 -070069#define SCHED_DEADLINE 6
Christopher Ferris106b3a82016-08-24 12:15:38 -070070#define SCHED_RESET_ON_FORK 0x40000000
Christopher Ferris38062f92014-07-09 15:33:25 -070071#define SCHED_FLAG_RESET_ON_FORK 0x01
Christopher Ferris1308ad32017-11-14 17:32:13 -080072#define SCHED_FLAG_RECLAIM 0x02
Christopher Ferris76a1d452018-06-27 14:12:29 -070073#define SCHED_FLAG_DL_OVERRUN 0x04
Christopher Ferrisb8a95e22019-10-02 18:29:20 -070074#define SCHED_FLAG_KEEP_POLICY 0x08
75#define SCHED_FLAG_KEEP_PARAMS 0x10
76#define SCHED_FLAG_UTIL_CLAMP_MIN 0x20
77#define SCHED_FLAG_UTIL_CLAMP_MAX 0x40
78#define SCHED_FLAG_KEEP_ALL (SCHED_FLAG_KEEP_POLICY | SCHED_FLAG_KEEP_PARAMS)
79#define SCHED_FLAG_UTIL_CLAMP (SCHED_FLAG_UTIL_CLAMP_MIN | SCHED_FLAG_UTIL_CLAMP_MAX)
80#define SCHED_FLAG_ALL (SCHED_FLAG_RESET_ON_FORK | SCHED_FLAG_RECLAIM | SCHED_FLAG_DL_OVERRUN | SCHED_FLAG_KEEP_ALL | SCHED_FLAG_UTIL_CLAMP)
Christopher Ferris38062f92014-07-09 15:33:25 -070081#endif