From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: libc-alpha@sourceware.org
Subject: [PATCH 2/2] linux: Remove __ASSUME_SET_ROBUST_LIST defines
Date: Wed, 21 Sep 2016 14:11:00 -0000 [thread overview]
Message-ID: <1474467066-26814-2-git-send-email-adhemerval.zanella@linaro.org> (raw)
In-Reply-To: <1474467066-26814-1-git-send-email-adhemerval.zanella@linaro.org>
This patch removes __ASSUME_SET_ROBUST_LIST usage and assumes that
kernel will correctly return if it supports or not
futex_atomic_cmpxchg_inatomic.
On minimum supported kernel (v3.2 and v2.6.32 for x86) kernel has:
2418 SYSCALL_DEFINE2(set_robust_list, struct robust_list_head __user *, head,
2419 size_t, len)
2420 {
2421 if (!futex_cmpxchg_enabled)
2422 return -ENOSYS;
The patch also adds the __set_robust_list_avail runtime check for all
architectures, since for some the syscall may still return ENOSYS if
futex_atomic_cmpxchg_inatomic is not supported (for instance ARM).
Tested on armhf (with 3.8 kernel) and x86_64.
* sysdeps/unix/sysv/linux/arm/kernel-features.h
(__ASSUME_SET_ROBUST_LIST): Likewise.
* sysdeps/unix/sysv/linux/kernel-features.h:
(__ASSUME_SET_ROBUST_LIST): Likewise.
* sysdeps/unix/sysv/linux/m68k/kernel-features.h:
(__ASSUME_SET_ROBUST_LIST): Likewise.
* sysdeps/unix/sysv/linux/mips/kernel-features.h:
(__ASSUME_SET_ROBUST_LIST): Likewise.
* sysdeps/unix/sysv/linux/sparc/kernel-features.h:
(__ASSUME_SET_ROBUST_LIST): Likewise.
---
sysdeps/unix/sysv/linux/arm/kernel-features.h | 1 -
sysdeps/unix/sysv/linux/kernel-features.h | 5 -----
sysdeps/unix/sysv/linux/mips/kernel-features.h | 1 -
sysdeps/unix/sysv/linux/sparc/kernel-features.h | 1 -
4 files changed, 8 deletions(-)
diff --git a/sysdeps/unix/sysv/linux/arm/kernel-features.h b/sysdeps/unix/sysv/linux/arm/kernel-features.h
index 6ca607e..4012751 100644
--- a/sysdeps/unix/sysv/linux/arm/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/arm/kernel-features.h
@@ -24,7 +24,6 @@
configuration. */
#if __LINUX_KERNEL_VERSION < 0x030E03
# undef __ASSUME_REQUEUE_PI
-# undef __ASSUME_SET_ROBUST_LIST
#endif
/* Define this if your 32-bit syscall API requires 64-bit register
diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h
index 1d3b554..6f11128 100644
--- a/sysdeps/unix/sysv/linux/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/kernel-features.h
@@ -59,11 +59,6 @@
they were introduced in 2.6.17-rc1, on SH in 2.6.19-rc1. */
#define __ASSUME_ATFCTS 1
-/* Support for inter-process robust mutexes was added in 2.6.17 (but
- some architectures lack futex_atomic_cmpxchg_inatomic in some
- configurations). */
-#define __ASSUME_SET_ROBUST_LIST 1
-
/* Support for private futexes was added in 2.6.22. */
#define __ASSUME_PRIVATE_FUTEX 1
diff --git a/sysdeps/unix/sysv/linux/mips/kernel-features.h b/sysdeps/unix/sysv/linux/mips/kernel-features.h
index b486d90..3bcbcff 100644
--- a/sysdeps/unix/sysv/linux/mips/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/mips/kernel-features.h
@@ -25,7 +25,6 @@
emulating LL/SC. */
#if __mips == 1 || defined _MIPS_ARCH_R5900
# undef __ASSUME_REQUEUE_PI
-# undef __ASSUME_SET_ROBUST_LIST
#endif
/* Define this if your 32-bit syscall API requires 64-bit register
diff --git a/sysdeps/unix/sysv/linux/sparc/kernel-features.h b/sysdeps/unix/sysv/linux/sparc/kernel-features.h
index 69c9c7c..dc7c4aa 100644
--- a/sysdeps/unix/sysv/linux/sparc/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/sparc/kernel-features.h
@@ -35,5 +35,4 @@
futex_atomic_cmpxchg_inatomic. */
#if !defined __arch64__ && !defined __sparc_v9__
# undef __ASSUME_REQUEUE_PI
-# undef __ASSUME_SET_ROBUST_LIST
#endif
--
2.7.4
next prev parent reply other threads:[~2016-09-21 14:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-21 14:11 [PATCH 1/2] nptl: Remove __ASSUME_SET_ROBUST_LIST Adhemerval Zanella
2016-09-21 14:11 ` Adhemerval Zanella [this message]
2017-04-18 21:13 Adhemerval Zanella
2017-04-18 21:13 ` [PATCH 2/2] linux: Remove __ASSUME_SET_ROBUST_LIST defines Adhemerval Zanella
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1474467066-26814-2-git-send-email-adhemerval.zanella@linaro.org \
--to=adhemerval.zanella@linaro.org \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).