Andreas Schwab
d2f37bcdab
- Update to glibc 2.20 release. * Reverted change of ABI data structures for s390 and s390x * Support for file description locks is added to systems running the Linux kernel * Optimized strchr implementation for AArch64 * The minimum Linux kernel version that this version of the GNU C Library can be used with is 2.6.32 * Running the testsuite no longer terminates as soon as a test fails * The am33 port, which had not worked for several years, has been removed from ports. * The _BSD_SOURCE and _SVID_SOURCE feature test macros are no longer supported; they now act the same as _DEFAULT_SOURCE (but generate a warning) * Optimized strcmp implementation for ARMv7 * Added support for TX lock elision of pthread mutexes on s390 and s390x * All supported architectures now use the main glibc sysdeps directory instead of some being in a separate "ports" directory * The NPTL implementation of POSIX pthreads is no longer an "add-on" * Locale names, including those obtained from environment variables (LANG and the LC_* variables), are more tightly checked for proper syntax * On x86-64, the dynamic linker's lazy-binding support is now compatible with application code using Intel MPX instructions - Patches from upstream removed * nss-dns-memleak.patch * sin-sign.patch * pldd-wait-ptrace-stop.patch * nscd-track-startup-failures.patch * powerpc-opt-power8.patch * check-pf-alloca.patch * getaddrinfo-uninit-result.patch OBS-URL: https://build.opensuse.org/request/show/249235 OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=387
50 lines
1.7 KiB
Diff
50 lines
1.7 KiB
Diff
[PATCH] Properly handle forced elision in pthread_mutex_trylock
|
|
|
|
BZ #16657
|
|
* nptl/pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
|
|
FORCE_ELISION instead of DO_ELISION.
|
|
* sysdeps/unix/sysv/linux/x86/force-elision.h (DO_ELISION):
|
|
Remove.
|
|
|
|
Index: glibc-2.19.90/nptl/pthread_mutex_trylock.c
|
|
===================================================================
|
|
--- glibc-2.19.90.orig/nptl/pthread_mutex_trylock.c
|
|
+++ glibc-2.19.90/nptl/pthread_mutex_trylock.c
|
|
@@ -26,8 +26,8 @@
|
|
#define lll_trylock_elision(a,t) lll_trylock(a)
|
|
#endif
|
|
|
|
-#ifndef DO_ELISION
|
|
-#define DO_ELISION(m) 0
|
|
+#ifndef FORCE_ELISION
|
|
+#define FORCE_ELISION(m, s)
|
|
#endif
|
|
|
|
/* We don't force elision in trylock, because this can lead to inconsistent
|
|
@@ -77,8 +77,7 @@ __pthread_mutex_trylock (mutex)
|
|
return 0;
|
|
|
|
case PTHREAD_MUTEX_TIMED_NP:
|
|
- if (DO_ELISION (mutex))
|
|
- goto elision;
|
|
+ FORCE_ELISION (mutex, goto elision);
|
|
/*FALL THROUGH*/
|
|
case PTHREAD_MUTEX_ADAPTIVE_NP:
|
|
case PTHREAD_MUTEX_ERRORCHECK_NP:
|
|
Index: glibc-2.19.90/sysdeps/unix/sysv/linux/x86/force-elision.h
|
|
===================================================================
|
|
--- glibc-2.19.90.orig/sysdeps/unix/sysv/linux/x86/force-elision.h
|
|
+++ glibc-2.19.90/sysdeps/unix/sysv/linux/x86/force-elision.h
|
|
@@ -16,11 +16,6 @@
|
|
License along with the GNU C Library; if not, see
|
|
<http://www.gnu.org/licenses/>. */
|
|
|
|
-/* Check for elision on this lock without upgrading. */
|
|
-#define DO_ELISION(m) \
|
|
- (__pthread_force_elision \
|
|
- && (m->__data.__kind & PTHREAD_MUTEX_NO_ELISION_NP) == 0) \
|
|
-
|
|
/* Automatically enable elision for existing user lock kinds. */
|
|
#define FORCE_ELISION(m, s) \
|
|
if (__pthread_force_elision \
|