Elliott Hughes | 180edef | 2023-11-02 00:08:05 +0000 | [diff] [blame] | 1 | /* |
| 2 | * This file is auto-generated. Modifications will be lost. |
| 3 | * |
| 4 | * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/ |
| 5 | * for more information. |
| 6 | */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 7 | #ifndef _UAPI_LINUX_SCHED_H |
| 8 | #define _UAPI_LINUX_SCHED_H |
Christopher Ferris | b8a95e2 | 2019-10-02 18:29:20 -0700 | [diff] [blame] | 9 | #include <linux/types.h> |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 10 | #define CSIGNAL 0x000000ff |
| 11 | #define CLONE_VM 0x00000100 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 12 | #define CLONE_FS 0x00000200 |
| 13 | #define CLONE_FILES 0x00000400 |
| 14 | #define CLONE_SIGHAND 0x00000800 |
Christopher Ferris | aeddbcf | 2019-07-08 12:45:46 -0700 | [diff] [blame] | 15 | #define CLONE_PIDFD 0x00001000 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 16 | #define CLONE_PTRACE 0x00002000 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 17 | #define CLONE_VFORK 0x00004000 |
| 18 | #define CLONE_PARENT 0x00008000 |
| 19 | #define CLONE_THREAD 0x00010000 |
| 20 | #define CLONE_NEWNS 0x00020000 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 21 | #define CLONE_SYSVSEM 0x00040000 |
| 22 | #define CLONE_SETTLS 0x00080000 |
| 23 | #define CLONE_PARENT_SETTID 0x00100000 |
| 24 | #define CLONE_CHILD_CLEARTID 0x00200000 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 25 | #define CLONE_DETACHED 0x00400000 |
| 26 | #define CLONE_UNTRACED 0x00800000 |
| 27 | #define CLONE_CHILD_SETTID 0x01000000 |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 28 | #define CLONE_NEWCGROUP 0x02000000 |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 29 | #define CLONE_NEWUTS 0x04000000 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 30 | #define CLONE_NEWIPC 0x08000000 |
| 31 | #define CLONE_NEWUSER 0x10000000 |
| 32 | #define CLONE_NEWPID 0x20000000 |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 33 | #define CLONE_NEWNET 0x40000000 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 34 | #define CLONE_IO 0x80000000 |
Christopher Ferris | d32ca14 | 2020-02-04 16:16:51 -0800 | [diff] [blame] | 35 | #define CLONE_CLEAR_SIGHAND 0x100000000ULL |
Christopher Ferris | af09c70 | 2020-06-01 20:29:29 -0700 | [diff] [blame] | 36 | #define CLONE_INTO_CGROUP 0x200000000ULL |
Christopher Ferris | bb9fcb4 | 2020-04-06 11:38:04 -0700 | [diff] [blame] | 37 | #define CLONE_NEWTIME 0x00000080 |
Christopher Ferris | 9584fa4 | 2019-12-09 15:36:13 -0800 | [diff] [blame] | 38 | #ifndef __ASSEMBLY__ |
Christopher Ferris | b8a95e2 | 2019-10-02 18:29:20 -0700 | [diff] [blame] | 39 | struct clone_args { |
| 40 | __aligned_u64 flags; |
| 41 | __aligned_u64 pidfd; |
| 42 | __aligned_u64 child_tid; |
| 43 | __aligned_u64 parent_tid; |
| 44 | __aligned_u64 exit_signal; |
| 45 | __aligned_u64 stack; |
| 46 | __aligned_u64 stack_size; |
| 47 | __aligned_u64 tls; |
Christopher Ferris | d32ca14 | 2020-02-04 16:16:51 -0800 | [diff] [blame] | 48 | __aligned_u64 set_tid; |
| 49 | __aligned_u64 set_tid_size; |
Christopher Ferris | af09c70 | 2020-06-01 20:29:29 -0700 | [diff] [blame] | 50 | __aligned_u64 cgroup; |
Christopher Ferris | b8a95e2 | 2019-10-02 18:29:20 -0700 | [diff] [blame] | 51 | }; |
Christopher Ferris | 9584fa4 | 2019-12-09 15:36:13 -0800 | [diff] [blame] | 52 | #endif |
| 53 | #define CLONE_ARGS_SIZE_VER0 64 |
Christopher Ferris | d32ca14 | 2020-02-04 16:16:51 -0800 | [diff] [blame] | 54 | #define CLONE_ARGS_SIZE_VER1 80 |
Christopher Ferris | af09c70 | 2020-06-01 20:29:29 -0700 | [diff] [blame] | 55 | #define CLONE_ARGS_SIZE_VER2 88 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 56 | #define SCHED_NORMAL 0 |
| 57 | #define SCHED_FIFO 1 |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 58 | #define SCHED_RR 2 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 59 | #define SCHED_BATCH 3 |
| 60 | #define SCHED_IDLE 5 |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 61 | #define SCHED_DEADLINE 6 |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 62 | #define SCHED_RESET_ON_FORK 0x40000000 |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 63 | #define SCHED_FLAG_RESET_ON_FORK 0x01 |
Christopher Ferris | 1308ad3 | 2017-11-14 17:32:13 -0800 | [diff] [blame] | 64 | #define SCHED_FLAG_RECLAIM 0x02 |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 65 | #define SCHED_FLAG_DL_OVERRUN 0x04 |
Christopher Ferris | b8a95e2 | 2019-10-02 18:29:20 -0700 | [diff] [blame] | 66 | #define SCHED_FLAG_KEEP_POLICY 0x08 |
| 67 | #define SCHED_FLAG_KEEP_PARAMS 0x10 |
| 68 | #define SCHED_FLAG_UTIL_CLAMP_MIN 0x20 |
| 69 | #define SCHED_FLAG_UTIL_CLAMP_MAX 0x40 |
| 70 | #define SCHED_FLAG_KEEP_ALL (SCHED_FLAG_KEEP_POLICY | SCHED_FLAG_KEEP_PARAMS) |
| 71 | #define SCHED_FLAG_UTIL_CLAMP (SCHED_FLAG_UTIL_CLAMP_MIN | SCHED_FLAG_UTIL_CLAMP_MAX) |
| 72 | #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 Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 73 | #endif |