Skip to content

Commit 26b8795

Browse files
committed
Auto merge of #2874 - rtzoeller:FUTEX_LOCK_PI2, r=JohnTitor
Add FUTEX_LOCK_PI2 on Linux Tested using a modified version of the [linux-futex crate](https://github.com/m-ou-se/linux-futex/).
2 parents d9eb957 + a8f02e9 commit 26b8795

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

libc-test/build.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3187,6 +3187,9 @@ fn test_linux(target: &str) {
31873187
// present in recent kernels only
31883188
"PR_PAC_SET_ENABLED_KEYS" | "PR_PAC_GET_ENABLED_KEYS" => true,
31893189

3190+
// Added in Linux 5.14
3191+
"FUTEX_LOCK_PI2" => true,
3192+
31903193
_ => false,
31913194
}
31923195
});

libc-test/semver/linux.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -599,6 +599,7 @@ FUTEX_CMP_REQUEUE
599599
FUTEX_CMP_REQUEUE_PI
600600
FUTEX_FD
601601
FUTEX_LOCK_PI
602+
FUTEX_LOCK_PI2
602603
FUTEX_PRIVATE_FLAG
603604
FUTEX_REQUEUE
604605
FUTEX_TRYLOCK_PI

src/unix/linux_like/linux/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3074,6 +3074,7 @@ pub const FUTEX_WAIT_BITSET: ::c_int = 9;
30743074
pub const FUTEX_WAKE_BITSET: ::c_int = 10;
30753075
pub const FUTEX_WAIT_REQUEUE_PI: ::c_int = 11;
30763076
pub const FUTEX_CMP_REQUEUE_PI: ::c_int = 12;
3077+
pub const FUTEX_LOCK_PI2: ::c_int = 13;
30773078

30783079
pub const FUTEX_PRIVATE_FLAG: ::c_int = 128;
30793080
pub const FUTEX_CLOCK_REALTIME: ::c_int = 256;

0 commit comments

Comments
 (0)