OSDN Git Service

uclinux-h8/uClibc.git
11 years agoRevert: buildsys: clean up libubacktrace linker script handling
Kevin Cernekee [Mon, 18 Jun 2012 18:52:28 +0000 (20:52 +0200)]
Revert: buildsys: clean up libubacktrace linker script handling

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agolibubacktrace: temporarily workaround link issue
Bernhard Reutner-Fischer [Fri, 15 Jun 2012 14:32:58 +0000 (16:32 +0200)]
libubacktrace: temporarily workaround link issue

temporarily work around circular dependency in linking that was
introduced by 01c125c3bd8f949f8e5711e09152859eecd1b004

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoremove arm specific sysdep.h from linuxthreads new
Peter S. Mazinger [Tue, 24 May 2011 19:20:38 +0000 (21:20 +0200)]
remove arm specific sysdep.h from linuxthreads new

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoremove sysdep.h from arch specific string implementation
Peter S. Mazinger [Sat, 14 May 2011 18:09:42 +0000 (20:09 +0200)]
remove sysdep.h from arch specific string implementation

Remove hardcoded path from xtensa, we have sysdep.h in path

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoremove cris/fork.c, unused
Peter S. Mazinger [Sat, 14 May 2011 01:58:03 +0000 (03:58 +0200)]
remove cris/fork.c, unused

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoupdate arc4random from bug #885
Peter S. Mazinger [Sat, 14 May 2011 01:29:53 +0000 (03:29 +0200)]
update arc4random from bug #885

Add config option to provide arc4random without device access.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoepoll.c: add cancellation to epoll_[p]wait()
Peter S. Mazinger [Mon, 23 Apr 2012 15:51:25 +0000 (17:51 +0200)]
epoll.c: add cancellation to epoll_[p]wait()

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>
11 years agoinclude pthreadP.h for SIGCANCEL
Peter S. Mazinger [Thu, 12 May 2011 21:47:00 +0000 (23:47 +0200)]
include pthreadP.h for SIGCANCEL

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>
11 years agolinuxthreads.old: build all objects twice, once for shared lib and once for static
Peter S. Mazinger [Thu, 12 May 2011 20:57:33 +0000 (22:57 +0200)]
linuxthreads.old: build all objects twice, once for shared lib and once for static

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agointernals.h: mark __pthread_message hidden
Peter S. Mazinger [Thu, 12 May 2011 20:56:56 +0000 (22:56 +0200)]
internals.h: mark __pthread_message hidden

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agolinuxthreads.old: move libpthread_hidden_proto to header
Peter S. Mazinger [Thu, 12 May 2011 20:55:02 +0000 (22:55 +0200)]
linuxthreads.old: move libpthread_hidden_proto to header

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agolinuxthreads.old/internals.h: make some internal functions hidden
Peter S. Mazinger [Thu, 12 May 2011 20:53:02 +0000 (22:53 +0200)]
linuxthreads.old/internals.h: make some internal functions hidden

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agosignal.h: needs size_t
Peter S. Mazinger [Sun, 8 May 2011 17:06:08 +0000 (19:06 +0200)]
signal.h: needs size_t

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agosched.h: update header, needs size_t
Peter S. Mazinger [Sun, 8 May 2011 16:41:45 +0000 (18:41 +0200)]
sched.h: update header, needs size_t

While there, guard __clone[2] with _LIBC

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agosigset-cvt-mask.h: add a guard to allow including it twice
Peter S. Mazinger [Sun, 8 May 2011 16:24:49 +0000 (18:24 +0200)]
sigset-cvt-mask.h: add a guard to allow including it twice

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agosignal: remove sigblock, siggetmask and sigsetmask
Peter S. Mazinger [Sat, 7 May 2011 22:57:57 +0000 (00:57 +0200)]
signal: remove sigblock, siggetmask and sigsetmask

