aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Kanzenbach <kurt@linutronix.de>2021-06-25 10:10:59 +0200
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-10-01 08:09:13 -0300
commitdd5adb515c105e4ad1619825babe85d75a7a755c (patch)
tree5f855ab7385173e8d0501bbda457574a2a1a4947
parent01d34e934a395675ba3c576f2a51f10b86efbc20 (diff)
downloadglibc-dd5adb515c105e4ad1619825babe85d75a7a755c.zip
glibc-dd5adb515c105e4ad1619825babe85d75a7a755c.tar.gz
glibc-dd5adb515c105e4ad1619825babe85d75a7a755c.tar.bz2
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 <kurt@linutronix.de> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
-rw-r--r--sysdeps/unix/sysv/linux/kernel-features.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h
index 3930e14..ffb6af1 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 */