Skip to content

Commit

Permalink
Add missing constants for Android
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez authored and JohnTitor committed Jan 30, 2024
1 parent b56e4b3 commit 738f901
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions src/unix/linux_like/android/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3468,6 +3468,37 @@ pub const NET_DCCP: ::c_int = 20;
pub const HUGETLB_FLAG_ENCODE_SHIFT: ::c_int = 26;
pub const MAP_HUGE_SHIFT: ::c_int = HUGETLB_FLAG_ENCODE_SHIFT;

// include/linux/sched.h
pub const PF_VCPU: ::c_int = 0x00000001;
pub const PF_IDLE: ::c_int = 0x00000002;
pub const PF_EXITING: ::c_int = 0x00000004;
pub const PF_POSTCOREDUMP: ::c_int = 0x00000008;
pub const PF_IO_WORKER: ::c_int = 0x00000010;
pub const PF_WQ_WORKER: ::c_int = 0x00000020;
pub const PF_FORKNOEXEC: ::c_int = 0x00000040;
pub const PF_MCE_PROCESS: ::c_int = 0x00000080;
pub const PF_SUPERPRIV: ::c_int = 0x00000100;
pub const PF_DUMPCORE: ::c_int = 0x00000200;
pub const PF_SIGNALED: ::c_int = 0x00000400;
pub const PF_MEMALLOC: ::c_int = 0x00000800;
pub const PF_NPROC_EXCEEDED: ::c_int = 0x00001000;
pub const PF_USED_MATH: ::c_int = 0x00002000;
pub const PF_USER_WORKER: ::c_int = 0x00004000;
pub const PF_NOFREEZE: ::c_int = 0x00008000;

pub const PF_KSWAPD: ::c_int = 0x00020000;
pub const PF_MEMALLOC_NOFS: ::c_int = 0x00040000;
pub const PF_MEMALLOC_NOIO: ::c_int = 0x00080000;
pub const PF_LOCAL_THROTTLE: ::c_int = 0x00100000;
pub const PF_KTHREAD: ::c_int = 0x00200000;
pub const PF_RANDOMIZE: ::c_int = 0x00400000;

pub const PF_NO_SETAFFINITY: ::c_int = 0x04000000;
pub const PF_MCE_EARLY: ::c_int = 0x08000000;
pub const PF_MEMALLOC_PIN: ::c_int = 0x10000000;

pub const PF_SUSPEND_TASK: ::c_int = 0x80000000;

// Most `*_SUPER_MAGIC` constants are defined at the `linux_like` level; the
// following are only available on newer Linux versions than the versions
// currently used in CI in some configurations, so we define them here.
Expand Down

0 comments on commit 738f901

Please sign in to comment.