rcmd.c uses sigblock and sigsetmask, make the function static and include them directly until
a rewrite is done.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agobits/types.h: remove thread types, users should include pthread.h
Peter S. Mazinger [Sat, 7 May 2011 22:39:06 +0000 (00:39 +0200)]
bits/types.h: remove thread types, users should include pthread.h

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agolinuxthreads: guard *tsd* related stuff correctly
Peter S. Mazinger [Sat, 7 May 2011 22:23:14 +0000 (00:23 +0200)]
linuxthreads: guard *tsd* related stuff correctly

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoerror.c: no need for __error and __error_at_line
Peter S. Mazinger [Sat, 7 May 2011 22:01:29 +0000 (00:01 +0200)]
error.c: no need for __error and __error_at_line

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agolinuxthreads: style update
Peter S. Mazinger [Tue, 3 May 2011 21:11:53 +0000 (23:11 +0200)]
linuxthreads: style update

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agolinuxthreads: use __UCLIBC_HAS_TLS__ consistently
Peter S. Mazinger [Tue, 3 May 2011 21:04:08 +0000 (23:04 +0200)]
linuxthreads: use __UCLIBC_HAS_TLS__ consistently

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>
11 years agomove __libc_pthread_init prototype to pthread-functions.h
Peter S. Mazinger [Tue, 3 May 2011 21:02:31 +0000 (23:02 +0200)]
move __libc_pthread_init 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>
11 years agoforward.c: no need for attribute_hidden, provided by prototype
Peter S. Mazinger [Tue, 3 May 2011 20:57:34 +0000 (22:57 +0200)]
forward.c: no need for attribute_hidden, provided by prototype

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agolibc_pthread_init.c: include only what is necessary
Peter S. Mazinger [Tue, 3 May 2011 20:54:51 +0000 (22:54 +0200)]
libc_pthread_init.c: include only what is necessary

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agolinuxthreads.old: cleanup a bit
Peter S. Mazinger [Wed, 27 Apr 2011 15:07:16 +0000 (17:07 +0200)]
linuxthreads.old: cleanup a bit

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>
11 years agofts.c: add a comment about wrong usage of _lfs_64.h
Peter S. Mazinger [Wed, 27 Apr 2011 14:10:29 +0000 (16:10 +0200)]
fts.c: add a comment about wrong usage of _lfs_64.h

This file needs anyway some massage (style update), I'll leave the fix
to the committer.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agolinuxthreads.old_db: style update
Peter S. Mazinger [Wed, 27 Apr 2011 13:05:46 +0000 (15:05 +0200)]
linuxthreads.old_db: style update

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoNPTL: rename __new_sem_* to sem_*
Peter S. Mazinger [Tue, 26 Apr 2011 21:47:17 +0000 (23:47 +0200)]
NPTL: rename __new_sem_* to sem_*

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agolinuxthreads.old: remove __old_sem_* and rename __new_sem_* to sem_*
Peter S. Mazinger [Tue, 26 Apr 2011 21:35:32 +0000 (23:35 +0200)]
linuxthreads.old: remove __old_sem_* and rename __new_sem_* to sem_*

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agosigqueue.c: rewrite a bit
Peter S. Mazinger [Tue, 26 Apr 2011 21:21:32 +0000 (23:21 +0200)]
sigqueue.c: rewrite a bit

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>
11 years agoadd posix_madvise.c
Peter S. Mazinger [Tue, 26 Apr 2011 21:03:44 +0000 (23:03 +0200)]
add posix_madvise.c

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agochange _NSIG / 8 to __SYSCALL_SIGSET_T_SIZE in common code
Peter S. Mazinger [Tue, 26 Apr 2011 20:51:23 +0000 (22:51 +0200)]
change _NSIG / 8 to __SYSCALL_SIGSET_T_SIZE in common code

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>
11 years agomake arch specific cacheflush, readahead and sysmips LINUX_SPECIFIC dependent
Peter S. Mazinger [Tue, 26 Apr 2011 20:34:59 +0000 (22:34 +0200)]
make arch specific cacheflush, readahead and sysmips LINUX_SPECIFIC dependent

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>
11 years agoshm.c: do not use __libc_X internally
Peter S. Mazinger [Sat, 23 Apr 2011 22:42:21 +0000 (00:42 +0200)]
shm.c: do not use __libc_X internally

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agosigqueue.c: do not use __libc_X name internally
Peter S. Mazinger [Sat, 23 Apr 2011 22:38:02 +0000 (00:38 +0200)]
sigqueue.c: do not use __libc_X name internally

