aboutsummaryrefslogtreecommitdiff
path: root/nptl
AgeCommit message (Collapse)AuthorFilesLines
2015-07-28Fix b/19824366 with a local patch (as upstream is fixed unmergeably), and ↵Stan Shebs3-2/+156
add a new test.
2015-06-23Prevent wasted memory in guard regionsAndrew Hunter1-0/+9
2014-05-08For b/14616463, add -fno-function-sections to nptl/events.c compilation.Brooks Moses1-0/+4
2014-03-08Add pthread_signal_safe_key_create.Paul Pluzhnikov8-18/+65
2014-03-03For b/5013921, build pthread_join.c and pthread_timedjoin.c with frame pointers.Paul Pluzhnikov1-2/+4
2014-03-03For b/5836136, do dlsym(0, "_Unwind..."), i.e. ignore libgcc_s.so.1 dlopen ↵Paul Pluzhnikov1-0/+5
failure.
2014-02-28Don't put absolute pathnames into libc.so and libpthread.so linker scripts ↵Paul Pluzhnikov1-2/+2
-- absolute pathnames interfere with --sysroot.
2014-02-24Revert upstream removal of async-safe TLS patches.Brooks Moses4-11/+203
2014-02-06Revert "Patch 3/4 of the effort to make TLS access async-signal-safe."Allan McRae1-1/+5
This reverts commit 35e8f7ab94c910659de9d507aa0f3e1f8973d914.
2014-02-06Revert "Async-signal safe TLS."Allan McRae5-210/+7
This reverts commit 7f507ee17aee720fa423fa38502bc3caa0dd03d7. Conflicts: ChangeLog nptl/tst-tls7.c nptl/tst-tls7mod.c
2014-02-05Fix tst-setgetname for Linux kernels < 2.6.33.Carlos O'Donell2-0/+20
Support for /proc/self/task/$tid/comm as added in Linux 2.6.33, therefore since the test tst-setgetname relies on this functionality to operate we must skip the test in kernels < 2.6.33. We wrap the checks with __ASSUME_PROC_PID_TASK_COMM such that in the future when we move arch_minimum_kernel to 2.6.33 we can remove this code.
2014-02-04PowerPC: Change powerpc64le start ABI to 2.17.Adhemerval Zanella1-1/+1
2014-01-23S/390: Increase tst-tls7 test case timeoutStefan Liebler2-1/+5
TLS in a dlopened object works fine when accessed from a signal handler. The default kernel scheduling parameters prevents the testcase to finish within the 4 seconds. Tested the bigger timeout on s390 and s390x.
2014-01-18Don't check asynchronous cancellation on systemH.J. Lu2-1/+5
Since asynchronous cancellation was removed from system by commit c4dd57c300aa05ab2f957d571c321237a58d0368 Author: Ondřej Bílka <neleai@seznam.cz> Date: Tue Jan 14 16:07:50 2014 +0100 Do not enable asynchronous cancellation in system. Fixes bug 14782. We needlessly enabled thread cancellation before it was necessary. As only call that needs to be guarded is waitpid which is cancellation point we could remove cancellation altogether. we shouldn't check asynchronous cancellation on system. [BZ #14782] * tst-cancel-wrappers.sh: Remove system.
2014-01-11Fix a race in tst-tls7, which caused crashes on ppc32.Paul Pluzhnikov3-5/+31
2014-01-07S/390: Make jmp_buf extendible.Andreas Krebbel2-0/+68
2014-01-03Async-signal safe TLS.Andrew Hunter5-7/+190
ChangeLog: 2014-01-03 Andrew Hunter <ahh@google.com> * elf/dl-open.c (): New comment. * elf/dl-reloc.c (_dl_try_allocate_static_tls): Use atomic_compare_and_exchange_bool_acq (_dl_allocate_static_tls): Block signals. * elf/dl-tls.c (allocate_and_init): Return void. (_dl_update_slotinfo): Block signals, use atomic update. nptl/ChangeLog: 2014-01-03 Andrew Hunter <ahh@google.com> * nptl/Makefile (tst-tls7): New test. * nptl/tst-tls7.c: New file. * nptl/tst-tls7mod.c: New file. * nptl/allocatestack.c (init_one_static_tls): Use atomic barrier.
2014-01-01Update copyright notices with scripts/update-copyrightsAllan McRae664-664/+664
2013-12-18Patch 3/4 of the effort to make TLS access async-signal-safe.Paul Pluzhnikov1-5/+1
Factor out _dl_clear_dtv. 2013-12-18 Andrew Hunter <ahh@google.com> * elf/Versions (ld): Add _dl_clear_dtv. * sysdeps/generic/ldsodefs.h (_dl_clear_dtv): New prototype. * elf/dl-tls.c (_dl_clear_dtv): New function. * nptl/allocatestack.c (get_cached_stack): Call _dl_clear_dtv.
2013-12-12PowerPC: Add DSO and TAR fields to TLSAdhemerval Zanella3-0/+13
2013-12-12Add test case for pthread_[sg]etname_np.Carlos O'Donell3-0/+307
This commit adds a testcase for pthread_setname_np and pthread_getname_np. The testcase itself has four tests to validate that these functions work as expected. The test is only enabled for Linux since it requires access to an alternate method for validating the functions work.
2013-12-11ChangeLog whitespace fix.Roland McGrath1-0/+1
2013-12-09Fix CFI annotations in pthread_cond_timedwait for i486+Andreas Schwab2-2/+8
2013-12-04PowerPC64 ELFv2 ABI 4/6: Stack frame layout changesUlrich Weigand2-26/+47
This updates glibc for the changes in the ELFv2 relating to the stack frame layout. These are described in more detail here: http://gcc.gnu.org/ml/gcc-patches/2013-11/msg01149.html http://gcc.gnu.org/ml/gcc-patches/2013-11/msg01146.html Specifically, the "compiler and linker doublewords" were removed, which has the effect that the save slot for the TOC register is now at offset 24 rather than 40 to the stack pointer. In addition, a function may now no longer necessarily assume that its caller has set up a 64-byte register save area its use. To address the first change, the patch goes through all assembler files and replaces immediate offsets in instructions accessing the ABI-defined stack slots by symbolic offsets. Those already were defined in ucontext_i.sym and used in some of the context routines, but that doesn't really seem like the right place for those defines. The patch instead defines those symbolic offsets in sysdeps.h, in two variants for the old and new ABI, and uses them systematically in all assembler files, not just the context routines. The second change only affected a few assembler files that used the save area to temporarily store some registers. In those cases where this happens within a leaf function, this patch changes the code to store those registers to the "red zone" below the stack pointer. Otherwise, the functions already allocate a stack frame, and the patch changes them to add extra space in these frames as temporary space for the ELFv2 ABI.
2013-12-04PowerPC64: Add __private_ss field to TCB headerUlrich Weigand1-0/+2
The TCB header on Intel contains a field __private_ss that is used to efficiently implement the -fsplit-stack GCC feature. In order to prepare for a possible future implementation of that feature on powerpc64, we'd like to reserve a similar field in the TCB header as well. (It would be good if this went in with or before the ELFv2 patches to ensure that this field will be available always in the ELFv2 environment.) The field needs to be added at the front of tcbhead_t structure to avoid changing the ABI; see the recent discussion when adding the EBB fields.
2013-11-26Use __glibc_reserved instead __unused.Ondřej Bílka3-3/+7
2013-11-25Fix intermittent failure in tst-getpid2.Paul Pluzhnikov2-0/+10
2013-11-25 Paul Pluzhnikov <ppluzhnikov@google.com> [BZ #11214] * Makefile (tst-getpid2-ENV): New variable.
2013-11-20Fix missing > on email.Paul Pluzhnikov1-1/+1
2013-11-20Fix failure in tst-cleanup2 and tst-cleanupx2 with gcc-4.9Paul Pluzhnikov2-0/+8
gcc (GCC) 4.9.0 20131114 (experimental) 2013-11-20 Paul Pluzhnikov <ppluzhnikov@google.com * Makefile (tst-cleanup2, tst-cleanupx2): Add -fno-builtin
2013-11-20Revert "Fix failure in nptl/tst-cleanup when building with"Paul Pluzhnikov1-6/+0
This reverts commit 78271fa91a1e6902222e892068750059ec21f396. Actually, a different fix is needed.
2013-11-20Fix failure in nptl/tst-cleanup when building withPaul Pluzhnikov1-0/+6
gcc (GCC) 4.9.0 20131114 (experimental) 2013-11-20 Paul Pluzhnikov <ppluzhnikov@google.com> * nptl/tst-cleanup2.c (do_test): Handle SIGILL as well.
2013-10-30rename configure.in to configure.acMike Frysinger5-2/+11
Autoconf has been deprecating configure.in for quite a long time. Rename all our configure.in and preconfigure.in files to .ac. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-10-05nptl: tst-mutex8.c: Handle ENOTSUP PI mutex failureMaciej W. Rozycki2-2/+15
2013-10-04PowerPC LE configuryAlan Modra1-0/+1
http://sourceware.org/ml/libc-alpha/2013-08/msg00096.html This adds the basic configury bits for powerpc64le and powerpcle. * configure.in: Map powerpc64le and powerpcle to base_machine/machine. * configure: Regenerate. * nptl/shlib-versions: Powerpc*le starts at 2.18. * shlib-versions: Likewise.
2013-10-04PowerPC ugly symbol versioningAlan Modra1-9/+4
http://sourceware.org/ml/libc-alpha/2013-08/msg00090.html This patch fixes symbol versioning in setjmp/longjmp. The existing code uses raw versions, which results in wrong symbol versioning when you want to build glibc with a base version of 2.19 for LE. Note that the merging the 64-bit and 32-bit versions in novmx-lonjmp.c and pt-longjmp.c doesn't result in GLIBC_2.0 versions for 64-bit, due to the base in shlib_versions. * sysdeps/powerpc/longjmp.c: Use proper symbol versioning macros. * sysdeps/powerpc/novmx-longjmp.c: Likewise. * sysdeps/powerpc/powerpc32/bsd-_setjmp.S: Likewise. * sysdeps/powerpc/powerpc32/bsd-setjmp.S: Likewise. * sysdeps/powerpc/powerpc32/fpu/__longjmp.S: Likewise. * sysdeps/powerpc/powerpc32/fpu/setjmp.S: Likewise. * sysdeps/powerpc/powerpc32/mcount.c: Likewise. * sysdeps/powerpc/powerpc32/setjmp.S: Likewise. * sysdeps/powerpc/powerpc64/setjmp.S: Likewise. * nptl/sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Likewise.
2013-10-01Fix PI mutex check in pthread_cond_broadcast and pthread_cond_signalSiddhesh Poyarekar3-10/+11
Fixes BZ #15988. The check had a typo - it checked for PTHREAD_MUTEX_ROBUST_NP instead of PTHREAD_MUTEX_ROBUST_NORMAL_NP. It has now been replaced by the already existing convenience macro USE_REQUEUE_PI.
2013-09-27Move ChangeLog entrySiddhesh Poyarekar1-0/+8
2013-09-27Use the mutex member of the argumen in __libc_lock_*_recursiveSiddhesh Poyarekar1-3/+3
2013-09-04Remove --disable-versioning.Joseph Myers2-1/+7
2013-09-03Mark success return value as volatile to work around reschedulingSiddhesh Poyarekar2-1/+13
Resolves #15921 The test case nptl/tst-cleanup2 fails on s390x and power6 due to instruction sheduling in gcc. This was reported in gcc: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58034 but it was concluded that gcc is allowed to assume that the first argument to sprintf is a character array - NULL not being a valid character array.
2013-08-30Fix typos.Ondřej Bílka4-4/+10
2013-08-21Fix typos.Ondřej Bílka3-2/+7
2013-07-23Remove Linux kernel version ambiguity in comment added by previous commit.David S. Miller2-2/+6
* tst-cancel4.c (WRITE_BUFFER_SIZE): Adjust comment.
2013-07-23Increase nptl test case buffer size so we really block on current Linux kernels.David S. Miller2-1/+28
* tst-cancel4.c (WRITE_BUFFER_SIZE): Increase to 16384.
2013-07-19Clean up whitespace in lock elision patches.Dominik Vogt15-31/+52
Signed-off-by: Carlos O'Donell <carlos@redhat.com>
2013-07-19Remove remains of rwlock elision which is not implemented yet.Dominik Vogt3-11/+8
Signed-off-by: Carlos O'Donell <carlos@redhat.com> --- nptl/ 2013-07-19 Dominik Vogt <vogt@de.ibm.com> * sysdeps/unix/sysv/linux/x86/elision-conf.c: Remove __rwlock_rtm_enabled and __rwlock_rtm_read_retries. (elision_init): Don't set __rwlock_rtm_enabled. * sysdeps/unix/sysv/linux/x86/elision-conf.h: Remove __rwlock_rtm_enabled.
2013-07-03Add x86 init-arch to nptlH.J. Lu3-0/+7
2013-07-02Add a configure option to enable lock elision and disable by defaultAndi Kleen2-0/+8
Can be enabled with --enable-lock-elision=yes at configure time.
2013-07-02Disable elision for any pthread_mutexattr_settype callAndi Kleen2-0/+10
PTHREAD_MUTEX_NORMAL requires deadlock for nesting, DEFAULT does not. Since glibc uses the same value (0) disable elision for any call to pthread_mutexattr_settype() with a 0 value. This implies that a program can disable elision by doing pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_NORMAL) Based on a original proposal by Rich Felker.
2013-07-02Add elision to pthread_mutex_{try,timed,un}lockAndi Kleen14-24/+267
Add elision paths to the basic mutex locks. The normal path has a check for RTM and upgrades the lock to RTM when available. Trylocks cannot automatically upgrade, so they check for elision every time. We use a 4 byte value in the mutex to store the lock elision adaptation state. This is separate from the adaptive spin state and uses a separate field. Condition variables currently do not support elision. Recursive mutexes and condition variables may be supported at some point, but are not in the current implementation. Also "trylock" will not automatically enable elision unless some other lock call has been already called on the lock. This version does not use IFUNC, so it means every lock has one additional check for elision. Benchmarking showed the overhead to be negligible.