diff options
author | Linus Färnstrand <faern@faern.net> | 2019-05-12 20:16:01 +0200 |
---|---|---|
committer | Linus Färnstrand <faern@faern.net> | 2019-05-16 20:37:10 +0200 |
commit | 2276fd394045550fc7c9cfb2a65162f16c3331e7 (patch) | |
tree | 93a7aa9b3cf5093c116831e7752c7f6394c126e1 /src/unix | |
parent | 8b14a7e95bd4f13707a1c4383bdb54222921098f (diff) | |
download | rust-libc-2276fd394045550fc7c9cfb2a65162f16c3331e7.tar.gz |
Add some FUTEX_ constants to Linux+Android
Diffstat (limited to 'src/unix')
-rw-r--r-- | src/unix/notbsd/android/mod.rs | 19 | ||||
-rw-r--r-- | src/unix/notbsd/linux/mod.rs | 19 |
2 files changed, 38 insertions, 0 deletions
diff --git a/src/unix/notbsd/android/mod.rs b/src/unix/notbsd/android/mod.rs index 179893e517..a430b1a00d 100644 --- a/src/unix/notbsd/android/mod.rs +++ b/src/unix/notbsd/android/mod.rs @@ -1839,6 +1839,25 @@ pub const IN_ALL_EVENTS: ::uint32_t = ( pub const IN_CLOEXEC: ::c_int = O_CLOEXEC; pub const IN_NONBLOCK: ::c_int = O_NONBLOCK; +pub const FUTEX_WAIT: ::c_int = 0; +pub const FUTEX_WAKE: ::c_int = 1; +pub const FUTEX_FD: ::c_int = 2; +pub const FUTEX_REQUEUE: ::c_int = 3; +pub const FUTEX_CMP_REQUEUE: ::c_int = 4; +pub const FUTEX_WAKE_OP: ::c_int = 5; +pub const FUTEX_LOCK_PI: ::c_int = 6; +pub const FUTEX_UNLOCK_PI: ::c_int = 7; +pub const FUTEX_TRYLOCK_PI: ::c_int = 8; +pub const FUTEX_WAIT_BITSET: ::c_int = 9; +pub const FUTEX_WAKE_BITSET: ::c_int = 10; +pub const FUTEX_WAIT_REQUEUE_PI: ::c_int = 11; +pub const FUTEX_CMP_REQUEUE_PI: ::c_int = 12; + +pub const FUTEX_PRIVATE_FLAG: ::c_int = 128; +pub const FUTEX_CLOCK_REALTIME: ::c_int = 256; +pub const FUTEX_CMD_MASK: ::c_int = + !(FUTEX_PRIVATE_FLAG | FUTEX_CLOCK_REALTIME); + f! { pub fn CMSG_NXTHDR(mhdr: *const msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr { diff --git a/src/unix/notbsd/linux/mod.rs b/src/unix/notbsd/linux/mod.rs index 3d9ccada03..2419a41d4c 100644 --- a/src/unix/notbsd/linux/mod.rs +++ b/src/unix/notbsd/linux/mod.rs @@ -1849,6 +1849,25 @@ pub const IN_ALL_EVENTS: ::uint32_t = ( pub const IN_CLOEXEC: ::c_int = O_CLOEXEC; pub const IN_NONBLOCK: ::c_int = O_NONBLOCK; +pub const FUTEX_WAIT: ::c_int = 0; +pub const FUTEX_WAKE: ::c_int = 1; +pub const FUTEX_FD: ::c_int = 2; +pub const FUTEX_REQUEUE: ::c_int = 3; +pub const FUTEX_CMP_REQUEUE: ::c_int = 4; +pub const FUTEX_WAKE_OP: ::c_int = 5; +pub const FUTEX_LOCK_PI: ::c_int = 6; +pub const FUTEX_UNLOCK_PI: ::c_int = 7; +pub const FUTEX_TRYLOCK_PI: ::c_int = 8; +pub const FUTEX_WAIT_BITSET: ::c_int = 9; +pub const FUTEX_WAKE_BITSET: ::c_int = 10; +pub const FUTEX_WAIT_REQUEUE_PI: ::c_int = 11; +pub const FUTEX_CMP_REQUEUE_PI: ::c_int = 12; + +pub const FUTEX_PRIVATE_FLAG: ::c_int = 128; +pub const FUTEX_CLOCK_REALTIME: ::c_int = 256; +pub const FUTEX_CMD_MASK: ::c_int = + !(FUTEX_PRIVATE_FLAG | FUTEX_CLOCK_REALTIME); + f! { pub fn CMSG_NXTHDR(mhdr: *const msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr { |