summaryrefslogtreecommitdiffstats
path: root/libpthread/nptl/pthread_mutex_lock.c
Commit message (Collapse)AuthorAgeFilesLines
* nptl: fix calling convention for __pthread_mutex_cond_lockTimo Teräs2010-08-171-1/+6
| | | | | | | | | | | | | | | | | | 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>
* nptl: use arch-specific pthread_cond_timedwait and pthread_cond_wait on x86_64Roman I Khimov2010-05-031-1/+1
| | | | | | | | | 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>
* nptl: mark forwarded functions protectedTimo Teras2010-04-161-0/+1
| | | | | | | | | 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>
* Revert "nptl: mark symbols with libc forwarder hidden"Timo Teras2010-04-161-1/+0
| | | | | | | | | | 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>
* nptl: mark symbols with libc forwarder hiddenTimo Teräs2010-04-141-0/+1
| | | | | | | | | | | | | 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>
* mass sync with glibc nptlAustin Foxley2010-02-161-30/+406
| | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* nptl: fix old style function declerationsAustin Foxley2009-12-091-2/+1
| | | | | | also fix a few shadowed local warnings Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* libpthread/nptl: core of the "Native Posix Threading Library" for uClibcAustin Foxley2009-10-171-0/+119
| | | | | | targetting arm,sh,i386,mips,sparc for now Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* Back out nptl changes, which for now will be done in branches/uClibc-nptlEric Andersen2005-05-201-119/+0
|
* Import in NPTL code from glibc. For further information please"Steven J. Hill"2005-05-071-0/+119
consult the 'README.NPTL' file.