aboutsummaryrefslogtreecommitdiff
path: root/nptl
AgeCommit message (Collapse)Author
2014-06-03New test for pthread_spin_lock (bug 16882)Guo Yixuan
* nptl/tst-spin4.c: New test. * nptl/Makefile (tests): Add tst-spin4.
2014-06-03Fixed pthread_spin_lock on sparc32/64 (bug 16882)Guo Yixuan
[BZ #16882] * nptl/sysdeps/sparc/sparc32/pthread_spin_lock.S (pthread_spin_lock): Branch out of spin loop to proper location. * nptl/sysdeps/sparc/sparc64/pthread_spin_lock.S (pthread_spin_lock): Likewise.
2014-06-02SH: Consolidate NPTL/non versions of vforkRoland McGrath
2014-05-28SH: Consolidate NPTL/non versions of cloneRoland McGrath
2014-05-27SH: Convert fork.c to arch-fork.hRoland McGrath
2014-05-27Remove second argument from TLS_INIT_TP macroAndreas Schwab
2014-05-26PowerPC: Move remaining nptl/sysdeps/unix/sysv/linux/powerpc/ files.Adhemerval Zanella
2014-05-26PowerPC: Move NPTL ABI headers to sysdeps.Adhemerval Zanella
2014-05-26PowerPC: Move powerpc64 timer_*.c out of nptl/Adhemerval Zanella
2014-05-26PowerPC: Consolidate NPTL/non versions of cloneAdhemerval Zanella
2014-05-26PowerPC: Consolidate NPTL/non versions of vforkAdhemerval Zanella
2014-05-26Disable lock elision for PTHREAD_MUTEX_NORMAL.Stefan Liebler
2014-05-26Fix typo in tst-mutex5 ifndef -> ifdefStefan Liebler
2014-05-23Only provide non-default symbols in libpthread for vforkRichard Henderson
* nptl/pt-vfork.c (vfork_resolve): Rename from vfork_ifunc. (vfork, __vfork): Define via compat_symbol.
2014-05-23Only support ifunc in nptl/pt-vfork.cRichard Henderson
* nptl/pt-vfork.c: Error if !HAVE_IFUNC. [!HAVE_IFUNC] (vfork_compat): Remove. [!HAVE_IFUNC] (DEFINE_VFORK): Remove.
2014-05-16Use existing makefile variables for dependencies on glibc libraries.Joseph Myers
glibc's Makeconfig defines some variables such as $(libm) and $(libdl) for linking with libraries built by glibc, and nptl/Makeconfig (included by the toplevel Makeconfig) defines others such as $(shared-thread-library). In some places glibc's Makefiles use those variables when linking against the relevant libraries, but in other places they hardcode the location of the libraries in the build tree. This patch cleans up various places to use the variables that already exist (in the case of libm, replacing several duplicate definitions of a $(link-libm) variable in subdirectory Makefiles). (It's not necessarily exactly equivalent to what the existing code does - in particular, $(shared-thread-library) includes libpthread_nonshared, but is replacing places that just referred to libpthread.so. But I think that change is desirable on the general principle of linking things as close as possible to the way in which they would be linked with an installed library, unless there is a clear reason not to do so.) To support running tests with an installed copy of glibc without needing the full build tree from when that copy was built, I think it will be useful to use such variables more generally and systematically - every time the rules for building a test refer to some file from the build tree that's also installed by glibc, use a makefile variable so that the installed-testing case can point those variables to installed copies of the files. This patch just deals with straightforward cases where such variables already exist. It's quite possible some uses of $(shared-thread-library) should actually be a new $(thread-library) variable that's set appropriately in the --disable-shared case, if those uses would in fact work without shared libraries. I didn't change the status quo that those cases hardcode use of a shared library whether or not it's actually needed (but other uses such as $(libm) and $(libdl) would now get the static library if the shared library isn't built, when some previously hardcoded use of the shared library - if they actually need shared libraries, the test itself needs an enable-shared conditional anyway). Tested x86_64. * benchtests/Makefile ($(addprefix $(objpfx)bench-,$(bench-math))): Depend on $(libm), not $(common-objpfx)math/libm.so. ($(addprefix $(objpfx)bench-,$(bench-pthread))): Depend on $(shared-thread-library), not $(common-objpfx)nptl/libpthread.so. * elf/Makefile ($(objpfx)noload): Depend on $(libdl), not $(common-objpfx)dlfcn/libdl.so. ($(objpfx)tst-audit8): Depend on $(libm), not $(common-objpfx)math/libm.so. * malloc/Makefile ($(objpfx)libmemusage.so): Depend on $(libdl), not $(common-objpfx)dlfcn/libdl.so. * math/Makefile ($(addprefix $(objpfx),$(filter-out $(tests-static),$(tests)))): Depend on $(libm), not $(objpfx)libm.so. Do not condition on [$(build-shared) = yes]. ($(objpfx)test-fenv-tls): Depend on $(shared-thread-library), not $(common-objpfx)nptl/libpthread.so. * misc/Makefile ($(objpfx)tst-tsearch): Depend on $(libm), not $(common-objpfx)math/libm.so$(libm.so-version) or $(common-objpfx)math/libm.a depending on [$(build-shared) = yes]. * nptl/Makefile ($(objpfx)tst-unload): Depend on $(libdl), not $(common-objpfx)dlfcn/libdl.so. * setjmp/Makefile (link-libm): Remove variable. ($(objpfx)tst-setjmp-fp): Depend on $(libm), not $(link-libm). * stdio-common/Makefile (link-libm): Remove variable. ($(objpfx)tst-printf-round): Depend on $(libm), not $(link-libm). * stdlib/Makefile (link-libm): Remove variable. ($(objpfx)bug-getcontext): Depend on $(libm), not $(link-libm). ($(objpfx)tst-strtod-round): Likewise. ($(objpfx)tst-tininess): Likewise. ($(objpfx)tst-strtod-underflow): Likewise. ($(objpfx)tst-strtod6): Likewise. ($(objpfx)tst-tls-atexit): Depend on $(shared-thread-library) and $(libdl), not $(common-objpfx)nptl/libpthread.so and $(common-objpfx)dlfcn/libdl.so.
2014-05-16Split arch-fork.h from fork.hRoland McGrath
2014-05-14Move remaining files out of nptl/sysdeps/unix/sysv/linux/x86/.Roland McGrath
2014-05-14Move remaining nptl/sysdeps/unix/sysv/linux/i386/ files.Roland McGrath
2014-05-14Fix powerpc fork after i386 reorganization.Roland McGrath
2014-05-14i386: Remove useless pthread_spin_{init,unlock} wrapper files.Roland McGrath
2014-05-14Move remaining nptl/sysdeps/unix/sysv/linux/x86_64/ files.Roland McGrath
2014-05-14x86: Consolidate NPTL fork.Roland McGrath
2014-05-14Consolidate not-cancel.h files.Roland McGrath
2014-05-14Update s390 timer_*.c files for x86_64 file moves.Roland McGrath
2014-05-14x86_64: Remove useless pthread_spin_{init,unlock} wrapper files.Roland McGrath
2014-05-14Move x86_64 compat-timer.h out of nptl/Roland McGrath
2014-05-14Move x86_64 timer_*.c out of nptl/Roland McGrath
2014-05-14x86: Consolidate NPTL/non versions of cloneRoland McGrath
2014-05-14Move NPTL public ABI headers for x86 to sysdeps/x86/nptl/.Roland McGrath
2014-05-14x86: Consolidate NPTL/non versions of vforkRoland McGrath
2014-05-14ARM: Consolidate NPTL/non versions of vforkRoland McGrath
2014-05-13Clean up __exit_thread.Roland McGrath
2014-05-09S/390: Port of lock elision to System/zDominik Vogt
Added support for TX lock elision of pthread mutexes on s390 and s390x. This may improve lock scaling of existing programs on TX capable systems. The lock elision code is only built with --enable-lock-elision=yes and then requires a GCC version supporting the TX builtins. With lock elision default mutexes are elided via __builtin_tbegin, if the cpu supports transactions. By default lock elision is not enabled and the elision code is not built.
2014-05-07Fix typo in nptl/sockperf.cOndřej Bílka
2014-05-01Deconditionalize use of LLL_LOCK_INITIALIZER in bits/libc-lock.h.Roland McGrath
2014-04-30Fix lll_unlock twice in pthread_cond_broadcastYang Yingliang
lll_unlock() will be called again if it goes to "wake_all" in pthread_cond_broadcast(). This may make another thread which is waiting for lock in pthread_cond_timedwait() unlock. So there are more than one threads get the lock, it will break the shared data. It's introduced by commit 8313cb997d2d("FUTEX_*_REQUEUE_PI support for non-x86 code")
2014-04-23Use test-skeleton.c in tst-sem3 and tst-sem4Siddhesh Poyarekar
2014-04-22Include atomic.h in sem_wait.c and sem_trywait.cSiddhesh Poyarekar
2014-04-17PowerPC: Sync pthread_once with default implementationAdhemerval Zanella
This patch removes the arch specific powerpc implementation and instead uses the linux default one. Although the current powerpc implementation already constains the required memory barriers for correct initialization, the default implementation shows a better performance on newer chips.
2014-04-11Fixed and unified pthread_once.Torvald Riegel
[BZ #15215] This unifies various pthread_once architecture-specific implementations which were using the same algorithm with slightly different implementations. It also adds missing memory barriers that are required for correctness.
2014-04-09Move __PTHREAD_SPINS definition to architecture specific headerAdhemerval Zanella
This patch moves the __PTHREAD_SPINS definition to arch specific header since pthread_mutex_t layout is also arch specific. This leads to no need to defining __PTHREAD_MUTEX_HAVE_ELISION and thus removing of the undefined compiler warning.
2014-04-01Check for syscall error in the SETXID implementation in NPTL (bug 13347).Florian Weimer
At this point, we can only abort the process because we have already switched credentials on other threads. Returning an error would still leave the process in an inconsistent state. The new xtest needs root privileges to run.
2014-03-26Fix dwarf2 unwinding through futex functions.Andi Kleen
When profiling programs with lock problems with perf record -g dwarf, libunwind can currently not backtrace through the futex and unlock functions in pthread. This is because they use out of line sections, and those are not correctly described in dwarf2 (I believe needs dwarf3 or 4). This patch first removes the out of line sections. They only save a single jump, but cause a lot of pain. Then it converts the now inline lock code to use the now standard gas .cfi_* commands. With these changes libunwind/perf can backtrace through the futex functions now. Longer term it would be likely better to just use C futex() functions on x86 like all the other architectures. This would clean the code up even more.
2014-03-25PowerPC: Revert __PTHREAD_MUTEX_HAVE_ELISION changeAdhemerval Zanella
This patch revert 449282f2e0e850c29f6a9666058503d4734964f0.
2014-03-25PowerPC: Fix -Wundef warning for __PTHREAD_MUTEX_HAVE_ELISION.Adhemerval Zanella
2014-03-24S390: Fix -Wundef warning for __PTHREAD_MUTEX_HAVE_ELISION.Stefan Liebler
2014-03-17Revert "Fix __PTHREAD_MUTEX_HAVE_ELISION -Wundef warning"Will Newton
This reverts commit 788bba368c2eaf8aa3fd2ca18d269395d6bc8afb.
2014-03-17Fix __PTHREAD_MUTEX_HAVE_ELISION -Wundef warningWill Newton
ChangeLog: 2014-03-17 Will Newton <will.newton@linaro.org> * nptl/sysdeps/pthread/pthread.h: Check __PTHREAD_MUTEX_HAVE_ELISION is defined before testing its value.
2014-03-17Get rid of __LT_SPINLOCK_INITSiddhesh Poyarekar
We got rid of LinuxThreads in 2005, but we didn't remove __LT_SPINLOCK_INIT back then. Do it now. * nptl/sysdeps/pthread/bits/libc-lockP.h [defined NOT_IN_libc && !defined IS_IN_libpthread && __LT_SPINNOCK_INIT != 0]: Remove.