From: Kurt Kanzenbach Date: Fri, 25 Jun 2021 08:10:59 +0000 (+0200) Subject: Linux: Add FUTEX_LOCK_PI2 X-Git-Tag: glibc-2.35~463 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dd5adb515c105e4ad1619825babe85d75a7a755c;p=thirdparty%2Fglibc.git Linux: Add FUTEX_LOCK_PI2 Linux v5.14.0 introduced a new futex operation called FUTEX_LOCK_PI2. This kernel feature can be used to implement pthread_mutex_clocklock(MONOTONIC)/PI. Signed-off-by: Kurt Kanzenbach Reviewed-by: Adhemerval Zanella --- diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h index 3930e143224..ffb6af196b8 100644 --- a/sysdeps/unix/sysv/linux/kernel-features.h +++ b/sysdeps/unix/sysv/linux/kernel-features.h @@ -220,4 +220,12 @@ # define __ASSUME_FACCESSAT2 0 #endif +/* The FUTEX_LOCK_PI2 operation was introduced across all architectures in Linux + 5.14. */ +#if __LINUX_KERNEL_VERSION >= 0x050e00 +# define __ASSUME_FUTEX_LOCK_PI2 1 +#else +# define __ASSUME_FUTEX_LOCK_PI2 0 +#endif + #endif /* kernel-features.h */