Age | Commit message (Collapse) | Author |
|
Add missing includes and function decls.
Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
|
|
|
|
|
|
Thomas has repored failure building ARM 32-bit systems for ARMv8 cores
CC libpthread/linuxthreads/mutex.os
/tmp/ccn8SFKU.s: Assembler messages:
/tmp/ccn8SFKU.s:162: Error: swp{b} use is obsoleted for ARMv8 and later
/tmp/ccn8SFKU.s:186: Error: swp{b} use is obsoleted for ARMv8 and later
/tmp/ccn8SFKU.s:203: Error: swp{b} use is obsoleted for ARMv8 and later
/tmp/ccn8SFKU.s:224: Error: swp{b} use is obsoleted for ARMv8 and later
make[1]: *** [Makerules:369: libpthread/linuxthreads/mutex.os] Error 1
This is due to libpthread/linuxthreads/sysdeps/arm/pt-machine.h which
uses the swp instruction that is not allowed on ARMv8.
All __ARM_ARCH >= 7 support ldrex/strex instructions, so unlock
testandset() varaint for them.
Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
|
|
O0 build result in the following codegen
00000000 <ldrex>:
0: b480 push {r7}
2: b085 sub sp, #20
4: af00 add r7, sp, #0
6: 6078 str r0, [r7, #4]
8: 687b ldr r3, [r7, #4]
a: e853 3f00 ldrex r3, [r3]
e: 60fb str r3, [r7, #12]
10: 68fb ldr r3, [r7, #12]
12: 4618 mov r0, r3
14: 3714 adds r7, #20
16: 46bd mov sp, r7
18: f85d 7b04 ldr.w r7, [sp], #4
1c: 4770 bx lr
0000001e <strex>:
1e: b480 push {r7}
20: b085 sub sp, #20
22: af00 add r7, sp, #0
24: 6078 str r0, [r7, #4]
26: 6039 str r1, [r7, #0]
28: 687b ldr r3, [r7, #4]
2a: 683a ldr r2, [r7, #0]
2c: e842 3300 strex r3, r3, [r2]
30: 60fb str r3, [r7, #12]
32: 68fb ldr r3, [r7, #12]
34: 4618 mov r0, r3
36: 3714 adds r7, #20
38: 46bd mov sp, r7
3a: f85d 7b04 ldr.w r7, [sp], #4
3e: 4770 bx lr
00000040 <testandset>:
40: b590 push {r4, r7, lr}
42: b083 sub sp, #12
44: af00 add r7, sp, #0
46: 6078 str r0, [r7, #4]
48: 6878 ldr r0, [r7, #4]
4a: f7ff fffe bl 0 <ldrex>
4e: 4603 mov r3, r0
50: 461c mov r4, r3
52: 6879 ldr r1, [r7, #4]
54: 2001 movs r0, #1
56: f7ff fffe bl 1e <strex>
5a: 4603 mov r3, r0
5c: 2b00 cmp r3, #0
5e: d1f3 bne.n 48 <testandset+0x8>
60: 4623 mov r3, r4
62: 4618 mov r0, r3
64: 370c adds r7, #12
66: 46bd mov sp, r7
68: bd90 pop {r4, r7, pc}
ARM ARM suggests that LoadExcl/StoreExcl loops are guaranteed to make
forward progress only if, for any LoadExcl/StoreExcl loop within a
single thread of execution, the software meets all of the following
conditions:
1 Between the Load-Exclusive and the Store-Exclusive, there are no
explicit memory accesses, preloads, direct or indirect System
register writes, address translation instructions, cache or TLB
maintenance instructions, exception generating instructions,
exception returns, or indirect branches.
...
Obviously condition is not met for O0 builds.
O2 build (which is highly likely the most common setting) able to do
the right thing resulting in
00000000 <ldrex>:
0: e850 0f00 ldrex r0, [r0]
4: 4770 bx lr
6: bf00 nop
00000008 <strex>:
8: e841 0000 strex r0, r0, [r1]
c: 4770 bx lr
e: bf00 nop
00000010 <testandset>:
10: 2101 movs r1, #1
12: 4603 mov r3, r0
14: e853 0f00 ldrex r0, [r3]
18: e843 1200 strex r2, r1, [r3]
1c: 2a00 cmp r2, #0
1e: d1f9 bne.n 14 <testandset+0x4>
20: 4770 bx lr
22: bf00 nop
Rather than depending on level of optimisation implement whole
ldrex/strex loop in inline assembly.
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
|
|
Add XCHAL definitions for S32C1I and EXCLUSIVE options to
xtensa-config.h, include it in places that implement atomic operations
and add implementations with exclusive access option opcodes.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
|
|
Replace "a" constraints with "+m" to avoid forcing atomic variable
address into a register and let the compiler use non-zero offset in
load/store opcodes.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
|
|
More applications are using pthread_condattr_setclock()/
pthread_condattr_getclock() in their code. Port these two
functions from NPTL over to be more compatible.
|
|
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
|
|
This commit includes following features.
1. Support NPTL/TLS
2. Add libm function which is used to handle FP rounding and excpetions
(ex: fclrexcpt,fedisblxcpti,feenablxcpt... )
3. Add *context function for operating user context
(ex: setcontext,getcontext,makecontext... )
4. Change the return flow from signal handler
5. Cleanup of old code
The testsuite only has 2 errors, tst-cpuclock1 and tst-cputimer1,
which are related to timing accuracy. (math and locale tests are disabled)
Signed-off-by: Vincent Ren-Wei Chen <vincentc@andestech.com>
|
|
|
|
There is not possible to use use fork() on noMMU target, so exporting
pthread_atfork() for such target is useless.
A program using pthread_atfork() will likely fail at runtime due to the
error code returned by this function.
Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
|
Somehow this got removed with f1d7505e40654a185843bdc8f1cf1fd00ab55c04.
Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
|
Similar to musl libc a single libc has many benefits and solves
some open issues with uClibc-ng.
- no pthread_mutex_* weak symbols exported anymore
- applications no longer failing to link when either
-lrt or -lpthread are missing for dynamic and static linking mode
- smaller C library
- slightly better runtime performance
|
|
[ glibc commit d3c7e68655 ]
Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com>
|
|
Add support for Andes Technology NDS32 architecture.
See here http://www.andestech.com/en/index/index.htm for more
informaton. Verification of the port from an older uClibc
port was done on a sponsored AG101p board.
The testsuite only has 5 errors, three are related to
an existing bug in dlclose() with LT.old, also happening
on cris32 and m68k.
Failures to fallocate/posix_fallocate are unresolved.
Thanks to Andes Technology sponsoring the hardware and
being very helpful while doing the uClibc-ng porting.
Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
|
|
Got the working code from https://github.com/jdkoftinoff/mb-linux-msli/,
otherwise SIGILL while using linuxthreads.
|
|
Linuxthreads.new isn't really useful with the existence
of NPTL/TLS for well supported architectures. There is no
reason to use LT.new for ARM/MIPS or other architectures
supporting NPTL/TLS. It is not available for noMMU architectures
like Blackfin or FR-V. To simplify the live of the few uClibc-ng
developers, LT.new is removed and LT.old is renamed to LT.
LINUXTHREADS_OLD -> UCLIBC_HAS_LINUXTHREADS
|
|
License notices in most of the source files refer to an outdated
FSF address. Replace it with URL, like in the rest of the source
files.Signed-off-by: Nikola Forró <nforro@redhat.com>
|
|
Information about Openrisc:
http://opencores.org/or1k/Main_Page
Integrated from:
https://github.com/openrisc/uClibc-or1k
|
|
|
|
Add __LEAF to all __THROW, introduce non-leaf __THROWNL
Adjust affected spots accordingly.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
This reverts commit 6b6ede3d15f04fe825cfa9f697507457e3640344.
|
|
|
|
The tas instruction is not available for most coldfire CPU's.
Use bset instead in this case as already used in linuxthreads.old.
|
|
Cleanup linuxthreads by removing unused s390 code.
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
|
|
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>
|
|
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>
|
|
Signed-off-by: Markos Chandras <hwoarang@gentoo.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
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>
|
|
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>
|
|
replace USE_TLS, HAVE___THREAD and USE___THREAD with __UCLIBC_HAS_TLS__
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>
|
|
raise.c: only LT new provided gsignal, disable it
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>
|
|
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>
|
|
Some callers passed the first argument in $v0, while others used $a0.
Change the callers to use $a0 consistently.
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
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>
|
|
also sync up not-cancel.h headers between all three thread libraries
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
|
|
Based on Peter Mazinger's comments on a recent commit, I decided
to get rids of all occurrences of PIC changing them to __PIC__
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
sigwait is not called from any uclibc function, so "hidden symbol"
trick is not needed on it. __sigwait also is never used,
and it's not clear why it even existed.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
text data bss dec hex filename
- 370 0 0 370 172 libc/misc/dirent/opendir.o
+ 366 0 0 366 16e libc/misc/dirent/opendir.o
- 375 4 0 379 17b libc/pwd_grp/lckpwdf.o
+ 356 4 0 360 168 libc/pwd_grp/lckpwdf.o
- 248 0 0 248 f8 librt/shm.o
+ 209 0 0 209 d1 librt/shm.o
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
|
|
add myself to MAINTAINERS for sparc
|
|
|