public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] Linux: Add FUTEX_LOCK_PI2
@ 2021-10-01 13:21 Adhemerval Zanella
  0 siblings, 0 replies; only message in thread
From: Adhemerval Zanella @ 2021-10-01 13:21 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=dd5adb515c105e4ad1619825babe85d75a7a755c

commit dd5adb515c105e4ad1619825babe85d75a7a755c
Author: Kurt Kanzenbach <kurt@linutronix.de>
Date:   Fri Jun 25 10:10:59 2021 +0200

    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>

Diff:
---
 sysdeps/unix/sysv/linux/kernel-features.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h
index 3930e14322..ffb6af196b 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 */


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-10-01 13:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-01 13:21 [glibc] Linux: Add FUTEX_LOCK_PI2 Adhemerval Zanella

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).