Skip to content

Commit c55c52d

Browse files
committed
Auto merge of #2673 - devnexen:linux_mempolicies_flags, r=Amanieu
linux glibc/android memory policies flags
2 parents c8ca99b + 510c458 commit c55c52d

File tree

6 files changed

+31
-0
lines changed

6 files changed

+31
-0
lines changed

libc-test/build.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1577,6 +1577,7 @@ fn test_android(target: &str) {
15771577
"linux/if_tun.h",
15781578
"linux/magic.h",
15791579
"linux/memfd.h",
1580+
"linux/mempolicy.h",
15801581
"linux/module.h",
15811582
"linux/net_tstamp.h",
15821583
"linux/netfilter/nfnetlink.h",
@@ -2857,6 +2858,7 @@ fn test_linux(target: &str) {
28572858
"linux/keyctl.h",
28582859
"linux/magic.h",
28592860
"linux/memfd.h",
2861+
"linux/mempolicy.h",
28602862
"linux/mman.h",
28612863
"linux/module.h",
28622864
"linux/net_tstamp.h",

libc-test/semver/android.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,6 +1078,11 @@ MNT_EXPIRE
10781078
MNT_FORCE
10791079
MODULE_INIT_IGNORE_MODVERSIONS
10801080
MODULE_INIT_IGNORE_VERMAGIC
1081+
MPOL_BIND
1082+
MPOL_DEFAULT
1083+
MPOL_INTERLEAVE
1084+
MPOL_LOCAL
1085+
MPOL_PREFERRED
10811086
MSDOS_SUPER_MAGIC
10821087
MSG_CMSG_CLOEXEC
10831088
MSG_CONFIRM

libc-test/semver/linux-gnu.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,11 @@ MOD_OFFSET
145145
MOD_STATUS
146146
MOD_TAI
147147
MOD_TIMECONST
148+
MPOL_BIND
149+
MPOL_DEFAULT
150+
MPOL_INTERLEAVE
151+
MPOL_LOCAL
152+
MPOL_PREFERRED
148153
MSDOS_SUPER_MAGIC
149154
MSG_TRYHARD
150155
MS_RELATIME

libc-test/semver/linux-musl.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ AF_XDP
55
AIO_ALLDONE
66
AIO_CANCELED
77
AIO_NOTCANCELED
8+
MPOL_BIND
9+
MPOL_DEFAULT
10+
MPOL_INTERLEAVE
11+
MPOL_LOCAL
12+
MPOL_PREFERRED
813
Elf32_Chdr
914
Elf64_Chdr
1015
LIO_NOP

src/unix/linux_like/android/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2462,6 +2462,13 @@ pub const SCHED_RESET_ON_FORK: ::c_int = 0x40000000;
24622462

24632463
pub const CLONE_PIDFD: ::c_int = 0x1000;
24642464

2465+
// linux/mempolicy.h
2466+
pub const MPOL_DEFAULT: ::c_int = 0;
2467+
pub const MPOL_PREFERRED: ::c_int = 1;
2468+
pub const MPOL_BIND: ::c_int = 2;
2469+
pub const MPOL_INTERLEAVE: ::c_int = 3;
2470+
pub const MPOL_LOCAL: ::c_int = 4;
2471+
24652472
// bits/seek_constants.h
24662473
pub const SEEK_DATA: ::c_int = 3;
24672474
pub const SEEK_HOLE: ::c_int = 4;

src/unix/linux_like/linux/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1477,6 +1477,13 @@ pub const RTLD_NOW: ::c_int = 0x2;
14771477

14781478
pub const AT_EACCESS: ::c_int = 0x200;
14791479

1480+
// linux/mempolicy.h
1481+
pub const MPOL_DEFAULT: ::c_int = 0;
1482+
pub const MPOL_PREFERRED: ::c_int = 1;
1483+
pub const MPOL_BIND: ::c_int = 2;
1484+
pub const MPOL_INTERLEAVE: ::c_int = 3;
1485+
pub const MPOL_LOCAL: ::c_int = 4;
1486+
14801487
align_const! {
14811488
pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
14821489
size: [0; __SIZEOF_PTHREAD_MUTEX_T],

0 commit comments

Comments
 (0)