1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
// This file is part of linux-support. It is subject to the license terms in the COPYRIGHT file found in the top-level directory of this distribution and at https://raw.githubusercontent.com/lemonrock/linux-support/master/COPYRIGHT. No part of linux-support, including this file, may be copied, modified, propagated, or distributed except according to the terms contained in the COPYRIGHT file.
// Copyright © 2020 The developers of linux-support. See the COPYRIGHT file in the top-level directory of this distribution and at https://raw.githubusercontent.com/lemonrock/linux-support/master/COPYRIGHT.
// These per-process flags are from `include/linux/sched.h`.
/// I am an IDLE thread.
pub const PF_IDLE: u32 = 0x00000002;
/// Getting shut down.
pub const PF_EXITING: u32 = 0x00000004;
/// I'm a virtual CPU.
pub const PF_VCPU: u32 = 0x00000010;
/// I'm a workqueue worker.
pub const PF_WQ_WORKER: u32 = 0x00000020;
/// Forked but didn't exec.
pub const PF_FORKNOEXEC: u32 = 0x00000040;
/// Process policy on mce errors.
pub const PF_MCE_PROCESS: u32 = 0x00000080;
/// Used super-user privileges.
pub const PF_SUPERPRIV: u32 = 0x00000100;
/// Dumped core.
pub const PF_DUMPCORE: u32 = 0x00000200;
/// Killed by a signal.
pub const PF_SIGNALED: u32 = 0x00000400;
/// Allocating memory.
pub const PF_MEMALLOC: u32 = 0x00000800;
/// `set_user()` noticed that `RLIMIT_NPROC` was exceeded.
pub const PF_NPROC_EXCEEDED: u32 = 0x00001000;
/// If unset the FPU must be initialized before use.
pub const PF_USED_MATH: u32 = 0x00002000;
/// Used `async_schedule*()`, used by module init.
pub const PF_USED_ASYNC: u32 = 0x00004000;
/// This thread should not be frozen.
pub const PF_NOFREEZE: u32 = 0x00008000;
/// Frozen for system suspend.
pub const PF_FROZEN: u32 = 0x00010000;
/// I am `kswapd`.
pub const PF_KSWAPD: u32 = 0x00020000;
/// All allocation requests will inherit `GFP_NOFS`.
pub const PF_MEMALLOC_NOFS: u32 = 0x00040000;
/// All allocation requests will inherit `GFP_NOIO`.
pub const PF_MEMALLOC_NOIO: u32 = 0x00080000;
/// Throttle me less: I clean memory.
pub const PF_LESS_THROTTLE: u32 = 0x00100000;
/// I am a kernel thread.
pub const PF_KTHREAD: u32 = 0x00200000;
/// Randomize virtual address space.
pub const PF_RANDOMIZE: u32 = 0x00400000;
/// Allowed to write to swap.
pub const PF_SWAPWRITE: u32 = 0x00800000;
/// I'm an Usermodehelper process.
pub const PF_UMH: u32 = 0x02000000;
/// Userland is not allowed to meddle with cpus_mask.
pub const PF_NO_SETAFFINITY: u32 = 0x04000000;
/// Early kill for mce process policy.
pub const PF_MCE_EARLY: u32 = 0x08000000;
/// All allocation request will have `_GFP_MOVABLE` cleared.
pub const PF_MEMALLOC_NOCMA: u32 = 0x10000000;
/// Task is an IO worker.
pub const PF_IO_WORKER: u32 = 0x20000000;
/// Freezer should not count it as freezable.
pub const PF_FREEZER_SKIP: u32 = 0x40000000;
/// This thread called `freeze_processes()` and should not be frozen.
pub const PF_SUSPEND_TASK: u32 = 0x80000000;