summaryrefslogtreecommitdiff
path: root/libpthread
AgeCommit message (Collapse)Author
2010-05-09powerpc/Makefile.arch: Add objclean and headers_clean targets for NPTL.Khem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2010-05-09powerpc: Add TLS and NPTL supportKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-05-07mips/Makefile.arch: Remove -f option to $(do_awk)Khem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2010-05-03nptl: use arch-specific pthread_cond_timedwait and pthread_cond_wait on x86_64Roman I Khimov
Generic ones were broken on x86_64, pthread/ex2 test failed while pthread/ex5 worked fine. So use arch-specific functions and fix linkage failure with __pthread_mutex_cond_lock_adjust. Signed-off-by: Roman I Khimov <khimov@altell.ru> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2010-05-03nptl: use arch-specific cancellation routines for x86_64Roman I Khimov
They were present in sources, but not compiled in. Generic routines are broken badly on x86_64, even basic threading test like pthread/ex1 didn't work with them. Signed-off-by: Roman I Khimov <khimov@altell.ru> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2010-05-03nptl: fix sem_open with O_CREATRoman I Khimov
Temporary file name template passed to __gen_tempname had no "XXXXXX" in it, so __gen_tempname returned EINVAL which led to sem_open failure. Fixes NPTL tests tst-sem4, tst-sem7, tst-sem8, tst-sem9. Signed-off-by: Roman I Khimov <khimov@altell.ru> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2010-04-27nptl: mips needs updated clone() implementationAndreas Schultz
Signed-off-by: Andreas Schultz <andreas.schultz@gmail.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2010-04-27libpthread/x86_64: fix cleanRoman I Khimov
Signed-off-by: Roman I Khimov <khimov@altell.ru> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2010-04-25enable building __fcntl_nocancel, as it used unconditionally nowAustin Foxley
also sync up not-cancel.h headers between all three thread libraries Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2010-04-25nptl: Harmonize objects and headers makefile clean targetsCarmelo Amoroso
Update all the nptl clean targets (both objects and headers) to use the new syntax using CLEAN_<full_path> and HEADER_<full_path>. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2010-04-25libpthread/nptl_db: define NOT_IN_libcRoman I Khimov
NPTL build for x86_64 failed with LD libthread_db-0.9.32-git.so .../ld: libpthread/nptl_db/libthread_db_so.a(td_ta_event_getmsg.oS): relocation R_X86_64_PC32 against undefined symbol `__GI_memset' can not be used when making a shared object; recompile with -fPIC Signed-off-by: Roman I Khimov <khimov@altell.ru> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2010-04-25nptl_db: Remove compiler warning due to old-style function definitionCarmelo Amoroso
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2010-04-25nptl: Remove compiler warning due to old-style function definitionCarmelo Amoroso
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2010-04-23Merge commit 'origin/master' into nptlAustin Foxley
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2010-04-22nptl: fix dynamic initialization of libpthreadTimo Teräs
If libpthread get's pulled in via dlopen(), we need to do libpthread initialization in dlopen(). Achieve this by making initializer function out of __pthread_initialize_minimal_internal. Add the proper linker flags and make it callable multiple times. Add also nodelete flag which ensures that libpthread will not get unmapped after it's been loading. Though, ld.so does not yet support this. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2010-04-22nptl: fix libc internal, dynamically enabled lockingTimo Teräs
Final iteration to fix libc internal locking if libpthread is pulled in by dlopen call (directly or indirectly). We cannot really use the weak symbol trick for shared build, since the symbols won't get refreshed if libpthread is pulled in dynamically. In glibc, they have #ifdef SHARED magic to either use pthread_functions table, or weaks. But as we shared object files with both builds, this does not sounds good either. The reintroduces the libc weaks.c, but uses them now only with static build. For dynamic build, we still use the symbols with same name, but provide weaks in forward.c so they end up dereferencing the pthread_functions table indirectly if we are not linked to libpthread. Mutex initialization is hard coded as inline, as it needs to happen even if libpthread is not initially loaded. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2010-04-22nptl: fix warnings of shadowing __selfTimo Teräs
Stdio locking macroes do: void *__self = THREAD_SELF; But THREAD_SELF uses __self also internally which causes shadowing warnings. Just rename the outer variable for now. Might be an idea to convert the macroes to static inline functions. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2010-04-22nptl: proper soname handlingNatanael Copa
Since sublevel releases are not ABI compatible we need to adjust the soname to include the sublevel version. This makes it possible to install ABI incompatible versions of the library side by side so clean upgrades are possible. Signed-off-by: Natanael Copa <natanael.copa@gmail.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2010-04-16nptl: mark forwarded functions protectedTimo Teras
The libc stubs should never override the libpthread provided functions inside libpthread, otherwise the struct pthread_functions that is used by the forwarder stubs goes bad. Signed-off-by: Timo Teras <timo.teras@iki.fi> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2010-04-16libc: remove libc weak __pthreads_* wrappersTimo Teras
It is not possible to override for libpthread to override the weak libc definitions. This has never worked in uclibc, and does no longer work in glibc either (unless you use LD_DYNAMIC_WEAK). The proper thing to do is have weak prototypes in libc, and definitions in libpthread only. This way libc runs even if those functions are not defined, but just needs to protect against the NULL values (done by implementing __uclibc_maybe_call). This fix the problems if libc is linked before libpthread or if libpthread is pulled by a dependency library. Signed-off-by: Timo Teras <timo.teras@iki.fi> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2010-04-16Revert "nptl: mark symbols with libc forwarder hidden"Timo Teras
This reverts most of commit 1610762362e651f86ca284ac59a1d7ec88034e4e. Marking the symbols hidden is wrong, because libc accesses the pthreads internal symbols for internal locking. Signed-off-by: Timo Teras <timo.teras@iki.fi> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2010-04-15PTR_DEMANGLE: add documentationBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-04-14nptl: turn pointer demangling offTimo Teräs
Currently the stub calls would demangle the pointer that is never mangled. Alternatively, we could sync nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c with new glibc version that properly mangles the pointers, but that would need more validation to make sure that all struct pthread_function readers do demangling. uclibc currently does not do pointer mangling everywhere so it's more consistent to just disable it here too. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2010-04-14linuxthreads.new: initialize stdio lockingTimo Teräs
uClibc requires the threading library to enable locking for stdio, or the locking is not done at all. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2010-04-14nptl: initialize stdio lockingTimo Teräs
uClibc requires the threading library to enable locking for stdio, or the locking is not done at all. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2010-04-14nptl: mark symbols with libc forwarder hiddenTimo Teräs
Add attribute_hidden to all symbols having libc forwarder. This prevents recursive self calls which would happen if libc is before libpthread in linking order: the forwarder functions would call itself via the function table, since the libpthread symbols would get overwritten with libc ones. This has not been a problem in glibc since there these symbols are marked hidden with linker version-script. Since we don't use one, we need to mark these explicitly. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2010-04-12provide prototype for internal helperBernhard Reutner-Fischer
i386 was missing a prototype for __tls_get_addr() Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-04-12nptl/sysdeps/unix/sysv/linux/i386: cleanup -DUSE___THREADNatanael Copa
Remove the -DUSE___THREAD from specific assembler files since its used everywhere anyway. This is a cleanup after 447a9d1cc181395c3e2ea77ea88e45dee4b30ce6 Signed-off-by: Natanael Copa <natanael.copa@gmail.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2010-04-12pthread_mutex_timedlock: always build with optimizationsBernhard Reutner-Fischer
avoids breakage with DODEBUG and lll_timedlock() constraints Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-04-12nptl/sysdeps/unix/sysv/linux/i386: enable USE___THREAD for assemblerTimo Teräs
NPTL defines errno as __thread variable. Define USE___THREAD so proper errno assignment is used in assembly files. This fixes segfault while building python. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Natanael Copa <natanael.copa@gmail.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2010-04-12use user-provided host binariesBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-04-07pthread_{attr_,}{s,g}etaffinity: cleanup symbol namesBernhard Reutner-Fischer
fixes typo in a1ee5b32fc698297149c770417354441ee62701e which forgot to rename __pthread_attr_getaffinity_np to pthread_attr_getaffinity_np. Thanks to Andre DRASZIK for mentioning my omission. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-04-02Merge commit 'origin/master' into nptlAustin Foxley
Conflicts: Makefile.in extra/Configs/Config.in libc/sysdeps/linux/common/bits/kernel-features.h libc/sysdeps/linux/common/poll.c libc/sysdeps/linux/common/sysdep.h libc/sysdeps/linux/sh/sysdep.h Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2010-03-25prettify make cleanBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-02-23get rid of extra variables for nptl pregen altogetherAustin Foxley
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2010-02-23improve parallel make behaviourAustin Foxley
* add library dependencies for libdl,libpthread * fix typo in librt/Makefile.in * also remove extra trailing slashes on i386, sparc pregen headers Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2010-02-22nptl/headers: Convert the makefile targets into variables.Khem Raj
* Introduce pregen-headers-y which is list of generated headers during the build and add this to pregen target in top level makefile. Also add nptl_headers, nptl_arch_headers, nptl_linux_headers to this if compiling with nptl. * Replace pthread_pregen var with pregen-headers-y. * Make nptl_headers, nptl_arch_headers, nptl_linux_headers variables instead of sub targets. Signed-off-by: Khem Raj <raj.khem@gmail.com>
2010-02-19Get x86_64 compile to succeed.Khem Raj
* The changes to clone.S needs testing Signed-off-by: Khem Raj <raj.khem@gmail.com>
2010-02-19sparc: also needs generic version of lowlevelrobustlockAustin Foxley
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2010-02-19Add dummy tcb-offsets.hKhem Raj
* This file is used during creation of real tcb-offsets.h because lowlevellock.h from i386 also include tcb-offsets.h and it is inturn included by tls.h and tls.h is used in the dummy C file generated from tcb-offsets.sym, it created a catch-22 Signed-off-by: Khem Raj <raj.khem@gmail.com>
2010-02-19nptl_sh: Fix build problem with FUTEX_CLOCK_REALTIMECarmelo Amoroso
This patch fixes a build problem into the lowlevellock.S when support FUTEX_CLOCK_REALTIME (kernel newer than 2.6.29). __have_futex_clock_realtime symbol is not defined when set __ASSUME_FUTEX_CLOCK_REALTIME. The same is on i386 arch. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2010-02-19x86_64: compile pthread it's own version of __syscall_errorAustin Foxley
also fix up clone.S from sync Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2010-02-19more fixes for x86_64 nptlAustin Foxley
also cleanup some PIC (should be __PIC__) that snuck in Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2010-02-19use macro to link ldso to libpthread, so it gets the the right name on 64 ↵Austin Foxley
bit archs Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2010-02-19fixes to get nptl compiling for x86_64Austin Foxley
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2010-02-19Fixes to get nptl compiling for x86Khem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2010-02-18Fix typo in generated file names.Khem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2010-02-18i386 unify sysdep.hAustin Foxley
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2010-02-18x86_64: unify sysdep.hAustin Foxley
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2010-02-18nptl: Fix clean target to remove generated filesCarmelo Amoroso
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>