__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>
11 years agosigpause.c: provide the X/Open variant, since the BSD version is deprecated
Peter S. Mazinger [Sat, 23 Apr 2011 22:21:30 +0000 (00:21 +0200)]
sigpause.c: provide the X/Open variant, since the BSD version is deprecated

Do not export __sigpause.
Provide __bsd_sigpause (unprototyped) if anyone may need it.
Adapt cancellation to use cancel.h.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agosocketcalls.c: rewrite to use cancel.h
Peter S. Mazinger [Sat, 23 Apr 2011 21:53:57 +0000 (23:53 +0200)]
socketcalls.c: rewrite to use cancel.h

__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>
11 years agoexec.c: remove duplicate attribute_hidden
Peter S. Mazinger [Sat, 23 Apr 2011 20:02:28 +0000 (22:02 +0200)]
exec.c: remove duplicate attribute_hidden

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agovax/statfs.h: common one is good for vax
Peter S. Mazinger [Sat, 23 Apr 2011 19:47:40 +0000 (21:47 +0200)]
vax/statfs.h: common one is good for vax

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agovax/machine-gmon.h: remove, unneeded
Peter S. Mazinger [Sat, 23 Apr 2011 19:27:20 +0000 (21:27 +0200)]
vax/machine-gmon.h: remove, unneeded

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoe1/bits/unistd.h: remove unneeded bits
Peter S. Mazinger [Sat, 23 Apr 2011 19:20:45 +0000 (21:20 +0200)]
e1/bits/unistd.h: remove unneeded bits

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>
11 years agoxstatconv: cleanup includes
Peter S. Mazinger [Sat, 23 Apr 2011 19:16:34 +0000 (21:16 +0200)]
xstatconv: cleanup includes

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>
11 years agouse open_not_cancel_2 instead of open_not_cancel
Peter S. Mazinger [Sat, 23 Apr 2011 19:05:09 +0000 (21:05 +0200)]
use open_not_cancel_2 instead of open_not_cancel

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agonot-cancel.h: update common version and make sure we use this one
Peter S. Mazinger [Sat, 23 Apr 2011 18:59:28 +0000 (20:59 +0200)]
not-cancel.h: update common version and make sure we use this one

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>
11 years agopause.c: add back usage of pause syscall
Peter S. Mazinger [Sat, 23 Apr 2011 18:46:59 +0000 (20:46 +0200)]
pause.c: add back usage of pause syscall

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>
11 years agonot-cancel.h: use the non-cancellable functions in libc instead of inlining code
Peter S. Mazinger [Sat, 23 Apr 2011 17:42:41 +0000 (19:42 +0200)]
not-cancel.h: use the non-cancellable functions in libc instead of inlining code

   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>
11 years agowrapsyscall.c: add cancellable fcntl64
Peter S. Mazinger [Sat, 23 Apr 2011 17:35:19 +0000 (19:35 +0200)]
wrapsyscall.c: add cancellable fcntl64

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agonptl: remove sigaction, sigprocmask, and sigfillset from libpthread
Austin Foxley [Fri, 22 Apr 2011 22:06:18 +0000 (15:06 -0700)]
nptl: remove sigaction, sigprocmask, and sigfillset from libpthread

