Skip to content

Commit ccf8a3e

Browse files
authored
Merge pull request #3554 from GuillaumeGomez/update-0.2
Backport of #3546 and update crate version to 0.2.153
2 parents 036fe2e + 3726d14 commit ccf8a3e

File tree

4 files changed

+62
-3
lines changed

4 files changed

+62
-3
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "libc"
3-
version = "0.2.152"
3+
version = "0.2.153"
44
authors = ["The Rust Project Developers"]
55
license = "MIT OR Apache-2.0"
66
readme = "README.md"

libc-test/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "libc-test"
3-
version = "0.2.152"
3+
version = "0.2.153"
44
authors = ["The Rust Project Developers"]
55
license = "MIT OR Apache-2.0"
66
build = "build.rs"
@@ -12,7 +12,7 @@ A test crate for the libc crate.
1212

1313
[dependencies.libc]
1414
path = ".."
15-
version = "0.2.152"
15+
version = "0.2.153"
1616
default-features = false
1717

1818
[build-dependencies]

libc-test/build.rs

+28
Original file line numberDiff line numberDiff line change
@@ -1912,6 +1912,34 @@ fn test_android(target: &str) {
19121912
// FIXME: The value has been changed on r26b:
19131913
| "SYS_syscalls" if aarch64 => true,
19141914

1915+
// From `<include/linux/sched.h>`.
1916+
| "PF_VCPU"
1917+
| "PF_IDLE"
1918+
| "PF_EXITING"
1919+
| "PF_POSTCOREDUMP"
1920+
| "PF_IO_WORKER"
1921+
| "PF_WQ_WORKER"
1922+
| "PF_FORKNOEXEC"
1923+
| "PF_SUPERPRIV"
1924+
| "PF_DUMPCORE"
1925+
| "PF_MCE_PROCESS"
1926+
| "PF_SIGNALED"
1927+
| "PF_MEMALLOC"
1928+
| "PF_NPROC_EXCEEDED"
1929+
| "PF_USED_MATH"
1930+
| "PF_USER_WORKER"
1931+
| "PF_NOFREEZE"
1932+
| "PF_KSWAPD"
1933+
| "PF_MEMALLOC_NOFS"
1934+
| "PF_MEMALLOC_NOIO"
1935+
| "PF_LOCAL_THROTTLE"
1936+
| "PF_KTHREAD"
1937+
| "PF_RANDOMIZE"
1938+
| "PF_NO_SETAFFINITY"
1939+
| "PF_MCE_EARLY"
1940+
| "PF_MEMALLOC_PIN"
1941+
| "PF_SUSPEND_TASK" => true,
1942+
19151943
_ => false,
19161944
}
19171945
});

src/unix/linux_like/android/mod.rs

+31
Original file line numberDiff line numberDiff line change
@@ -3470,6 +3470,37 @@ pub const NET_DCCP: ::c_int = 20;
34703470
pub const HUGETLB_FLAG_ENCODE_SHIFT: ::c_int = 26;
34713471
pub const MAP_HUGE_SHIFT: ::c_int = HUGETLB_FLAG_ENCODE_SHIFT;
34723472

3473+
// include/linux/sched.h
3474+
pub const PF_VCPU: ::c_int = 0x00000001;
3475+
pub const PF_IDLE: ::c_int = 0x00000002;
3476+
pub const PF_EXITING: ::c_int = 0x00000004;
3477+
pub const PF_POSTCOREDUMP: ::c_int = 0x00000008;
3478+
pub const PF_IO_WORKER: ::c_int = 0x00000010;
3479+
pub const PF_WQ_WORKER: ::c_int = 0x00000020;
3480+
pub const PF_FORKNOEXEC: ::c_int = 0x00000040;
3481+
pub const PF_MCE_PROCESS: ::c_int = 0x00000080;
3482+
pub const PF_SUPERPRIV: ::c_int = 0x00000100;
3483+
pub const PF_DUMPCORE: ::c_int = 0x00000200;
3484+
pub const PF_SIGNALED: ::c_int = 0x00000400;
3485+
pub const PF_MEMALLOC: ::c_int = 0x00000800;
3486+
pub const PF_NPROC_EXCEEDED: ::c_int = 0x00001000;
3487+
pub const PF_USED_MATH: ::c_int = 0x00002000;
3488+
pub const PF_USER_WORKER: ::c_int = 0x00004000;
3489+
pub const PF_NOFREEZE: ::c_int = 0x00008000;
3490+
3491+
pub const PF_KSWAPD: ::c_int = 0x00020000;
3492+
pub const PF_MEMALLOC_NOFS: ::c_int = 0x00040000;
3493+
pub const PF_MEMALLOC_NOIO: ::c_int = 0x00080000;
3494+
pub const PF_LOCAL_THROTTLE: ::c_int = 0x00100000;
3495+
pub const PF_KTHREAD: ::c_int = 0x00200000;
3496+
pub const PF_RANDOMIZE: ::c_int = 0x00400000;
3497+
3498+
pub const PF_NO_SETAFFINITY: ::c_int = 0x04000000;
3499+
pub const PF_MCE_EARLY: ::c_int = 0x08000000;
3500+
pub const PF_MEMALLOC_PIN: ::c_int = 0x10000000;
3501+
3502+
pub const PF_SUSPEND_TASK: ::c_int = 0x80000000;
3503+
34733504
// Most `*_SUPER_MAGIC` constants are defined at the `linux_like` level; the
34743505
// following are only available on newer Linux versions than the versions
34753506
// currently used in CI in some configurations, so we define them here.

0 commit comments

Comments
 (0)