summaryrefslogtreecommitdiff
path: root/libc/sysdeps
AgeCommit message (Collapse)Author
2012-11-18AVR32: declare missing result variableFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-11-17libc/sysdeps: dup3: check for __NR_dup3 since older kernels/arches lack itMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-11-14libc/sysdeps: add dup3 syscall wrapperMike Frysinger
Some projects (like udev) are starting to use this. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-11-12microblaze/bits/setjmp.h: Fix stray #endifSteve Bennett
Introduced in c53099f7 Signed-off-by: Steve Bennett <steveb@workware.net.au> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-11-03xtensa: add missing atomic intrinsicsChris Zankel
Add more atomic intrinsics. These are mostly non 32-bit versions, which are not support by Xtensa. This file needs some more clean-up and consolidation. Signed-off-by: Chris Zankel <chris@zankel.net>
2012-11-03xtensa: sysdep.h needs to include sys/syscall.hChris Zankel
The Xtensa version of sysdep.h didn't include sys/syscall.h. This header file is, for example, needed by not-cancel.h, which uses the INTERNAL_SYSCALL macro. Signed-off-by: Chris Zankel <chris@zankel.net>
2012-11-03xtensa: add a stub user.h fileChris Zankel
Xtensa only supports the ELF binary format, so the user.h file isn't needed. However, it's included by other files, so provide a stub user.h. Signed-off-by: Chris Zankel <chris@zankel.net>
2012-11-03xtensa: fix a misnumbered register in sigsetjmpChris Zankel
Signed-off-by: Chris Zankel <chris@zankel.net>
2012-11-03xtensa: add a set of atomic intrinsicsChris Zankel
Add a new file that provides various atomic intrinsics, which use the conditional store instruction. Signed-off-by: Chris Zankel <chris@zankel.net>
2012-11-03xtensa: add sigcontext.hChris Zankel
Signed-off-by: Chris Zankel <chris@zankel.net>
2012-10-02libc/sysdeps: add __kernel_long and __kernel_ulongChris Packham
Linux 3.4 added __kernel_long_t and __kernel_ulong_t and various exported header files were updated to use these new types. Add the definitions for __kernel_long_t and __kernel_ulong_t to the relevant kernel_types.h headers. This change was automated with the following scriptlet git grep --name-only 'typedef.*__kernel_old_dev_t' \ | xargs sed -i '/typedef.*__kernel_old_dev_t/ a\ typedef long\t\t__kernel_long_t;\ typedef unsigned long\t__kernel_ulong_t;' Whitespace in arm, avr32, hppa, sparc was then manually fixed up. Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz> -- Here's a cleaned up patch which should get the whitespace right. I'm a bit iffy about the sparc changes they make sense to me but it's not a platform I have access to. I can break this up per arch or per maintainer if requested. libc/sysdeps/linux/alpha/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/arm/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/avr32/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/bfin/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/c6x/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/cris/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/e1/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/h8300/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/hppa/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/i386/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/ia64/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/m68k/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/microblaze/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/mips/bits/kernel_types.h | 4 ++++ libc/sysdeps/linux/nios2/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/powerpc/bits/kernel_types.h | 4 ++++ libc/sysdeps/linux/sh/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/sh64/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/sparc/bits/kernel_types.h | 4 ++++ libc/sysdeps/linux/v850/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/x86_64/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/xtensa/bits/kernel_types.h | 2 ++ 22 files changed, 50 insertions(+) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-08-04i386/bits/syscalls.h: allow immediate values as 6th syscall argNatanael Copa
Allow use of immedate values as the 6th syscall argument. Otherwise we must store the arg on memory. This gives gcc more options to optimize better. This also works around an issue with posix_fallocate. Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-08-04bits/time.h: sync with glibc 2.16Peter Korsgaard
CLOCK_MONOTONIC_RAW is available since 2.6.28 (2d42244ae71d: clocksource: introduce CLOCK_MONOTONIC_RAW), and CLOCK_*_COARSE since 2.6.32 (da15cfdae033: time: Introduce CLOCK_REALTIME_COARSE). Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-07-24Accept either __NR__lseek or __NR_lseekBernd Schmidt
In llseek.c, we already allow both variants; the same needs to be done here to avoid duplicate definitions of lseek64_nocancel. Signed-off-by: Bernd Schmidt <bernds@codesourcery.com>
2012-06-15remove cris/fork.c, unusedPeter 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-15epoll.c: add cancellation to epoll_[p]wait()Peter S. Mazinger
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>
2012-06-15include pthreadP.h for SIGCANCELPeter S. Mazinger
based on a patch from Kevin Cernekee <cernekee@gmail.com> Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15bits/types.h: remove thread types, users should include pthread.hPeter 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-15sigqueue.c: rewrite a bitPeter S. Mazinger
Use sizeof(info) instead of sizeof(siginfo_t). stubs.c: add sigqueue stub. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15add posix_madvise.cPeter 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-15change _NSIG / 8 to __SYSCALL_SIGSET_T_SIZE in common codePeter S. Mazinger
Since mips has different kernel sigset_t, use the new macro in common code that is used by mips as well. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15make arch specific cacheflush, readahead and sysmips LINUX_SPECIFIC dependentPeter S. Mazinger
Remove the related headers. Adapt sh's type to the one used everywhere and add prototype for it. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15sigqueue.c: do not use __libc_X name internallyPeter S. Mazinger
__libc_X names are intended to be used in other uClibc provided libs, but not in libc. Mark the syscall __always_inline. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15socketcalls.c: rewrite to use cancel.hPeter S. Mazinger
__socketcall.c: remove guard, we definitely need this syscall Re-added guard plus added comment (Bernhard) Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15vax/statfs.h: common one is good for vaxPeter 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-15vax/machine-gmon.h: remove, unneededPeter 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-15e1/bits/unistd.h: remove unneeded bitsPeter S. Mazinger
If an arch does not support some option, that has to be coded in Config.in Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15xstatconv: cleanup includesPeter S. Mazinger
xstatconv.h needs features.h to really "see" config options xstatconv.c does not need sys/syscall.h Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15not-cancel.h: update common version and make sure we use this onePeter S. Mazinger
Update file (same as in NPTL). Disable unused parts, the remaining inlines will be fixed later. Copy it to include to be sure that we use this one independently of chosen threads. Provide write,close and waitpid_not_cancel for LT new. Use wait4 syscall instead of waitpid syscall (kernel says so). Provide open_not_cancel and close_not_cancel for librt's spawn. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15pause.c: add back usage of pause syscallPeter S. Mazinger
No idea why it was removed when NPTL was added, but glibc uses it as well. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15not-cancel.h: use the non-cancellable functions in libc instead of inlining codePeter S. Mazinger
text data bss dec hex filename 272224 2298 17576 292098 47502 lib/libuClibc-0.9.32-rc3-git.so.old 271806 2298 17576 291680 47360 lib/libuClibc-0.9.32-rc3-git.so Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15pread_write.c: make all archs use common codePeter S. Mazinger
c6x does not need own version at all Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15add cancellation to generic pread_writePeter S. Mazinger
Prepare the file to be used in all arch specific files Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15enable the common code for NPTLPeter S. Mazinger
the generic open, close, waitpid, read, write are good for NPTL too no good reason to have the same sleep in both libc and libpthread (NPTL) no good reason to add sigwaitinfo, sigtimedwait and sigwait to libpthread (NPTL) Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15poll, ppoll: use cancel.hPeter S. Mazinger
use __SYSCALL_SIGSET_T_SIZE use non-cancellable select in fallback Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15rework cancellation for sigwait, sigtimedwait and sigwaitinfoPeter S. Mazinger
sigtimedwait: - provide __sigtimedwait_nocancel - use __SYSCALL_SIGSET_T_SIZE instead of _NSIG / 8 - do not provide __sigtimedwait - guard a section to avoid failure on archs if SI_TKILL/SI_USER are not defined sigwaitinfo: - simply use sigtimedwait since that handles cancellation already sigwait: - use non-cancellable functions (sigtimedwait, sigsuspend) - get rid of code already done in __sigtimedwait_nocancel Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15lseek, lseek64: add cancellation for all THREADSPeter S. Mazinger
LT_OLD provides cancellable versions, do it for all THREADS. llseek.c: use newly added macros for offset handling. Add a comment about endianness issue around offset. Compile llseek.c only on 32bit archs. Provide aliases for 64bit archs or if syscall is not available. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15sigsuspend.c: add cancellation support independently of rt_sigsuspendPeter S. Mazinger
signal.h: add __SYSCALL_SIGSET_T_SIZE, since kernel sigset_t is different on mips and use that instead of _NSIG / 8 Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15pselect.c: avoid handling cancellation twicePeter S. Mazinger
Use __select_nocancel instead of select Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15ioctl.c: use cancel.hPeter S. Mazinger
Guard changed from NPTL to __NEW_THREADS to cover LT new as well. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15nanosleep.c: use cancel.hPeter 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-15wait.c: use cancel.hPeter S. Mazinger
Use __wait4_nocancel, since wait4 is not available all the time Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15fcntl: add cancellation to fcntl64, use cancel.hPeter S. Mazinger
fcntl64 missed cancellation. Guard fcntl64 for 32bit archs. Reuse as much code as possible in __syscall_fcntl.c. Provide alias fcntl64 if that syscall is not available. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15waitid.c: use cancel.hPeter S. Mazinger
and use __waitpid_nocancel in fallback code Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15readv, writev: rewrite to use cancel.hPeter 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-15waitpid.c: provide __waitpid_nocancel, use cancel.hPeter S. Mazinger
Use __wait4_nocancel since wait4 is not available all the time. Add a comment about not using waitpid syscall. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15open.c: add cancellation using cancel.hPeter 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-15open64.c: no need for separate cancellation, open handles it alreadyPeter 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-15adapt fdatasync, fsync, msync to use cancel.hPeter 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-15creat*.c: add LIBC_CANCEL_HANDLED to know that it is cancellable (handled by ↵Peter S. Mazinger
open) Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>