summaryrefslogtreecommitdiffstats
path: root/libpthread/nptl
Commit message (Collapse)AuthorAgeFilesLines
* nptl_db: handle SUSv4-OBBernhard Reutner-Fischer2012-01-291-1/+1
| | | | | | | pthread_getconcurrency / pthread_setconcurrency is OBSOLETE in SUSv4 so disable pthread debug support too Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* buildsys: fixup sigaction handlingBernhard Reutner-Fischer2012-01-283-21/+5
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* libc_arm: avoid multiple version of __aeabi_unwind_cpp_pr dummy codeCarmelo Amoroso2012-01-273-3/+0
| | | | | | | | | Do not pollute libraries with its own implementation of __aeabi_unwind_cpp_pr1 code. Just add it to uclibc_nonshared.a archive and share it. This fixes build issue with static linking of application due to multiple symbol definition in libgcc_eh-a and libpthread.a or librt.a Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* nptl: .gitignore generated pt-crt{i,n}.SBernhard Reutner-Fischer2012-01-181-0/+2
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* libc: build abort with unwind-info for backtraceBernhard Reutner-Fischer2012-01-151-0/+2
| | | | | | | If backtrace support is turned on, build raise() and abort() with unwind info (fixup 4c9b7f3c21ff21c199e54bfad2fdf3445fa4573d). Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* libc: allow to backtrace out of abort callCarmelo Amoroso2012-01-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Build raise and abort function with dwarf2 info by using -fasynchronous-unwind-tables to make backtrace() working across a call to abort. A scenario where it could be useful is within a signal handler that wants to dump a backtrace when catching some signal (i.e SIGABRT). Without having abort & raise built with DWARF2 information, it is not possible for the libgcc stack unwinder to walk through the call stack out of the abort/raise function. Impacts in terms of size are really limited Current text data bss dec hex filename 164 0 0 164 a4 ./libpthread/nptl/sysdeps/unix/sysv/linux/raise.os 164 0 0 164 a4 ./libpthread/nptl/sysdeps/unix/sysv/linux/raise.oS 220 24 4 248 f8 ./libc/stdlib/abort.os With (-fasynchronous-unwind-tables) text data bss dec hex filename 216 0 0 216 d8 ./libpthread/nptl/sysdeps/unix/sysv/linux/raise.os 216 0 0 216 d8 ./libpthread/nptl/sysdeps/unix/sysv/linux/raise.oS 280 24 4 308 134 ./libc/stdlib/abort.os Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com> Acked-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* nptl: add missing pt-tempname.cBernhard Reutner-Fischer2011-11-241-0/+1
| | | | | | fix bd3c1a2495cbcb51b606f8e4892fcd127f91e645 forgotten file. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* nptl: sem_open: use open64 if LFSBernhard Reutner-Fischer2011-11-181-9/+10
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* misc: hide __gen_tempnameBernhard Reutner-Fischer2011-11-171-1/+1
| | | | | | fix signed vs. unsigned comparison warnings while at it Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* pthreads: fix build when DNS resolver is not enabled.Bernhard Reutner-Fischer2011-10-272-2/+2
| | | | | | | Resolver state is only available if DNS resolver is enabled. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* buildsys: pt-initfini.s depends on uClibc_config.hBernhard Reutner-Fischer2011-06-141-1/+1
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* nptl/pthread: Correct path for machine specific pt-initfini.cKhem Raj2011-06-131-2/+2
| | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* ctor/dtor nptl: Fix init and fini function compilationKhem Raj2011-06-132-8/+22
| | | | | | | | | | | | We need to define the rules for .S files so it gets the include paths some architectures like mips include headers Some architectures e.g. SH have their own version of pt-initfini.c so look for that first before resorting to generic version of pt-initfini.c Signed-off-by: Khem Raj <raj.khem@gmail.com>
* nptl/Makefile.in: Fix the build break caused by UCLIBC_CTOR_DTOR enablingKhem Raj2011-06-101-2/+2
| | | | | | | | Extra / somehow does not match the target and complains that $(top_builddir)libpthread/nptl/sysdeps/pthread/crti.o has no rules to build Signed-off-by: Khem Raj <raj.khem@gmail.com>
* NPTL: Fix CTOR_DTORBernhard Reutner-Fischer2011-05-315-35/+32
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* unwind.h: Move to libc/sysdeps from nptl sysdepsKhem Raj2011-05-131-279/+0
| | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* commentary typo fixBernhard Reutner-Fischer2011-05-111-1/+1
| | | | | | s/decriptor/descriptor/ Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* commentary typo fixBernhard Reutner-Fischer2011-05-113-4/+4
| | | | | | use cancellation (with two 'l') uniformly. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* lll: avoid shadow warningsBernhard Reutner-Fischer2011-05-113-80/+80
| | | | | | use __ret uniformly to avoid shadow warnings as seen on x86_64. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* libubacktrace: mv unwind.h to includeBernhard Reutner-Fischer2011-05-111-220/+0
| | | | | | | Fixes compilation if NPTL is off. I hope this doesn't break ARM EABI but cannot check ATM. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* remove trailing ';' from _syscallX()Peter S. Mazinger2011-03-091-1/+1
| | | | Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* nptl: fix compilation on x86_64William Pitcock2011-03-086-14/+6
| | | | | | | | This commit gives us a fully functioning NPTL on x86-64 by using the GOTOFF macro as needed. Signed-off-by: William Pitcock <nenolod@dereferenced.org> Signed-off-by: Khem Raj <raj.khem@gmail.com>
* nptl: fix use of IS_IN_LIBPTHREAD macroCarmelo Amoroso2011-03-041-1/+1
| | | | | | IS_IN_LIBPTHREAD should be IS_IN_libpthread instead. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* add missing prototypesPeter S. Mazinger2011-03-034-2/+19
| | | | | | Add some missing prototypes Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* use common sigthread.hPeter S. Mazinger2011-03-031-44/+0
| | | | | | | NPTL build did not use the correct bits/sigthread.h, use a common version avoiding this. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* add missing prototypesPeter S. Mazinger2011-03-033-0/+4
| | | | | | Add some missing prototypes Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* syntax fixesPeter S. Mazinger2011-03-031-4/+4
| | | | | | Avoid compile warnings about the use of undefined constants Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* avoid warnings on _STACK_GROWS_* usagePeter S. Mazinger2011-03-033-11/+11
| | | | Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* nptl:arm: add a wrapper for .cfi_sections pseudo-opsCarmelo Amoroso2011-02-252-2/+2
| | | | | | | | | | | | | | | | ARM disables by default the support for ASM CFI directives. Anyway using an old version of binutils that does not support some new pseudo-op, the build fails as below: AS libpthread/nptl/sysdeps/unix/sysv/linux/close.oS libpthread/nptl/sysdeps/unix/sysv/linux/close.S: Assembler messages: libpthread/nptl/sysdeps/unix/sysv/linux/close.S:9: Error: unknown pseudo-op: `.cfi_sections' The problem is that the .cfi_sections pseudo should be wrapped by a macro that expands to nothing when the CFI is off. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com> CC: Khem Ray <ray.khem@gmail.com>
* arm: mv nptl specific atomic impl to common placeBernhard Reutner-Fischer2011-02-091-122/+0
| | | | | | Thanks to Nitin Garg for notincing! Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* arm: fix the static link problem for ARM due to undefined __tls_get_addrNitin Garg2011-02-022-0/+38
| | | | | Signed-off-by: Nitin Garg <nitingarg98@gmail.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* nptl/mips64: Fix build when using mips64 and ABIs other than o32Khem Raj2011-01-291-1/+3
| | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* nptl: Fix __USER_LABEL_PREFIX__ concatenatioWill Newton2011-01-201-6/+8
| | | | | | | | | | The current C macro magic does not correctly concatenate the __USER_LABEL_PREFIX__ string on architectures where it has a non-empty value. We need to use __stringify to get the desired behaviour. Signed-off-by: Will Newton <will.newton@imgtec.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* nptl: fix start_thread() for _STACK_GROWS_UPWill Newton2011-01-201-2/+2
| | | | | | | | This patch adds a working implementation of pthread_create for architectures where STACK_GROWS_UP. Signed-off-by: Matt Fleming <matthew.fleming@imgtec.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* nptl: get rid of the last preprocessor warning when __ASSUME_TGKILL is not ↵Carmelo Amoroso2011-01-051-1/+1
| | | | | | | | defined A missing change in the previous commit. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* nptl: get rid of preprocessor warning when __ASSUME_TGKILL is not definedCarmelo Amoroso2011-01-045-9/+9
| | | | | | | | | A sample of the warning reported while building for ARM that has not __ASSUME_TGKILL defined. libpthread/nptl/sysdeps/unix/sysv/linux/raise.c: In function 'raise': libpthread/nptl/sysdeps/unix/sysv/linux/raise.c:33:5: warning: "__ASSUME_TGKILL" is not defined Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* sparc: fix linking issue with __syscall_error.cAustin Foxley2010-12-292-1/+6
| | | | | | | | | | | Finally got around to testing out latest master and noticed that some buildsystem work last summer broke shared-builds of nptl on sparc. A version of __syscall_error.c needs to be linked into both libpthread and librt Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* sem_open.c/sem_unlink.c: Use INTUSE macro to get proper function call to ↵Khem Raj2010-12-182-2/+2
| | | | | | | | | __pthread_once We need to use __pthread_once_internal if available this macro is therefore used to notify that. Signed-off-by: Khem Raj <raj.khem@gmail.com>
* nptl: If DOPIC is set then we missed a rule to generate .os variants for ↵Khem Raj2010-12-181-0/+4
| | | | | | pt-*.c files Signed-off-by: Khem Raj <raj.khem@gmail.com>
* nptl: fix Unwind_Resume PLT callsTimo Teräs2010-12-092-7/+15
| | | | | | | | | | My change a49b3a18e463cbe8c94c41501e386e7f4c61609e fixed two Unwind_Resume calls to go via PLT to avoid text relocations for PIC builds. However, it looks the reason for upstream not using PLT calls is that ebx gets clobbered. So we need to reload it. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* libc_sh: add __tls_get_addr to static libc (SH)Filippo Arcidiacono2010-12-012-1/+32
| | | | | | | | | | Add __tls_get_addr function to static libc allowing to handle local dynamic TLS access model. On SH, linker optimizations are not required, so __tls_get_addr can be called even in statically linked binaries. Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* Revert "libc_tls: Do not include generic libc-tls from arch specific ↵Carmelo Amoroso2010-12-012-0/+2
| | | | | | | | | | | | | implementation" This reverts commit 0c468129356f5ce6780e7369c271d74631ae03ba. Indeed recent updates into buildsys managed to filter-out generic implementation when arch specific one is defined, so duplicated symbols into the libc.a In the meanwhile, do a minor fix into mips version not using relative path to include <generic/libc-tls.c> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* libc_tls: Do not include generic libc-tls from arch specific implementationCarmelo Amoroso2010-11-292-2/+0
| | | | | | | | | | | libpthread/nptl/sysdeps/generic/libc-tls.c is built as well, so it does not need that arch specific version of libc-tls.c (MIPS and ALPHA) includes it. The arch libc-tls.s is aimed to provide the implementation of __tls_get_addr for the static libc.a, because on these archs the linker relaxations are not required and it could be possible to have local-dynamic access models in static libraries as well. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* ntpl: fix static linking by not leaking SSP_ALL_CFLAGSNatanael Copa2010-11-1115-16/+0
| | | | | | | | | | | | | | | The SSP_ALL_CFLAGS in nptl arch CFLAGS leaks out and forces things like dl-support.c, brk.c, sbrk.c memcpy, etc to be built with -fstack-protector-all. This is bad when linking statically since initializing TLS will call those functions before SSP is initialized. The libpthread itself will still be built with -fstack-protector-all due to CFLAGS-nptl has SSP_ALL_CFLAGS in libpthread/nptl/Makefile.in Thanks to Timo Teras for helping with this. Signed-off-by: Natanael Copa <natanael.copa@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* mips: fix errno setting after syscallAlexander Gordeev2010-10-271-2/+2
| | | | | | | | | | | | | | | If there was an error during syscall then after it's completion a3 register holds a non-zero value and v0 holds an actual error code which should be saved in errno. This can be achieved by calling __syscall_error with the value from v0 as a parameter. So this value should be stored in a0, but the appropriate assembly instructions are missing. Fixed this now by adding "move a0, v0". I think it was once fixed by 58c5f8ba4cdf62342d05a546d15404cbbb3c4e07 but then something went wrong. Again... Signed-off-by: Alexander Gordeev <lasaine@lvk.cs.msu.su> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* *: inline constant __sig{add,del}set and __sigismemberDenys Vlasenko2010-10-221-1/+1
| | | | | | | | | | | | text data bss dec hex filename - 318 4 0 322 142 libc/pwd_grp/lckpwdf.o + 312 4 0 316 13c libc/pwd_grp/lckpwdf.o - 166 0 1 167 a7 libc/stdlib/abort.o + 157 0 1 158 9e libc/stdlib/abort.o - 42 0 0 42 2a libc/sysdeps/linux/common/pause.o + 27 0 0 27 1b libc/sysdeps/linux/common/pause.o Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* nptl: fix static linkingNatanael Copa2010-09-091-2/+2
| | | | | | | | We need dl-tls.c for static libc or we will get missing symbols when linking thinkgs like openssl static. Signed-off-by: Natanael Copa <natanael.copa@gmail.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* nptl: fix calling convention for __pthread_mutex_cond_lockTimo Teräs2010-08-172-3/+10
| | | | | | | | | | | | | | | | | | The assembly versions of pthread_cond_wait calls __pthread_mutex_cond_lock and __pthread_mutex_cond_lock_adjust using internal calling convention (which differs from default calling convention at least on x86). Thus these two functions must be defined with internal_function or the call sequence goes wrong. __pthread_mutex_cond_lock resides in sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c, but it does evil macro definitions and includes pthread_mutex_lock.c, so we need to add some extra kludge to pthread_mutex_lock.c to get the prototypes correctly. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* Revert "nptl i686: fix pthread_cond_wait.S compilation"Bernhard Reutner-Fischer2010-08-051-1/+0
| | | | This reverts commit f71c0d8af11252f119fad04938ddd5501a7df21a.
* nptl: fix x86 assembly PIC relocationsTimo Teräs2010-08-052-2/+2
| | | | | | | | Unwind_Resume needs to be called via PLT. Most calls are already proper, this fix the remaining two problems. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>