Having them defined in both places was causing errors with static linking

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agopread_write.c: make all archs use common code
Peter S. Mazinger [Fri, 22 Apr 2011 00:22:07 +0000 (02:22 +0200)]
pread_write.c: make all archs use common code

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>
11 years agoadd cancellation to generic pread_write
Peter S. Mazinger [Thu, 21 Apr 2011 23:25:31 +0000 (01:25 +0200)]
add cancellation to generic pread_write

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>
11 years agoenable the common code for NPTL
Peter S. Mazinger [Thu, 21 Apr 2011 23:08:06 +0000 (01:08 +0200)]
enable the common code for NPTL

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>
11 years agofork: do not add fork() to libpthread
Peter S. Mazinger [Thu, 21 Apr 2011 22:56:23 +0000 (00:56 +0200)]
fork: do not add fork() to libpthread

No need for __libc_fork either.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agomake NPTL's getpid behave similar to the common one
Peter S. Mazinger [Thu, 21 Apr 2011 22:52:22 +0000 (00:52 +0200)]
make NPTL's getpid behave similar to the common one

make __getpid static
provide getppid alias if needed
remove unneeded libc_hidden_proto

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agopoll, ppoll: use cancel.h
Peter S. Mazinger [Thu, 21 Apr 2011 22:42:58 +0000 (00:42 +0200)]
poll, ppoll: use cancel.h

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>
11 years agorework cancellation for sigwait, sigtimedwait and sigwaitinfo
Peter S. Mazinger [Thu, 21 Apr 2011 22:33:48 +0000 (00:33 +0200)]
rework cancellation for sigwait, sigtimedwait and sigwaitinfo

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>
11 years agolseek, lseek64: add cancellation for all THREADS
Peter S. Mazinger [Thu, 21 Apr 2011 21:45:12 +0000 (23:45 +0200)]
lseek, lseek64: add cancellation for all THREADS

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>
11 years agosigsuspend.c: add cancellation support independently of rt_sigsuspend
Peter S. Mazinger [Thu, 21 Apr 2011 21:21:29 +0000 (23:21 +0200)]
sigsuspend.c: add cancellation support independently of rt_sigsuspend

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>
11 years agopselect.c: avoid handling cancellation twice
Peter S. Mazinger [Thu, 21 Apr 2011 21:16:19 +0000 (23:16 +0200)]
pselect.c: avoid handling cancellation twice

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>
11 years agoioctl.c: use cancel.h
Peter S. Mazinger [Thu, 21 Apr 2011 21:10:35 +0000 (23:10 +0200)]
ioctl.c: use cancel.h

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>
11 years agonanosleep.c: use cancel.h
Peter S. Mazinger [Thu, 21 Apr 2011 21:09:39 +0000 (23:09 +0200)]
nanosleep.c: use cancel.h

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agowait.c: use cancel.h
Peter S. Mazinger [Thu, 21 Apr 2011 21:08:11 +0000 (23:08 +0200)]
wait.c: use cancel.h

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>
11 years agofcntl: add cancellation to fcntl64, use cancel.h
Peter S. Mazinger [Thu, 21 Apr 2011 21:03:32 +0000 (23:03 +0200)]
fcntl: add cancellation to fcntl64, use cancel.h

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>
11 years agoptfork.c: use strong_alias for vfork
Peter S. Mazinger [Thu, 21 Apr 2011 20:41:09 +0000 (22:41 +0200)]
ptfork.c: use strong_alias for vfork

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agowaitid.c: use cancel.h
Peter S. Mazinger [Thu, 21 Apr 2011 20:36:59 +0000 (22:36 +0200)]
waitid.c: use cancel.h

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>
11 years agoreadv, writev: rewrite to use cancel.h
Peter S. Mazinger [Thu, 21 Apr 2011 20:34:56 +0000 (22:34 +0200)]
readv, writev: rewrite to use cancel.h

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agowaitpid.c: provide __waitpid_nocancel, use cancel.h
Peter S. Mazinger [Thu, 21 Apr 2011 20:31:08 +0000 (22:31 +0200)]
waitpid.c: provide __waitpid_nocancel, use cancel.h

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>
11 years agoopen.c: add cancellation using cancel.h
Peter S. Mazinger [Thu, 21 Apr 2011 20:13:29 +0000 (22:13 +0200)]
open.c: add cancellation using cancel.h

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoopen64.c: no need for separate cancellation, open handles it already
Peter S. Mazinger [Thu, 21 Apr 2011 20:09:59 +0000 (22:09 +0200)]
open64.c: no need for separate cancellation, open handles it already

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoadapt fdatasync, fsync, msync to use cancel.h
Peter S. Mazinger [Thu, 21 Apr 2011 20:04:49 +0000 (22:04 +0200)]
adapt fdatasync, fsync, msync to use cancel.h

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agocreat*.c: add LIBC_CANCEL_HANDLED to know that it is cancellable (handled by open)
Peter S. Mazinger [Thu, 21 Apr 2011 20:01:43 +0000 (22:01 +0200)]
creat*.c: add LIBC_CANCEL_HANDLED to know that it is cancellable (handled by open)

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agopause.c: use cancel.h, provide __libc_pause only for LT_OLD
Peter S. Mazinger [Thu, 21 Apr 2011 19:58:18 +0000 (21:58 +0200)]
pause.c: use cancel.h, provide __libc_pause only for LT_OLD

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoselect: adapt cancelation to use cancel.h
Peter S. Mazinger [Thu, 21 Apr 2011 19:55:48 +0000 (21:55 +0200)]
select: adapt cancelation to use cancel.h

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agofork: provide __libc_fork only if THREADS are enabled
Peter S. Mazinger [Thu, 21 Apr 2011 19:49:49 +0000 (21:49 +0200)]
fork: provide __libc_fork only if THREADS are enabled

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoadd cancellation for read, write, close
Peter S. Mazinger [Thu, 21 Apr 2011 19:45:46 +0000 (21:45 +0200)]
add cancellation for read, write, close

