Age | Commit message (Collapse) | Author |
|
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
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>
|
|
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>
|
|
This matches a similar change made to glibc.
No functional changes here.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
Replace system calls with atomic instructions for 'compare and swap'
in linuxthreads.old.
Signed-off-by: Chris Zankel <chris@zankel.net>
|
|
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
|
|
This attribute is not defined anywhere. Removed its use to make the file
compile.
Signed-off-by: Bernd Schmidt <bernds@codesourcery.com>
|
|
static
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Use __UCLIBC_HAS_TLS__ instead of USE___THREADS (although this LT implementation
will never support TLS).
Disable unused/unneeded members of the pthread_functions structure.
No redirect/forward for _pthread_cleanup_push/pop, it would have not worked anyway
due to the fact, that the structure member was not initialized. Disable it's possible
internal use in libc-lock.h.
Avoid using internals.h in libc_pthread_init.c (moving a prototype to pthread-functions.h).
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Rename PAGE_SIZE to __PAGE_SIZE to be sure that we do not get the
definition from uClibc_page.h.
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Keep only fork (and it's hidden variant) and __libc_fork.
Common __libc_fork prototype in unistd.h.
Get rid of __fork, by changing HIDDEN_JUMPTARGET(__fork) to use fork
I can't see the reason to have fork() in libpthread, but kept it for now
making __fork static in these files.
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
LT old and new provided SEM_VALUE_MAX in semaphore.h, NPTL in local_lim.h
Make sure to get the same definitions, independently of the fact, that
semaphore.h is included or not.
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
else SEM_VALUE_MAX will be undefined
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Provide common prototypes for __longjmp, __libc_longjmp, __libc_siglongjmp
_longjmp_unwind, __libc_unwind_longjmp in setjmp.h in preparation for use in LT new
Add __longjmp to h8300 and i960
Make common longjmp.c good for NPTL
Guard _longjmp_unwind use in sh's longjmp.c for NPTL (I think sh could use the common one)
Remove unneeded attribute_noreturn, prototype provides it already
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
it is already included by features.h
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Pull in the epoll header for the epoll structs.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
Should be no functional changes; just fixing:
libpthread/linuxthreads.old/manager.c: In function 'pthread_free':
libpthread/linuxthreads.old/manager.c:707:9: warning:
variable 'h_bottom_save' set but not used [-Wunused-but-set-variable]
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
This matches the newer linuxthreads code, and fixes the build warning:
libpthread/linuxthreads.old/manager.c: In function 'pthread_handle_create':
libpthread/linuxthreads.old/manager.c:487:7: warning:
variable 'saved_errno' set but not used [-Wunused-but-set-variable]
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
Move spin_count down to the code block where it's used to fix the warning:
libpthread/linuxthreads.old/spinlock.c: In function '__pthread_lock':
libpthread/linuxthreads.old/spinlock.c:70:7: warning:
variable 'spin_count' set but not used [-Wunused-but-set-variable]
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
Reported-by: Tony Wu <tung7970@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
These stubs get used in libc as forwarding funcs, so we don't want them
labeled as hidden. Otherwise, attempting to use them in other libraries
(like libdl) will result in references to symbols that only libpthread
provides. Such as:
/usr/bin/python2.6: can't resolve symbol '__pthread_mutex_lock' in lib '/lib/libdl.so.0'.
This also brings the old code in line with the newer linuxthreads.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
sparc target has assembly implementations of clone.S that doesn't
get used, and thus the build breaks. Also, sparc is missing a header file in
pthreads.old that exists in pthreads.new.
Signed-off-by: Rob Landley <rob@landley.net>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
|
|
While there, fix epoll_pwait syscall, it takes 6 arguments
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
use cancellation (with two 'l') uniformly.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
This adds support for the TI C6X family of processors.
Signed-off-by: Mark Salter <msalter@redhat.com>
Signed-off-by: Aurelien Jacquiot <a-jacquiot@ti.com>
Signed-off-by: Bernd Schmidt <bernds@codesourcery.com>
|
|
On C6X, the stack pointer points to a word that is not part of the current
function's stack frame. It may be overwritten by callees. Take this into
account when creating the stack for a cloned thread.
Signed-off-by: Bernd Schmidt <bernds@codesourcery.com>
|
|
This adds support for a new binary format, DSBT ELF, to the Makefiles.
Every shared library is assigned a DSBT index, and the link.so macro is
adjusted to ensure the correct linker argument is passed.
Configuration and ldso support will follow in separate commits.
Signed-off-by: Bernd Schmidt <bernds@codesourcery.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
STRICT_HEADERS
Remove ucontext.h if SUSV4_LEGACY is not set and fix it's references.
Guard sigstack structure with SUSV4_LEGACY and STRICT_HEADERS.
Disable sigstack function prototype, it is not provided by uClibc.
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
|
|
Because the nommu address space is flat, and the application stack can
literally be located anywhere, we cannot rely on the assumptions that the
mmu port gets away with. Namely, that the first thread's stack lives at
the top of memory and nothing will be created above it.
Currently, the code rounds the current stack up a page and sets that as
the "top" of the stack, and then marks the "bottom" of the stack as "1".
Then as new threads are created, this assumption is further refined by
slowly backing off the "bottom" when a new stack is created within the
range of the initial stack.
Simple ascii example (tid0 is the initial thread):
1 thread:
[bos tid0 stack tos]
2 threads:
[ tid0 stack ]
[tid1 stack]
3 threads:
[ tid0 stack ]
[tid1 stack]
[tid2 stack]
As you can kind of see, this algorithm operates on one basic assumption:
the initial top of stack calculation is the absolute top of the stack.
While this assumption was fairly safe in the original nommu days of yore
where the only file format was FLAT (which defaults to a 4KiB stack --
exactly 1 page), and memory was fairly tight, we can see that this falls
apart pretty quickly as soon as the initial stack is larger than a page.
The issue that crops up now is simple to hit: start an application with
an 8KiB stack, execute some functions that put pressure on the stack so
that it exceeds 4KiB, then start up some threads. The initial tos will
be rounded up by a page, but this is actually the middle of the stack.
Now when the initial thread returns from its functions (thus unwinding
the stack) and tries to call something which calls back into libpthread,
the thread_self() func fails to detect itself as the initial thread as
the current stack is now above the tos. The __pthread_find_self() func
kicks in, walks all the thread arrays, fails to find a hit, and then
walks into uninitialized memory for the thread descriptor. Use of this
garbage memory has obvious results -- things fall down & go boom.
To address this, I extend the current algorithm to automatically scale
back both the bottom and the top stack limits of the initial thread.
We use the current stack pointer at "thread boot time" only as a single
known point. The initial thread stack bottom is set to the bottom of
memory and the initial thread stack top is set to the top of memory.
Then as we create new stack threads, we figure out whether the new stack
is above or below the single known good address, and then scale back
either the tos or the bos accordingly.
Reviewed-by: Steven J. Magnani <steve@digidescorp.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
Header files needed to build linuxthreads.old for microblaze.
Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
also sync up not-cancel.h headers between all three thread libraries
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
|
|
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>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
This patch will convert all the #ifdef USE_TLS and #if USE_TLS to
#if defined(USE_TLS) && USE_TLS.
By checking if the USE_TLS is defined before checking its value will result in
correct behavior for architectures not defining this config symbol.
Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Acked-by: Carmelo AMOROSO <carmelo.amoroso@st.com>
|
|
This reverts commit e0ac4efbdb498319f03a2a95d75d061ab6c68491.
Was causing segfaults on every pthread linked executable
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
|
|
A lot of libc code calls the pthread cleanup funcs implicitly (for stdio)
which currently goes through the PLT. Since we already have forwarding
symbols for these funcs, it's safe to declare the internal libc usage
hidden as a loaded libpthread will have the real symbols found.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
sed -i -e '/Experimentally off - /d' $(grep -rl "Experimentally off - " *)
sed -i -e '/^\/\*[[:space:]]*libc_hidden_proto(/d' $(grep -rl "libc_hidden_proto" *)
should be a nop
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|