diff options
author | David Carlier <devnexen@gmail.com> | 2022-02-06 11:42:03 +0000 |
---|---|---|
committer | David Carlier <devnexen@gmail.com> | 2022-02-08 15:18:56 +0000 |
commit | 510c45896a6987af77fa15cc2c37c049b6d375be (patch) | |
tree | 2bd1a33daa72f281409a991be2a45e207c46784a /src | |
parent | 34a98891731893886ac6101a7ce9c328330251d0 (diff) | |
download | rust-libc-510c45896a6987af77fa15cc2c37c049b6d375be.tar.gz |
linux glibc/android memory policies flags
Diffstat (limited to 'src')
-rw-r--r-- | src/unix/linux_like/android/mod.rs | 7 | ||||
-rw-r--r-- | src/unix/linux_like/linux/mod.rs | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/unix/linux_like/android/mod.rs b/src/unix/linux_like/android/mod.rs index e039854851..da2b3cf3b4 100644 --- a/src/unix/linux_like/android/mod.rs +++ b/src/unix/linux_like/android/mod.rs @@ -2462,6 +2462,13 @@ pub const SCHED_RESET_ON_FORK: ::c_int = 0x40000000; pub const CLONE_PIDFD: ::c_int = 0x1000; +// linux/mempolicy.h +pub const MPOL_DEFAULT: ::c_int = 0; +pub const MPOL_PREFERRED: ::c_int = 1; +pub const MPOL_BIND: ::c_int = 2; +pub const MPOL_INTERLEAVE: ::c_int = 3; +pub const MPOL_LOCAL: ::c_int = 4; + // bits/seek_constants.h pub const SEEK_DATA: ::c_int = 3; pub const SEEK_HOLE: ::c_int = 4; diff --git a/src/unix/linux_like/linux/mod.rs b/src/unix/linux_like/linux/mod.rs index 53210bedc0..cbde59f02c 100644 --- a/src/unix/linux_like/linux/mod.rs +++ b/src/unix/linux_like/linux/mod.rs @@ -1477,6 +1477,13 @@ pub const RTLD_NOW: ::c_int = 0x2; pub const AT_EACCESS: ::c_int = 0x200; +// linux/mempolicy.h +pub const MPOL_DEFAULT: ::c_int = 0; +pub const MPOL_PREFERRED: ::c_int = 1; +pub const MPOL_BIND: ::c_int = 2; +pub const MPOL_INTERLEAVE: ::c_int = 3; +pub const MPOL_LOCAL: ::c_int = 4; + align_const! { pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t { size: [0; __SIZEOF_PTHREAD_MUTEX_T], |