Skip to content

Commit

Permalink
Auto merge of #2874 - rtzoeller:FUTEX_LOCK_PI2, r=JohnTitor
Browse files Browse the repository at this point in the history
Add FUTEX_LOCK_PI2 on Linux

Tested using a modified version of the [linux-futex crate](https://github.com/m-ou-se/linux-futex/).
  • Loading branch information
bors committed Aug 15, 2022
2 parents d9eb957 + a8f02e9 commit 26b8795
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libc-test/build.rs
Expand Up @@ -3187,6 +3187,9 @@ fn test_linux(target: &str) {
// present in recent kernels only
"PR_PAC_SET_ENABLED_KEYS" | "PR_PAC_GET_ENABLED_KEYS" => true,

// Added in Linux 5.14
"FUTEX_LOCK_PI2" => true,

_ => false,
}
});
Expand Down
1 change: 1 addition & 0 deletions libc-test/semver/linux.txt
Expand Up @@ -599,6 +599,7 @@ FUTEX_CMP_REQUEUE
FUTEX_CMP_REQUEUE_PI
FUTEX_FD
FUTEX_LOCK_PI
FUTEX_LOCK_PI2
FUTEX_PRIVATE_FLAG
FUTEX_REQUEUE
FUTEX_TRYLOCK_PI
Expand Down
1 change: 1 addition & 0 deletions src/unix/linux_like/linux/mod.rs
Expand Up @@ -3074,6 +3074,7 @@ 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_LOCK_PI2: ::c_int = 13;

pub const FUTEX_PRIVATE_FLAG: ::c_int = 128;
pub const FUTEX_CLOCK_REALTIME: ::c_int = 256;
Expand Down

0 comments on commit 26b8795

Please sign in to comment.