close.c: add function __close_nocancel_no_status to be used internally
in libc avoiding inlining it everywhere.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoendian.h: add some handy macros to be used in syscalls
Peter S. Mazinger [Thu, 21 Apr 2011 19:20:55 +0000 (21:20 +0200)]
endian.h: add some handy macros to be used in syscalls

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agocancel.h: add generic file to ease cancellation support
Peter S. Mazinger [Thu, 21 Apr 2011 19:19:39 +0000 (21:19 +0200)]
cancel.h: add generic file to ease cancellation support

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agowait4.c: provide hidden __wait4_nocancel independent of any guards
Peter S. Mazinger [Sun, 17 Apr 2011 13:45:46 +0000 (15:45 +0200)]
wait4.c: provide hidden __wait4_nocancel independent of any guards

Correct wait4 guard (it is only __USE_BSD)
wait3, system: use __wait4_nocancel

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agovfork: make all archs consistent
Peter S. Mazinger [Sat, 16 Apr 2011 13:40:50 +0000 (15:40 +0200)]
vfork: make all archs consistent

__vfork is hidden.
__GI_vfork is strong (not weak as it was).
vfork is weak.
e1 can use the generic version.

Note: libc_hidden_def(x) has different meaning in .c and .S files.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoutime[s]: avoid circular dependency
Peter S. Mazinger [Sat, 16 Apr 2011 12:24:38 +0000 (14:24 +0200)]
utime[s]: avoid circular dependency

utime.c: fix a cast, tv_sec is of type time_t
Add stub for utimes.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoustat.c: always_inline syscall
Peter S. Mazinger [Sat, 16 Apr 2011 12:19:52 +0000 (14:19 +0200)]
ustat.c: always_inline syscall

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agouname.c,unlink.c: whitespace only
Peter S. Mazinger [Sat, 16 Apr 2011 12:19:10 +0000 (14:19 +0200)]
uname.c,unlink.c: whitespace only

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoumount: make umount2 depend on UCLIBC_LINUX_SPECIFIC
Peter S. Mazinger [Sat, 16 Apr 2011 11:51:08 +0000 (13:51 +0200)]
umount: make umount2 depend on UCLIBC_LINUX_SPECIFIC

Add hidden umount2 to be used in umount eventually.
Rework umount to either use directly umount2 syscall or function.

