summaryrefslogtreecommitdiffstats
path: root/libc/misc/pthread
Commit message (Collapse)AuthorAgeFilesLines
* add missing prototypesPeter S. Mazinger2011-03-031-0/+1
| | | | | | Add some missing prototypes Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* static build: fix internal locking weaks to get pulled in alwaysTimo Teras2010-05-072-41/+0
| | | | | | | | | | | Linker is smart and does not pull in weaks.os, ever. This happens because that compilation unit does not get strong references and ld eliminates dead code. We really need the weaks for static build in a compilation unit that is always there, otherwise it won't work. Signed-off-by: Timo Teras <timo.teras@iki.fi> Acked-by: Roman I Khimov <khimov@altell.ru> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* nptl: fix libc internal, dynamically enabled lockingTimo Teräs2010-04-222-0/+41
| | | | | | | | | | | | | | | | | | | | | 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>
* libc: remove libc weak __pthreads_* wrappersTimo Teras2010-04-163-73/+0
| | | | | | | | | | | | | | | | | 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>
* Merge commit 'origin/master' into nptlAustin Foxley2010-04-021-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | 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>
| * prettify make cleanBernhard Reutner-Fischer2010-03-251-2/+2
| | | | | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* | libc: build tsd only when tls is enabledAustin Foxley2010-02-111-1/+1
| | | | | | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* | whitespace fixesAustin Foxley2009-10-171-1/+0
| | | | | | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* | some tweaks under libc/ needed for nptlAustin Foxley2009-10-172-0/+12
|/ | | | | | | | | | * updated kernel-features.h * system is provided by pt-system with nptl * _exit should do exit_group with nptl * tsd tls ptr in libc * rt_sigwaitinfo impl added Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* support building out-of-treeBernhard Reutner-Fischer2009-08-171-0/+2
| | | | | | Handle O= Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* - less verbose make cleanBernhard Reutner-Fischer2008-11-071-4/+4
|
* these weaks are also needed in libc.so for the time beingEric Andersen2006-12-091-1/+1
|
* oops, use __pthread_mutex_unlock() not pthread_mutex_unlock()Eric Andersen2006-12-091-1/+2
|
* silence a lot of warnings and fix a few genuine bugs while I'm at it.Eric Andersen2006-12-093-2/+28
|
* finish the pthread locking cleanups. This should get things compiling againEric Andersen2006-12-081-1/+1
| | | | though I still need to silence the warnings about _pthread_cleanup_push_defer
* Major cleanup of internal mutex locking. Be more consistant in how we doEric Andersen2006-12-071-0/+3
| | | | | | | things, and avoid potential deadlocks caused when a thread holding a uClibc internal lock get canceled and terminates without releasing the lock. This change also provides a single place, bits/uClibc_mutex.h, for thread libraries to modify to change all instances of internal locking.
* (no commit message)"Steven J. Hill"2006-12-021-0/+5
|
* Remove __libc_internal_tsd_{s,g}et, they do not exist anymorePeter S. Mazinger2006-03-092-36/+0
|
* DOMULTI may be used for libc, the excluded files need work, ↵Peter S. Mazinger2006-02-151-0/+2
| | | | linuxthreads[_db] as well, don't try on slow box
* libc-{a,so,multi}-y replaced by libc-y covering common objects both in ↵Peter S. Mazinger2006-02-131-6/+3
| | | | libc.a/libc.so, the diffs go into libc-static-y/libc-shared-y exclusively, add IMA to libc, don't use any MSRC anymore
* Enable _GNU_SOURCE build wide, trying to get consistent interfaces, else IMA ↵Peter S. Mazinger2006-01-222-2/+0
| | | | is a useless attempt
* update pthread weak handling to the style glibc usesMike Frysinger2006-01-042-101/+11
|
* beautifyMike Frysinger2005-12-291-10/+7
|
* Convert usersPeter S. Mazinger2005-12-161-1/+1
|
* Yeah, suck it up. I'm tired of merging stuff."Steven J. Hill"2005-12-061-0/+5
|
* add some notes (thanks to mjn3) as to why we need these weaks, remove all ↵Mike Frysinger2005-12-021-43/+44
| | | | the weaks that we arent actually using atm, and in general touchup the code
* Remove TOPDIRPeter S. Mazinger2005-11-211-3/+1
|
* this is GNU sourceMike Frysinger2005-11-152-0/+2
|
* Enable IMAPeter S. Mazinger2005-11-031-2/+2
|
* Remove last unused references to libc-a-pic-, we use only the lists in ↵Peter S. Mazinger2005-11-011-1/+0
| | | | libc-a-y for objects that go into static libs, changing their suffix to .os, of they should be PIC
* Replace all Makefiles for new build infrastucturePeter S. Mazinger2005-10-291-32/+8
|
* All Makefile.in's. Only arm/i386/mips/powerpc/x86_64 are done, the other ↵Peter S. Mazinger2005-10-251-0/+26
| | | | archs lack proper crt1. The Makefiles in extra/scripts are intended to be linked into each dir, where it is necessary to build locally.
* Rewrote almost all Makefiles: do not use strip $(x),y; run strip on all ↵Peter S. Mazinger2005-10-121-9/+10
| | | | objects at once; use :=//$</$^; use CRT_SRC/CRT_OBJ/SCRT_OBJ/CSRC/COBJ/SSRC/SOBJ/MSRC/MOBJ where no more is needed, if only CSRC is present use OBJS directly instead of COBJ; CTOR_TARGETS are created directly in lib; remove unused/unneeded parts. Hope I haven't broken too much.
* Clean up pthread include mess. Some of these will be needed to support NPTL, ↵"Steven J. Hill"2005-10-041-11/+1
| | | | but they do no harm for the linuxthreads case. Yes, I tested this.
* weaks moved after the related function so gcc4 won't warnPeter S. Mazinger2005-09-221-12/+12
|
* punt unused __pthread_return_void funcMike Frysinger2005-07-091-6/+0
|
* merge parallel build supportMike Frysinger2005-01-251-5/+4
|
* Joakim Tjernlund writes:Eric Andersen2004-05-141-10/+6
| | | | | | | | | | | Hi Erik It seems to me that __pthread_once and __pthread_initialize_minimal could be made WEAKs with no stub. The code in rpc_thread.c and __uClibc_main.c appears to expect this. Also, __pthread_return_0 __pthread_return_1 and __pthread_return_void can be static, not to pollute the name space. Jocke
* My mistake. We do need some weak pthread_* funcs. But we were previouslyManuel Novoa III2004-01-041-2/+87
| | | | | | | missing one in the glibc abi, and including a number of extras (which I left in commented). Unfortunately, this brings back the perl pthread bug. Fixing the incorrect weaks in libpthread wasn't sufficient to escape the shared loader bug. :-(
* Fix a long-standing bug with pthreads. A couple of linuxthreads filesManuel Novoa III2003-12-271-69/+4
| | | | | | | | | | | | | | | | were including libc-lock.h which had a bunch of weak pragmas. Also, uClibc supplied a number of no-op weak thread functions even though many weren't needed. This combined result was that sometimes the functional versions of thread functions in pthread would not override the weaks in libc. While fixing this, I also prepended double-underscore to all necessary weak thread funcs in uClibc, and removed all unused weaks. I did a test build, but haven't tested this since these changes are a backport from my working tree. I did test the changes there and no longer need to explicitly add -lpthread in the perl build for perl to pass its thread self tests.
* Peter Kjellerstedt writes:Eric Andersen2003-10-181-1/+1
| | | | | | | rm.patch: * Define $(RM) as rm -f in Rules.mak and test/Rules.mak (this is the same definition as gmake uses by default). * Change all occurrences of rm and rm -f into $(RM).
* Be prepared to call __pthread_initialize_minimalEric Andersen2002-08-191-0/+1
|
* Fix use of __pthread_once, and fix rpc usage of thread localEric Andersen2002-08-121-0/+1
| | | | | storage.... -Erik
* Avoid forced -lpthread lnkage when threading is enabledEric Andersen2002-03-091-1/+1
|
* Merge in the pthread library. This is the linuxthreads library taken fromEric Andersen2002-02-203-0/+189
glibc 2.1.3 and ported to work with uClibc by Stefan Soucek and Erik Andersen (me). Stefan has hacked things up such that linuxthreads runs on MMU-less systems (tested only on arm-nommu). Erik cleaned things up and made it work properly as a shared library. -Erik