]>
git.ipfire.org Git - thirdparty/glibc.git/commit
Remove __ASSUME_SET_ROBUST_LIST
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.
* nptl/nptl-init.c [__ASSUME_SET_ROBUST_LIST]
(__set_robust_list_avail): Remove define.
[__NR_set_robust_list] (__pthread_initialize_minimal_internal):
Likewise.
* nptl/pthreadP.h [__ASSUME_SET_ROBUST_LIST]
(__set_robust_list_avail): Likewise.
* nptl/pthread_create.c
[__NR_set_robust_list && !__ASSUME_SET_ROBUST_LIST]
(START_THREAD_DEFN): Likewise.
* nptl/pthread_mutex_init.c [!__ASSUME_SET_ROBUST_LIST]
(__pthread_mutex_init): Likewise.
* 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.