summaryrefslogtreecommitdiff
path: root/libpthread
AgeCommit message (Collapse)Author
2015-01-01fix cast warningThorsten Glaser
Signed-off-by: Thorsten Glaser <tg@mirbsd.org>
2014-12-15mkostemp: fix implementationAnthony G. Basile
mkostemp(char *template, int flags) generates a unique temporary filename from a template. The flags parameter accepts three of the same flags as open(2): O_APPEND, O_CLOEXEC, and O_SYNC. The current implementation of mkostemp(3) does not respect the flags and in fact confuses the flags with the file mode which should always be S_IRUSR | S_IWUSR. This patch corrects this issue. Signed-off-by: Anthony G. Basile <blueness@gentoo.org> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-12-10mkostemp: fix implementationAnthony G. Basile
mkostemp(char *template, int flags) generates a unique temporary filename from a template. The flags parameter accepts three of the same flags as open(2): O_APPEND, O_CLOEXEC, and O_SYNC. The current implementation of mkostemp(3) does not respect the flags and in fact confuses the flags with the file mode which should always be S_IRUSR | S_IWUSR. This patch corrects this issue. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-11-13Merge remote-tracking branch 'origin/upstream'Waldemar Brodkorb
2014-11-13nptl: compile pt-vfork in ARM-modeBernhard Reutner-Fischer
could need a thumb implementation.. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-10-03linuxthreads: fix compile error for non-MMUWaldemar Brodkorb
Otherwise you get following linking error, because of missing functions in libc.a: undefined reference to `__libc_enable_asynccancel' Fix by Thorsten Glaser while hacking session.
2014-10-03m68k: fix linuxthreads compile for coldfireWaldemar Brodkorb
The tas instruction is not available for most coldfire CPU's. Use bset instead in this case as already used in linuxthreads.old.
2014-09-22xtensa: add support for NPTLWaldemar Brodkorb
Changes from: https://github.com/foss-xtensa/uClibc/commits/xtensa_nptl Author: Chris Zankel <chris@zankel.net> Author: Baruch Siach <baruch@tkos.co.il>
2014-09-20linuxthreads: remove unused s390 codeWaldemar Brodkorb
Cleanup linuxthreads by removing unused s390 code. Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
2014-09-20nptl: remove duplicate vfork() in libpthreadWaldemar Brodkorb
Automatic patching via two oneliners by Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>: sed -i -e 's/[[:space:]]pt-vfork\.[csS]//' -e '/^ASFLAGS-pt-vfork\./d' $(git grep -l pt-vfork libpthread/nptl/sysdeps) find libpthread/nptl -name "*pt-vfork*" -exec git rm {} \; Reported-By: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
2014-09-16buildsys: remove now redundant lib placement definesBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-09-16buildsys: fix IS_IN_lib*Bernhard Reutner-Fischer
define NOT_IN_libc / IS_IN_libxxx appropriately to fix pthread_once Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-09-16nptl: rephrase *.sym handlingBernhard Reutner-Fischer
Avoids circular dependency warning from make by generating the .h directly from the .sym files, elimination intermediate files. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-09-04sparc: remove sparc64/sparcv9 codeWaldemar Brodkorb
The sparc64/sparcv9 code is incomplete. Furthermore there is no real embedded hardware for sparc64 available, so better remove it until someone comes up with a complete port. Signed-off-by: Waldemar Brodkorb <wbx@openadk.org> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-08-28sparc: add missing pthread_spin_lock/pthread_spin_trylockWaldemar Brodkorb
tst-spin1.c compile breaks with: test/nptl/tst-spin1.c:34: undefined reference to `pthread_spin_lock' pthread_spin_lock and pthread_spin_trylock is missing while building sparc. add the meta c files here. Signed-off-by: Waldemar Brodkorb <wbx@openadk.org> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-08-28sparc: remove unused subdirs variableWaldemar Brodkorb
For sparc TARGET_SUBARCH is never used. And there is a typo in the path. Signed-off-by: Waldemar Brodkorb <wbx@openadk.org> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-08-18uclibc: nptl: fix __lll_lock_wait_private multiple definitionTony Wu
Mark non-pthread __lll_lock_wait_private weak to avoid multiple definition error in static link mode. Signed-off-by: Tony Wu <tung7970@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-08-18ARC/NPTL: Fix __libc_sigaction redefinition with static linksVineet Gupta
Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-08-18NPTL: ARC supportVineet Gupta
Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-06-12NPTL: Fix undefined reference to PRIVATE_FUTEX with 2.6.18 kernelDan Moulding
When compiling against the 2.6.18 kernel headers, during linking of the NPTL library it runs into a "undefined reference to PRIVATE_FUTEX" error in pthread_cond_timedwait.S. This resolves the problem by ensuring that the definition for PRIVATE_FUTEX is made available to pthread_cond_timedwait.S. Signed-off-by: Dan Moulding <dan.moulding@rackwareinc.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-04-01Fix warnings in MIPS buildSteve Ellcey
This patch fixes the rest of the set-but-not-used warnings in the MIPS code by using attribute_unused and also fixes some conversion warnings by changing __arch_compare_and_exchange_xxx_[8|16]_int. Assigning __cmp (int type) to __prev (pointer type) generates a warning. Assigning zero to each separately avoids this warning without having to add a cast. Signed-off-by: Steve Ellcey <sellcey@mips.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-02-02mips: silence 'set but not used' warningsSteve Ellcey
This patch uses 'attribute_unused' to clean up a number of warnings messages that are generated when doing a MIPS build. All of the changes are in MIPS specific files and there are no code changes other then adding the unused attribute where needed. Signed-off-by: Steve Ellcey <sellcey@mips.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-01-15nptl: Fix arm pt-vforkBernhard Reutner-Fischer
We were ending up with an unrecognised CPP token (which is not diagnosed for assembler-with-cpp, 59805) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-01-14buildsys: metag: Remove inappropriate commentBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-12-20LT.old: Add ARC supportVineet Gupta
Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-12-20NPTL: fork: relief register pressure on arm thumb1Bernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-07-04libpthread: pthread_exit in static app. segfaultsFilippo ARCIDIACONO
Static applications that call pthread_exit on the main thread segfault. This is because after a thread terminates __uClibc_main decrements __nptl_nthreads which is only defined in pthread_create. Therefore the right solution is to add a requirement to pthread_create from pthread_exit. This patch has been backported from glibc tree: http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=e1f0b2cfa14b058ab033431b70428ccda8ec6ed0 For further detail see also glibc bug at: http://sourceware.org/bugzilla/show_bug.cgi?id=12310 Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com> Cc: Vladimir Nikulichev <v.nikulichev@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-03-20LT.old: add missing prototypesBernhard Reutner-Fischer
to silence warning Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-03-14metag: Add NPTL supportMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-03-13LT{,.old}: include stddef.h for size_tVineet Gupta
A user application built with -D_POSIX_C_SOURCE=200112L and #include signal.h, yields following compilation error: ------------------->8----------------------------- arc-linux-uclibc-gcc -D_POSIX_C_SOURCE=200112L hello.c In file included from /opt/INSTALL/lib/gcc/arc-linux-uclibc/4.4.7/../../../../arc-linux-uclibc/sys-include/signal.h:429, from hello.c:1: /opt/INSTALL/lib/gcc/arc-linux-uclibc/4.4.7/../../../../arc-linux-uclibc/sys-include/bits/pthreadtypes.h:48: error: expected specifier-qualifier-list before 'size_t' ------------------->8----------------------------- The fix is to make sure size_t is explicitly provided to pthreadtype.h Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-03-07buildsys: Add missing $(SYMBOL_PREFIX) to symbol namesMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-03-07libpthread: Remove useless .cvsignore filesMarkos Chandras
Signed-off-by: Markos Chandras <hwoarang@gentoo.org> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-27nptl/allocatestack.c: Fix stack mprotect alignment for STACK_GROWS_UPMarkos Chandras
mprotect() expects the first argument to be aligned to a page boundary. Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20not-cancel.h: Use openat if arch does not have the open syscallMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-01-14LT.old: reinstate buildBernhard Reutner-Fischer
As noted by Florian Fainelli: LD libpthread-0.9.34-git.so libpthread/linuxthreads.old/libpthread_so.a(wrapsyscall.oS): In function `fcntl64': wrapsyscall.c:(.text+0xd8): undefined reference to `__libc_fcntl64' libpthread/linuxthreads.old/libpthread_so.a(wrapsyscall.oS): In function `lseek64': wrapsyscall.c:(.text+0x190): undefined reference to `__libc_lseek64' libpthread/linuxthreads.old/libpthread_so.a(wrapsyscall.oS): In function `pread64': wrapsyscall.c:(.text+0x39c): undefined reference to `__libc_pread64' Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-01-10libc: add {get,set,swap,make}context user context manipulation functionsFlorian Fainelli
Add the obsolescent SUSv3 family of user context manipulating functions for arm, i386, mips, x86_64. Signed-off-by: Timon ter Braak <timonterbraak@gmail.com> Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-01-08arm: workaround GCC PR target/53735 with fork()Bernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-11-18drop support for pre ISO-C compilersMike Frysinger
This drops __signed, __volatile, and __const. Only the latter was used in the code base, and for uClibc, not consistently. Much of the code used plain "const" which meant "__const" was useless. Really, the point of this is to stay in sync with what glibc did. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-11-18Replace FSF snail mail address with URLsMike Frysinger
This matches a similar change made to glibc. No functional changes here. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-11-18nptl: fix gcc noreturn warningMike Frysinger
Current builds show the warning: CC libpthread/nptl/pthread_create.os libpthread/nptl/pthread_create.c: In function 'start_thread': libpthread/nptl/pthread_create.c:418:3: warning: function declared 'noreturn' has a 'return' statement [enabled by default] libpthread/nptl/pthread_create.c:418:3: warning: 'noreturn' function does return [enabled by default] Looking at glibc, it does not mark this function as noreturn. Testing code size, gcc is smart enough to detect the code never actually returns regardless of the attribute. So drop it to keep in sync with glibc and to avoid the warnings. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-11-18nptl: fix gcc noreturn warningMike Frysinger
Current builds show the warning: CC libpthread/nptl/sysdeps/unix/sysv/linux/mq_notify.os libpthread/nptl/sysdeps/unix/sysv/linux/mq_notify.c: In function 'helper_thread': libpthread/nptl/sysdeps/unix/sysv/linux/mq_notify.c:142:3: warning: function declared 'noreturn' has a 'return' statement [enabled by default] Looking at glibc, it does not mark this function as noreturn. Testing code size, gcc is smart enough to detect the while(1){} never actually returns regardless of the attribute. So drop it to keep in sync with glibc and to avoid the warning. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-11-03xtensa: use atomic instructions instead of a syscallChris Zankel
Replace system calls with atomic instructions for 'compare and swap' in linuxthreads.old. Signed-off-by: Chris Zankel <chris@zankel.net>
2012-08-29librt: re-add SIGCANCEL to the list of blocked signal in helper threadFilippo Arcidiacono
Indeed if the libpthread is before the libc in the library look up the SIGCANCEL is removed from the list of the blocked signal by sigfillset func, this can produce the handler not properly called. This commit revert what Denys modified in commit 162cfaea20d807f0ae329efe39292a9b22593b41. Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2012-07-24Remove pragma weak for undeclared symbolBernd Schmidt
pthread_initialize is a static function and should not be mentioned in a header. The #pragma weak for it appears to confuse gcc-4.7. Signed-off-by: Bernd Schmidt <bernds@codesourcery.com
2012-07-24Remove use of attribute_shared_hiddenBernd Schmidt
This attribute is not defined anywhere. Removed its use to make the file compile. Signed-off-by: Bernd Schmidt <bernds@codesourcery.com>
2012-06-19nptl: sh: fix race condition in lll_wait_tidStas Sergeev
Make a local copy of the tid value to avoid a race condition, as the value could have been changed to 0, thus using a pointer it would have been passed to the lll_futex_wait modified. Signed-off-by: Stas Sergeev <stsp@users.sourceforge.net> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2012-06-15remove arm specific sysdep.h from linuxthreads newPeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15linuxthreads.old: build all objects twice, once for shared lib and once for ↵Peter S. Mazinger
static Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15internals.h: mark __pthread_message hiddenPeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15linuxthreads.old: move libpthread_hidden_proto to headerPeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>