docs say, that mount and umount are also Linux specific

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agomount.c: whitespace only
Peter S. Mazinger [Sat, 16 Apr 2011 11:49:54 +0000 (13:49 +0200)]
mount.c: whitespace only

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agotimes.c: whitespace only
Peter S. Mazinger [Sat, 16 Apr 2011 11:37:56 +0000 (13:37 +0200)]
times.c: whitespace only

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoumask.c: umask always succeeds, use _syscall_noerr1
Peter S. Mazinger [Sat, 16 Apr 2011 11:24:16 +0000 (13:24 +0200)]
umask.c: umask always succeeds, use _syscall_noerr1

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agotime.c: move included header for fallback case
Peter S. Mazinger [Sat, 16 Apr 2011 11:10:11 +0000 (13:10 +0200)]
time.c: move included header for fallback case

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agogettimeofday.c: use the same type as in header
Peter S. Mazinger [Sat, 16 Apr 2011 11:05:33 +0000 (13:05 +0200)]
gettimeofday.c: use the same type as in header

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoprovide sysinfo stub
Peter S. Mazinger [Sat, 16 Apr 2011 11:00:31 +0000 (13:00 +0200)]
provide sysinfo stub

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agosyscalls.h: remove unused headers
Peter S. Mazinger [Sat, 16 Apr 2011 10:56:41 +0000 (12:56 +0200)]
syscalls.h: remove unused headers

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agonanosleep.c, fsync.c: do not inline syscall, it is used twice
Peter S. Mazinger [Sat, 16 Apr 2011 10:50:56 +0000 (12:50 +0200)]
nanosleep.c, fsync.c: do not inline syscall, it is used twice

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agobrk.c: remove libc_hidden_proto, always_inline syscall
Peter S. Mazinger [Sat, 16 Apr 2011 10:50:24 +0000 (12:50 +0200)]
brk.c: remove libc_hidden_proto, always_inline syscall

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agosigsuspend.c: make build fail, if rt_sigsuspend is not available and NPTL is defined
Peter S. Mazinger [Sat, 16 Apr 2011 10:42:50 +0000 (12:42 +0200)]
sigsuspend.c: make build fail, if rt_sigsuspend is not available and NPTL is defined

Rework a bit for less code.
always_inline syscall used only once, do not inline syscall used twice.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agosymlink.c: Compile only if syscall is available
Peter S. Mazinger [Sat, 16 Apr 2011 10:17:41 +0000 (12:17 +0200)]
symlink.c: Compile only if syscall is available

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoupdate acct.h
Peter S. Mazinger [Sat, 16 Apr 2011 10:14:57 +0000 (12:14 +0200)]
update acct.h

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agosync.c: simplify code
Peter S. Mazinger [Sat, 16 Apr 2011 10:09:06 +0000 (12:09 +0200)]
sync.c: simplify code

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoprovide stime and settimeofday functions if at least one of the syscalls is available
Peter S. Mazinger [Sat, 16 Apr 2011 09:55:10 +0000 (11:55 +0200)]
provide stime and settimeofday functions if at least one of the syscalls is available

Add hidden stime for possible use in settimeofday.
Add stubs for both functions if none of the syscalls is present.
Avoid circular dependency.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agosetuid.c: always_inline syscall
Peter S. Mazinger [Sat, 16 Apr 2011 09:54:48 +0000 (11:54 +0200)]
setuid.c: always_inline syscall

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agosetsid.c: whitespace only
Peter S. Mazinger [Sat, 16 Apr 2011 09:50:17 +0000 (11:50 +0200)]
setsid.c: whitespace only

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agosetpgrp.c: remove unneeded header
Peter S. Mazinger [Sat, 16 Apr 2011 09:49:25 +0000 (11:49 +0200)]
setpgrp.c: remove unneeded header

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agosetgroups.c: move around some headers, always_inline syscall
Peter S. Mazinger [Sat, 16 Apr 2011 00:33:16 +0000 (02:33 +0200)]
setgroups.c: move around some headers, always_inline syscall

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>