syscall overhaul part two - unify public and internal syscall interface
authorRich Felker <dalias@aerifal.cx>
Sun, 20 Mar 2011 01:36:10 +0000 (21:36 -0400)
committerRich Felker <dalias@aerifal.cx>
Sun, 20 Mar 2011 01:36:10 +0000 (21:36 -0400)
commit685e40bb09f5f24a2af54ea09c97328808f76990
tree73bbf60045bb3a9c8af4f2639e8adb2ad1ea6994
parent462dbfc20788a6c9dd1ea4bb1cef086aa189615a
syscall overhaul part two - unify public and internal syscall interface

with this patch, the syscallN() functions are no longer needed; a
variadic syscall() macro allows syscalls with anywhere from 0 to 6
arguments to be made with a single macro name. also, manually casting
each non-integer argument with (long) is no longer necessary; the
casts are hidden in the macros.

some source files which depended on being able to define the old macro
SYSCALL_RETURNS_ERRNO have been modified to directly use __syscall()
instead of syscall(). references to SYSCALL_SIGSET_SIZE and SYSCALL_LL
have also been changed.

x86_64 has not been tested, and may need a follow-up commit to fix any
minor bugs/oversights.
26 files changed:
arch/i386/bits/fcntl.h
arch/i386/bits/syscall.h
arch/i386/syscall.h [deleted file]
arch/x86_64/bits/fcntl.h
arch/x86_64/bits/syscall.h
arch/x86_64/syscall.h [deleted file]
include/sys/syscall.h
src/exit/_Exit.c
src/internal/syscall.h [new file with mode: 0644]
src/signal/sigpending.c
src/signal/sigsuspend.c
src/signal/sigtimedwait.c
src/thread/__lock.c
src/thread/__timedwait.c
src/thread/__wait.c
src/thread/__wake.c
src/thread/pthread_cancel.c
src/thread/pthread_create.c
src/thread/pthread_kill.c
src/time/clock_nanosleep.c
src/time/gettimeofday.c
src/time/time.c
src/unistd/ftruncate.c
src/unistd/pread.c
src/unistd/pwrite.c
src/unistd/truncate.c