public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/azanella/syscall-refactor] linux: Syscall refactor
@ 2020-06-29 21:46 Adhemerval Zanella
  0 siblings, 0 replies; only message in thread
From: Adhemerval Zanella @ 2020-06-29 21:46 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=77a939b4565cf491ef04e4bbfaf87c8a6fa9a58d

commit 77a939b4565cf491ef04e4bbfaf87c8a6fa9a58d
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue May 26 15:05:49 2020 -0300

    linux: Syscall refactor
    
    INLINE_SYSCALL{_CALL}   -> inline_syscall
    INTERNAL_SYSCALL{_CALL} -> internal_syscall

Diff:
---
 nptl/allocatestack.c                               |  19 ++--
 nptl/nptl-init.c                                   |  22 ++---
 nptl/pthread_cancel.c                              |   5 +-
 nptl/pthread_create.c                              |   4 +-
 nptl/pthread_getaffinity.c                         |   8 +-
 nptl/pthread_setaffinity.c                         |   9 +-
 nptl/pthread_sigmask.c                             |   8 +-
 nptl/thrd_yield.c                                  |   2 +-
 sysdeps/nptl/pthread-functions.h                   |   7 +-
 sysdeps/nptl/setxid.h                              | 108 +++++++++++++--------
 sysdeps/unix/sysv/linux/_exit.c                    |   4 +-
 sysdeps/unix/sysv/linux/accept.c                   |   6 +-
 sysdeps/unix/sysv/linux/accept4.c                  |   6 +-
 sysdeps/unix/sysv/linux/access.c                   |   4 +-
 sysdeps/unix/sysv/linux/adjtime.c                  |   2 +-
 sysdeps/unix/sysv/linux/aio_misc.h                 |  10 +-
 sysdeps/unix/sysv/linux/aio_sigqueue.c             |   2 +-
 sysdeps/unix/sysv/linux/alpha/ioperm.c             |   2 +-
 sysdeps/unix/sysv/linux/alpha/select.c             |   7 +-
 sysdeps/unix/sysv/linux/arch-fork.h                |  10 +-
 sysdeps/unix/sysv/linux/bind.c                     |   4 +-
 sysdeps/unix/sysv/linux/clock_adjtime.c            |   6 +-
 sysdeps/unix/sysv/linux/clock_getcpuclockid.c      |   9 +-
 sysdeps/unix/sysv/linux/clock_getres.c             |   6 +-
 sysdeps/unix/sysv/linux/clock_gettime.c            |   6 +-
 sysdeps/unix/sysv/linux/clock_nanosleep.c          |  21 ++--
 sysdeps/unix/sysv/linux/clock_settime.c            |   6 +-
 sysdeps/unix/sysv/linux/close.c                    |   2 +-
 sysdeps/unix/sysv/linux/close_nocancel.c           |   2 +-
 sysdeps/unix/sysv/linux/connect.c                  |   4 +-
 sysdeps/unix/sysv/linux/copy_file_range.c          |   4 +-
 sysdeps/unix/sysv/linux/creat.c                    |   2 +-
 sysdeps/unix/sysv/linux/creat64.c                  |   2 +-
 sysdeps/unix/sysv/linux/createthread.c             |  18 ++--
 sysdeps/unix/sysv/linux/default-sched.h            |   4 +-
 sysdeps/unix/sysv/linux/dl-openat64.c              |   2 +-
 sysdeps/unix/sysv/linux/dl-origin.c                |   6 +-
 sysdeps/unix/sysv/linux/dl-writev.h                |   2 +-
 sysdeps/unix/sysv/linux/epoll_pwait.c              |   4 +-
 sysdeps/unix/sysv/linux/epoll_wait.c               |   3 +-
 sysdeps/unix/sysv/linux/exit-thread.h              |   2 +-
 sysdeps/unix/sysv/linux/faccessat.c                |   6 +-
 sysdeps/unix/sysv/linux/fallocate.c                |   4 +-
 sysdeps/unix/sysv/linux/fallocate64.c              |   4 +-
 sysdeps/unix/sysv/linux/fchmodat.c                 |   4 +-
 sysdeps/unix/sysv/linux/fcntl.c                    |   6 +-
 sysdeps/unix/sysv/linux/fcntl64.c                  |   2 +-
 sysdeps/unix/sysv/linux/fcntl_nocancel.c           |  10 +-
 sysdeps/unix/sysv/linux/fdatasync.c                |   2 +-
 sysdeps/unix/sysv/linux/fexecve.c                  |   2 +-
 sysdeps/unix/sysv/linux/fstatfs64.c                |   2 +-
 sysdeps/unix/sysv/linux/fsync.c                    |   2 +-
 sysdeps/unix/sysv/linux/ftruncate.c                |   4 +-
 sysdeps/unix/sysv/linux/ftruncate64.c              |   4 +-
 sysdeps/unix/sysv/linux/futimens.c                 |   2 +-
 sysdeps/unix/sysv/linux/fxstat.c                   |   6 +-
 sysdeps/unix/sysv/linux/fxstat64.c                 |   6 +-
 sysdeps/unix/sysv/linux/fxstatat.c                 |   6 +-
 sysdeps/unix/sysv/linux/fxstatat64.c               |  12 +--
 sysdeps/unix/sysv/linux/gai_sigqueue.c             |   2 +-
 sysdeps/unix/sysv/linux/generic/____longjmp_chk.c  |   2 +-
 sysdeps/unix/sysv/linux/generic/brk.c              |   2 +-
 sysdeps/unix/sysv/linux/generic/chmod.c            |   2 +-
 sysdeps/unix/sysv/linux/generic/chown.c            |   2 +-
 sysdeps/unix/sysv/linux/generic/dl-origin.c        |   6 +-
 sysdeps/unix/sysv/linux/generic/dup2.c             |   2 +-
 sysdeps/unix/sysv/linux/generic/epoll_create.c     |   2 +-
 sysdeps/unix/sysv/linux/generic/futimesat.c        |   2 +-
 sysdeps/unix/sysv/linux/generic/inotify_init.c     |   2 +-
 sysdeps/unix/sysv/linux/generic/lchown.c           |   2 +-
 sysdeps/unix/sysv/linux/generic/link.c             |   2 +-
 sysdeps/unix/sysv/linux/generic/lxstat.c           |   2 +-
 sysdeps/unix/sysv/linux/generic/mkdir.c            |   2 +-
 sysdeps/unix/sysv/linux/generic/pipe.c             |   2 +-
 sysdeps/unix/sysv/linux/generic/readlink.c         |   2 +-
 sysdeps/unix/sysv/linux/generic/rmdir.c            |   2 +-
 sysdeps/unix/sysv/linux/generic/symlink.c          |   2 +-
 sysdeps/unix/sysv/linux/generic/unlink.c           |   2 +-
 sysdeps/unix/sysv/linux/generic/utimes.c           |   2 +-
 .../unix/sysv/linux/generic/wordsize-32/fstatfs.c  |   2 +-
 .../unix/sysv/linux/generic/wordsize-32/fxstat.c   |   4 +-
 .../unix/sysv/linux/generic/wordsize-32/fxstatat.c |   4 +-
 .../unix/sysv/linux/generic/wordsize-32/lxstat.c   |   4 +-
 .../unix/sysv/linux/generic/wordsize-32/lxstat64.c |   4 +-
 .../unix/sysv/linux/generic/wordsize-32/sendfile.c |   2 +-
 .../unix/sysv/linux/generic/wordsize-32/statfs.c   |   2 +-
 .../unix/sysv/linux/generic/wordsize-32/xstat.c    |   4 +-
 .../unix/sysv/linux/generic/wordsize-32/xstat64.c  |   4 +-
 sysdeps/unix/sysv/linux/generic/xmknod.c           |   2 +-
 sysdeps/unix/sysv/linux/generic/xstat.c            |   2 +-
 sysdeps/unix/sysv/linux/getcpu.c                   |   2 +-
 sysdeps/unix/sysv/linux/getcwd.c                   |   2 +-
 sysdeps/unix/sysv/linux/getdents.c                 |   4 +-
 sysdeps/unix/sysv/linux/getdents64.c               |   4 +-
 sysdeps/unix/sysv/linux/getentropy.c               |   2 +-
 sysdeps/unix/sysv/linux/getitimer.c                |   4 +-
 sysdeps/unix/sysv/linux/getpeername.c              |   4 +-
 sysdeps/unix/sysv/linux/getpriority.c              |   2 +-
 sysdeps/unix/sysv/linux/getrandom.c                |   2 +-
 sysdeps/unix/sysv/linux/getrlimit.c                |   4 +-
 sysdeps/unix/sysv/linux/getrlimit64.c              |   2 +-
 sysdeps/unix/sysv/linux/getrusage.c                |   4 +-
 sysdeps/unix/sysv/linux/getsockname.c              |   4 +-
 sysdeps/unix/sysv/linux/getsockopt.c               |   4 +-
 sysdeps/unix/sysv/linux/gettimeofday.c             |   2 +-
 sysdeps/unix/sysv/linux/ifaddrs.c                  |   2 +-
 sysdeps/unix/sysv/linux/internal-signals.h         |  18 ++--
 sysdeps/unix/sysv/linux/libc_fatal.c               |   5 +-
 sysdeps/unix/sysv/linux/listen.c                   |   4 +-
 sysdeps/unix/sysv/linux/lseek.c                    |   8 +-
 sysdeps/unix/sysv/linux/lseek64.c                  |   4 +-
 sysdeps/unix/sysv/linux/lxstat.c                   |   6 +-
 sysdeps/unix/sysv/linux/lxstat64.c                 |   2 +-
 sysdeps/unix/sysv/linux/mips/brk.c                 |   2 +-
 sysdeps/unix/sysv/linux/mlock2.c                   |   6 +-
 sysdeps/unix/sysv/linux/mmap.c                     |   6 +-
 sysdeps/unix/sysv/linux/mmap64.c                   |   6 +-
 sysdeps/unix/sysv/linux/mmap_internal.h            |   2 +-
 sysdeps/unix/sysv/linux/mq_close.c                 |   2 +-
 sysdeps/unix/sysv/linux/mq_notify.c                |   4 +-
 sysdeps/unix/sysv/linux/mq_open.c                  |   4 +-
 sysdeps/unix/sysv/linux/mq_timedreceive.c          |  12 +--
 sysdeps/unix/sysv/linux/mq_timedsend.c             |  12 +--
 sysdeps/unix/sysv/linux/mq_unlink.c                |  13 ++-
 sysdeps/unix/sysv/linux/msgctl.c                   |  10 +-
 sysdeps/unix/sysv/linux/msgget.c                   |   4 +-
 sysdeps/unix/sysv/linux/msgrcv.c                   |   7 +-
 sysdeps/unix/sysv/linux/msgsnd.c                   |   6 +-
 sysdeps/unix/sysv/linux/msync.c                    |   2 +-
 sysdeps/unix/sysv/linux/not-cancel.h               |   2 +-
 sysdeps/unix/sysv/linux/not-errno.h                |  14 +--
 sysdeps/unix/sysv/linux/nscd_setup_thread.c        |   6 +-
 sysdeps/unix/sysv/linux/open.c                     |   2 +-
 sysdeps/unix/sysv/linux/open64.c                   |   4 +-
 sysdeps/unix/sysv/linux/open64_nocancel.c          |   4 +-
 sysdeps/unix/sysv/linux/open_by_handle_at.c        |   3 +-
 sysdeps/unix/sysv/linux/open_nocancel.c            |   2 +-
 sysdeps/unix/sysv/linux/openat.c                   |   2 +-
 sysdeps/unix/sysv/linux/openat64.c                 |   3 +-
 sysdeps/unix/sysv/linux/openat64_nocancel.c        |   4 +-
 sysdeps/unix/sysv/linux/openat_nocancel.c          |   2 +-
 sysdeps/unix/sysv/linux/pause.c                    |   4 +-
 sysdeps/unix/sysv/linux/personality.c              |   6 +-
 sysdeps/unix/sysv/linux/pkey_mprotect.c            |   2 +-
 sysdeps/unix/sysv/linux/poll.c                     |   4 +-
 sysdeps/unix/sysv/linux/posix_fadvise.c            |  19 ++--
 sysdeps/unix/sysv/linux/posix_fadvise64.c          |  13 +--
 sysdeps/unix/sysv/linux/posix_fallocate.c          |  10 +-
 sysdeps/unix/sysv/linux/posix_fallocate64.c        |  10 +-
 sysdeps/unix/sysv/linux/posix_madvise.c            |   3 +-
 sysdeps/unix/sysv/linux/ppoll.c                    |  11 ++-
 sysdeps/unix/sysv/linux/prctl.c                    |   2 +-
 sysdeps/unix/sysv/linux/pread.c                    |   3 +-
 sysdeps/unix/sysv/linux/pread64.c                  |   3 +-
 sysdeps/unix/sysv/linux/pread64_nocancel.c         |   3 +-
 sysdeps/unix/sysv/linux/preadv.c                   |   7 +-
 sysdeps/unix/sysv/linux/preadv2.c                  |   4 +-
 sysdeps/unix/sysv/linux/preadv64.c                 |   7 +-
 sysdeps/unix/sysv/linux/preadv64v2.c               |   4 +-
 sysdeps/unix/sysv/linux/prlimit.c                  |   6 +-
 sysdeps/unix/sysv/linux/process_vm_readv.c         |   4 +-
 sysdeps/unix/sysv/linux/process_vm_writev.c        |   4 +-
 sysdeps/unix/sysv/linux/pselect.c                  |   4 +-
 sysdeps/unix/sysv/linux/pthread-pids.h             |   2 +-
 sysdeps/unix/sysv/linux/pthread_kill.c             |   4 +-
 sysdeps/unix/sysv/linux/pthread_sigqueue.c         |   6 +-
 sysdeps/unix/sysv/linux/ptrace.c                   |   2 +-
 sysdeps/unix/sysv/linux/pwrite.c                   |   3 +-
 sysdeps/unix/sysv/linux/pwrite64.c                 |   3 +-
 sysdeps/unix/sysv/linux/pwritev.c                  |   7 +-
 sysdeps/unix/sysv/linux/pwritev2.c                 |   4 +-
 sysdeps/unix/sysv/linux/pwritev64.c                |   7 +-
 sysdeps/unix/sysv/linux/pwritev64v2.c              |   4 +-
 sysdeps/unix/sysv/linux/raise.c                    |   6 +-
 sysdeps/unix/sysv/linux/read.c                     |   2 +-
 sysdeps/unix/sysv/linux/read_nocancel.c            |   2 +-
 sysdeps/unix/sysv/linux/readahead.c                |   6 +-
 sysdeps/unix/sysv/linux/readv.c                    |   2 +-
 sysdeps/unix/sysv/linux/reboot.c                   |   2 +-
 sysdeps/unix/sysv/linux/recv.c                     |   7 +-
 sysdeps/unix/sysv/linux/recvfrom.c                 |   8 +-
 sysdeps/unix/sysv/linux/recvmmsg.c                 |   5 +-
 sysdeps/unix/sysv/linux/recvmsg.c                  |   4 +-
 sysdeps/unix/sysv/linux/rename.c                   |   6 +-
 sysdeps/unix/sysv/linux/renameat.c                 |   4 +-
 sysdeps/unix/sysv/linux/renameat2.c                |   4 +-
 sysdeps/unix/sysv/linux/riscv/flush-icache.c       |   2 +-
 sysdeps/unix/sysv/linux/riscv/syscall.c            |  11 +--
 sysdeps/unix/sysv/linux/s390/mmap_internal.h       |   2 +-
 sysdeps/unix/sysv/linux/safe-fatal.h               |   4 +-
 sysdeps/unix/sysv/linux/sched_getaffinity.c        |   2 +-
 sysdeps/unix/sysv/linux/sched_getcpu.c             |   2 +-
 sysdeps/unix/sysv/linux/sched_rr_gi.c              |   6 +-
 sysdeps/unix/sysv/linux/sched_setaffinity.c        |   2 +-
 sysdeps/unix/sysv/linux/select.c                   |   7 +-
 sysdeps/unix/sysv/linux/semctl.c                   |  14 +--
 sysdeps/unix/sysv/linux/semget.c                   |   4 +-
 sysdeps/unix/sysv/linux/semtimedop.c               |   6 +-
 sysdeps/unix/sysv/linux/send.c                     |   6 +-
 sysdeps/unix/sysv/linux/sendmmsg.c                 |   4 +-
 sysdeps/unix/sysv/linux/sendmsg.c                  |   4 +-
 sysdeps/unix/sysv/linux/sendto.c                   |   8 +-
 sysdeps/unix/sysv/linux/setegid.c                  |   6 +-
 sysdeps/unix/sysv/linux/seteuid.c                  |   6 +-
 sysdeps/unix/sysv/linux/setgid.c                   |   4 +-
 sysdeps/unix/sysv/linux/setgroups.c                |   4 +-
 sysdeps/unix/sysv/linux/setitimer.c                |   6 +-
 sysdeps/unix/sysv/linux/setregid.c                 |   4 +-
 sysdeps/unix/sysv/linux/setresgid.c                |   4 +-
 sysdeps/unix/sysv/linux/setresuid.c                |   4 +-
 sysdeps/unix/sysv/linux/setreuid.c                 |   4 +-
 sysdeps/unix/sysv/linux/setrlimit.c                |   2 +-
 sysdeps/unix/sysv/linux/setrlimit64.c              |   2 +-
 sysdeps/unix/sysv/linux/setsockopt.c               |   4 +-
 sysdeps/unix/sysv/linux/settimezone.c              |   2 +-
 sysdeps/unix/sysv/linux/setuid.c                   |   4 +-
 sysdeps/unix/sysv/linux/shmat.c                    |  12 +--
 sysdeps/unix/sysv/linux/shmctl.c                   |  10 +-
 sysdeps/unix/sysv/linux/shmdt.c                    |   4 +-
 sysdeps/unix/sysv/linux/shmget.c                   |   4 +-
 sysdeps/unix/sysv/linux/shutdown.c                 |   4 +-
 sysdeps/unix/sysv/linux/sigaction.c                |   2 +-
 sysdeps/unix/sysv/linux/signalfd.c                 |   2 +-
 sysdeps/unix/sysv/linux/sigpending.c               |   2 +-
 sysdeps/unix/sysv/linux/sigqueue.c                 |   2 +-
 sysdeps/unix/sysv/linux/sigsuspend.c               |   2 +-
 sysdeps/unix/sysv/linux/sigtimedwait.c             |   3 +-
 sysdeps/unix/sysv/linux/socket.c                   |   4 +-
 sysdeps/unix/sysv/linux/socketcall.h               |  36 +++++++
 sysdeps/unix/sysv/linux/socketpair.c               |   4 +-
 sysdeps/unix/sysv/linux/spawni.c                   |   4 +-
 sysdeps/unix/sysv/linux/speed.c                    |   4 +-
 sysdeps/unix/sysv/linux/splice.c                   |   3 +-
 sysdeps/unix/sysv/linux/statfs64.c                 |   2 +-
 sysdeps/unix/sysv/linux/statx.c                    |   2 +-
 sysdeps/unix/sysv/linux/sync_file_range.c          |  10 +-
 sysdeps/unix/sysv/linux/sysdep-vdso.h              |  10 +-
 sysdeps/unix/sysv/linux/sysdep.h                   |  13 ++-
 sysdeps/unix/sysv/linux/tcdrain.c                  |   2 +-
 sysdeps/unix/sysv/linux/tcgetattr.c                |   2 +-
 sysdeps/unix/sysv/linux/tcsendbrk.c                |   2 +-
 sysdeps/unix/sysv/linux/tcsetattr.c                |   4 +-
 sysdeps/unix/sysv/linux/tee.c                      |   2 +-
 sysdeps/unix/sysv/linux/time.c                     |   2 +-
 sysdeps/unix/sysv/linux/timer_create.c             |  12 +--
 sysdeps/unix/sysv/linux/timer_delete.c             |   2 +-
 sysdeps/unix/sysv/linux/timer_getoverr.c           |   2 +-
 sysdeps/unix/sysv/linux/timer_gettime.c            |   6 +-
 sysdeps/unix/sysv/linux/timer_settime.c            |  10 +-
 sysdeps/unix/sysv/linux/timerfd_gettime.c          |   6 +-
 sysdeps/unix/sysv/linux/timerfd_settime.c          |   6 +-
 sysdeps/unix/sysv/linux/times.c                    |   5 +-
 sysdeps/unix/sysv/linux/truncate.c                 |   6 +-
 sysdeps/unix/sysv/linux/truncate64.c               |   4 +-
 sysdeps/unix/sysv/linux/umount2.c                  |   2 +-
 sysdeps/unix/sysv/linux/ustat.c                    |   6 +-
 sysdeps/unix/sysv/linux/utimensat.c                |   8 +-
 sysdeps/unix/sysv/linux/vmsplice.c                 |   2 +-
 sysdeps/unix/sysv/linux/wait4.c                    |  12 ++-
 sysdeps/unix/sysv/linux/waitid.c                   |   2 +-
 sysdeps/unix/sysv/linux/wordsize-64/fxstat.c       |   2 +-
 sysdeps/unix/sysv/linux/wordsize-64/fxstatat.c     |   2 +-
 sysdeps/unix/sysv/linux/wordsize-64/lxstat.c       |   2 +-
 sysdeps/unix/sysv/linux/wordsize-64/xstat.c        |   2 +-
 sysdeps/unix/sysv/linux/write.c                    |   2 +-
 sysdeps/unix/sysv/linux/write_nocancel.c           |   2 +-
 sysdeps/unix/sysv/linux/writev.c                   |   2 +-
 sysdeps/unix/sysv/linux/xmknod.c                   |   6 +-
 sysdeps/unix/sysv/linux/xmknodat.c                 |   6 +-
 sysdeps/unix/sysv/linux/xstat.c                    |   6 +-
 sysdeps/unix/sysv/linux/xstat64.c                  |   2 +-
 sysdeps/unix/sysv/linux/xstatconv.c                |  12 +--
 272 files changed, 729 insertions(+), 697 deletions(-)

diff --git a/nptl/allocatestack.c b/nptl/allocatestack.c
index d16f3d71f8..8cc4cae781 100644
--- a/nptl/allocatestack.c
+++ b/nptl/allocatestack.c
@@ -1028,10 +1028,9 @@ setxid_signal_thread (struct xid_command *cmdp, struct pthread *t)
 
   int val;
   pid_t pid = __getpid ();
-  val = INTERNAL_SYSCALL_CALL (tgkill, pid, t->tid, SIGSETXID);
-
+  val = internal_syscall (__NR_tgkill, pid, t->tid, SIGSETXID);
   /* If this failed, it must have had not started yet or else exited.  */
-  if (!INTERNAL_SYSCALL_ERROR_P (val))
+  if (val == 0)
     {
       atomic_increment (&cmdp->cntr);
       return 1;
@@ -1157,16 +1156,10 @@ __nptl_setxid (struct xid_command *cmdp)
 
   /* This must be last, otherwise the current thread might not have
      permissions to send SIGSETXID syscall to the other threads.  */
-  result = INTERNAL_SYSCALL_NCS (cmdp->syscall_no, 3,
-				 cmdp->id[0], cmdp->id[1], cmdp->id[2]);
-  int error = 0;
-  if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (result)))
-    {
-      error = INTERNAL_SYSCALL_ERRNO (result);
-      __set_errno (error);
-      result = -1;
-    }
-  __nptl_setxid_error (cmdp, error);
+  result = inline_syscall (cmdp->syscall_no, cmdp->id[0], cmdp->id[1],
+			   cmdp->id[2]);
+
+  __nptl_setxid_error (cmdp, result == 0 ? 0 : errno);
 
   lll_unlock (stack_cache_lock, LLL_PRIVATE);
   return result;
diff --git a/nptl/nptl-init.c b/nptl/nptl-init.c
index d4cf20e3d1..3624b99531 100644
--- a/nptl/nptl-init.c
+++ b/nptl/nptl-init.c
@@ -117,8 +117,8 @@ static
 void
 __nptl_set_robust (struct pthread *self)
 {
-  INTERNAL_SYSCALL_CALL (set_robust_list, &self->robust_head,
-			 sizeof (struct robust_list_head));
+  internal_syscall (__NR_set_robust_list, &self->robust_head,
+		    sizeof (struct robust_list_head));
 }
 
 
@@ -188,12 +188,9 @@ sighandler_setxid (int sig, siginfo_t *si, void *ctx)
       || si->si_code != SI_TKILL)
     return;
 
-  result = INTERNAL_SYSCALL_NCS (__xidcmd->syscall_no, 3, __xidcmd->id[0],
-				 __xidcmd->id[1], __xidcmd->id[2]);
-  int error = 0;
-  if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (result)))
-    error = INTERNAL_SYSCALL_ERRNO (result);
-  __nptl_setxid_error (__xidcmd, error);
+  result = internal_syscall (__xidcmd->syscall_no, __xidcmd->id[0],
+			     __xidcmd->id[1], __xidcmd->id[2]);
+  __nptl_setxid_error (__xidcmd, -result);
 
   /* Reset the SETXID flag.  */
   struct pthread *self = THREAD_SELF;
@@ -241,9 +238,8 @@ __pthread_initialize_minimal_internal (void)
     pd->robust_head.futex_offset = (offsetof (pthread_mutex_t, __data.__lock)
 				    - offsetof (pthread_mutex_t,
 						__data.__list.__next));
-    int res = INTERNAL_SYSCALL_CALL (set_robust_list, &pd->robust_head,
-				     sizeof (struct robust_list_head));
-    if (INTERNAL_SYSCALL_ERROR_P (res))
+    if (internal_syscall (__NR_set_robust_list, &pd->robust_head,
+			  sizeof (struct robust_list_head)) != 0)
       set_robust_list_not_avail ();
   }
 
@@ -280,8 +276,8 @@ __pthread_initialize_minimal_internal (void)
      structure.  It is already cleared.  */
   __sigaddset (&sa.sa_mask, SIGCANCEL);
   __sigaddset (&sa.sa_mask, SIGSETXID);
-  INTERNAL_SYSCALL_CALL (rt_sigprocmask, SIG_UNBLOCK, &sa.sa_mask,
-			 NULL, _NSIG / 8);
+  internal_syscall (__NR_rt_sigprocmask, SIG_UNBLOCK, &sa.sa_mask,
+		    NULL, _NSIG / 8);
 
   /* Get the size of the static and alignment requirements for the TLS
      block.  */
diff --git a/nptl/pthread_cancel.c b/nptl/pthread_cancel.c
index 88c1ab8f6a..c2fe529eff 100644
--- a/nptl/pthread_cancel.c
+++ b/nptl/pthread_cancel.c
@@ -67,10 +67,7 @@ __pthread_cancel (pthread_t th)
 	     thread as canceled.  */
 	  pid_t pid = __getpid ();
 
-	  int val = INTERNAL_SYSCALL_CALL (tgkill, pid, pd->tid,
-					   SIGCANCEL);
-	  if (INTERNAL_SYSCALL_ERROR_P (val))
-	    result = INTERNAL_SYSCALL_ERRNO (val);
+	  result = -internal_syscall (__NR_tgkill, pid, pd->tid, SIGCANCEL);
 
 	  break;
 	}
diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c
index 35a9927cf2..6f0f0edac6 100644
--- a/nptl/pthread_create.c
+++ b/nptl/pthread_create.c
@@ -390,8 +390,8 @@ START_THREAD_DEFN
     {
       /* This call should never fail because the initial call in init.c
 	 succeeded.  */
-      INTERNAL_SYSCALL_CALL (set_robust_list, &pd->robust_head,
-			     sizeof (struct robust_list_head));
+      internal_syscall (__NR_set_robust_list, &pd->robust_head,
+			sizeof (struct robust_list_head));
     }
 
   /* This is where the try/finally block should be created.  For
diff --git a/nptl/pthread_getaffinity.c b/nptl/pthread_getaffinity.c
index 6ebd1ded2d..43e7164720 100644
--- a/nptl/pthread_getaffinity.c
+++ b/nptl/pthread_getaffinity.c
@@ -31,10 +31,10 @@ __pthread_getaffinity_np (pthread_t th, size_t cpusetsize, cpu_set_t *cpuset)
 {
   const struct pthread *pd = (const struct pthread *) th;
 
-  int res = INTERNAL_SYSCALL_CALL (sched_getaffinity, pd->tid,
-				   MIN (INT_MAX, cpusetsize), cpuset);
-  if (INTERNAL_SYSCALL_ERROR_P (res))
-    return INTERNAL_SYSCALL_ERRNO (res);
+  int res = internal_syscall (__NR_sched_getaffinity, pd->tid,
+			      MIN (INT_MAX, cpusetsize), cpuset);
+  if (__syscall_err (res))
+    return -res;
 
   /* Clean the rest of the memory the kernel didn't do.  */
   memset ((char *) cpuset + res, '\0', cpusetsize - res);
diff --git a/nptl/pthread_setaffinity.c b/nptl/pthread_setaffinity.c
index b0bd90c324..53396c50fe 100644
--- a/nptl/pthread_setaffinity.c
+++ b/nptl/pthread_setaffinity.c
@@ -28,14 +28,9 @@ __pthread_setaffinity_new (pthread_t th, size_t cpusetsize,
 			   const cpu_set_t *cpuset)
 {
   const struct pthread *pd = (const struct pthread *) th;
-  int res;
 
-  res = INTERNAL_SYSCALL_CALL (sched_setaffinity, pd->tid, cpusetsize,
-			       cpuset);
-
-  return (INTERNAL_SYSCALL_ERROR_P (res)
-	  ? INTERNAL_SYSCALL_ERRNO (res)
-	  : 0);
+  return -internal_syscall (__NR_sched_setaffinity, pd->tid, cpusetsize,
+			    cpuset);
 }
 versioned_symbol (libpthread, __pthread_setaffinity_new,
 		  pthread_setaffinity_np, GLIBC_2_3_4);
diff --git a/nptl/pthread_sigmask.c b/nptl/pthread_sigmask.c
index d266d296c5..52e2c714dd 100644
--- a/nptl/pthread_sigmask.c
+++ b/nptl/pthread_sigmask.c
@@ -38,12 +38,8 @@ __pthread_sigmask (int how, const sigset_t *newmask, sigset_t *oldmask)
     }
 
   /* We know that realtime signals are available if NPTL is used.  */
-  int result = INTERNAL_SYSCALL_CALL (rt_sigprocmask, how, newmask,
-				      oldmask, _NSIG / 8);
-
-  return (INTERNAL_SYSCALL_ERROR_P (result)
-	  ? INTERNAL_SYSCALL_ERRNO (result)
-	  : 0);
+  return -internal_syscall (__NR_rt_sigprocmask, how, newmask, oldmask,
+			    _NSIG / 8);
 }
 libc_hidden_def (__pthread_sigmask)
 
diff --git a/nptl/thrd_yield.c b/nptl/thrd_yield.c
index 3e0fd46a27..893e6dbcf1 100644
--- a/nptl/thrd_yield.c
+++ b/nptl/thrd_yield.c
@@ -21,5 +21,5 @@
 void
 thrd_yield (void)
 {
-  INTERNAL_SYSCALL_CALL (sched_yield);
+  internal_syscall (__NR_sched_yield);
 }
diff --git a/sysdeps/nptl/pthread-functions.h b/sysdeps/nptl/pthread-functions.h
index 294b7e1119..b0d6b5cf2c 100644
--- a/sysdeps/nptl/pthread-functions.h
+++ b/sysdeps/nptl/pthread-functions.h
@@ -75,12 +75,17 @@ extern struct pthread_functions __libc_pthread_functions attribute_hidden;
 extern int __libc_pthread_functions_init attribute_hidden;
 
 #ifdef PTR_DEMANGLE
-# define PTHFCT_CALL(fct, params) \
+# define PTHFCT_PTR(fct) \
   ({ __typeof (__libc_pthread_functions.fct) __p;			      \
      __p = __libc_pthread_functions.fct;				      \
      PTR_DEMANGLE (__p);						      \
+     __p; })
+# define PTHFCT_CALL(fct, params) \
+  ({ __typeof (__libc_pthread_functions.fct) __p = PTHFCT_PTR (fct);	      \
      __p params; })
 #else
+# define PTHFCT_PTR(fct) \
+  __libc_pthread_functions.fct
 # define PTHFCT_CALL(fct, params) \
   __libc_pthread_functions.fct params
 #endif
diff --git a/sysdeps/nptl/setxid.h b/sysdeps/nptl/setxid.h
index e022634b3b..392dba2e0b 100644
--- a/sysdeps/nptl/setxid.h
+++ b/sysdeps/nptl/setxid.h
@@ -18,42 +18,72 @@
 #include <nptl/pthreadP.h>
 #include <sysdep.h>
 
-#define __SETXID_1(cmd, arg1) \
-  cmd.id[0] = (long int) arg1
-#define __SETXID_2(cmd, arg1, arg2) \
-  __SETXID_1 (cmd, arg1); cmd.id[1] = (long int) arg2
-#define __SETXID_3(cmd, arg1, arg2, arg3) \
-  __SETXID_2 (cmd, arg1, arg2); cmd.id[2] = (long int) arg3
-
-#ifdef SHARED
-# define INLINE_SETXID_SYSCALL(name, nr, args...) \
-  ({									\
-    int __result;							\
-    if (__builtin_expect (__libc_pthread_functions_init, 0))		\
-      {									\
-	struct xid_command __cmd;					\
-	__cmd.syscall_no = __NR_##name;					\
-	__SETXID_##nr (__cmd, args);					\
-	__result = PTHFCT_CALL (ptr__nptl_setxid, (&__cmd));		\
-	}								\
-    else								\
-      __result = INLINE_SYSCALL (name, nr, args);			\
-    __result;								\
-   })
-#else
-# define INLINE_SETXID_SYSCALL(name, nr, args...) \
-  ({									\
-    extern __typeof (__nptl_setxid) __nptl_setxid __attribute__((weak));\
-    int __result;							\
-    if (__glibc_unlikely (__nptl_setxid	!= NULL))			      \
-      {									\
-	struct xid_command __cmd;					\
-	__cmd.syscall_no = __NR_##name;					\
-	__SETXID_##nr (__cmd, args);					\
-	__result =__nptl_setxid (&__cmd);				\
-      }									\
-    else								\
-      __result = INLINE_SYSCALL (name, nr, args);			\
-    __result;								\
-   })
-#endif
+static inline int (*get_nptl_setxid(void))(struct xid_command *cmdp)
+{
+# ifdef SHARED
+  if (__glibc_likely (__libc_pthread_functions_init))
+    return PTHFCT_PTR (ptr__nptl_setxid);
+  return NULL;
+# else
+  extern __typeof (__nptl_setxid) __nptl_setxid __attribute__((weak));
+  return __nptl_setxid;
+# endif
+}
+
+static inline long int
+__inline_setxid_syscall1 (int name, __syscall_arg_t arg1)
+{
+  int (*nptl_setxid) (struct xid_command *cmdp) = get_nptl_setxid ();
+  if (nptl_setxid != NULL)
+    {
+      struct xid_command cmd = { name, .id = { arg1 }, };
+      return nptl_setxid (&cmd);
+    }
+  return inline_syscall (name, arg1);
+}
+
+static inline long int
+__inline_setxid_syscall2 (int name, __syscall_arg_t arg1,
+			  __syscall_arg_t arg2)
+{
+  int (*nptl_setxid) (struct xid_command *cmdp) = get_nptl_setxid ();
+  if (nptl_setxid != NULL)
+    {
+      struct xid_command cmd = { name, .id = { arg1, arg2 }, };
+      return nptl_setxid (&cmd);
+    }
+  return inline_syscall (name, arg1, arg2);
+}
+
+static inline long int
+__inline_setxid_syscall3 (int name, __syscall_arg_t arg1,
+			   __syscall_arg_t arg2, __syscall_arg_t arg3)
+{
+  int (*nptl_setxid) (struct xid_command *cmdp) = get_nptl_setxid ();
+  if (nptl_setxid != NULL)
+    {
+      struct xid_command cmd = { name, .id = { arg1, arg2, arg3 }, };
+      return nptl_setxid (&cmd);
+    }
+  return inline_syscall (name, arg1, arg2, arg3);
+}
+
+#define __inline_setxid_syscall_0(name) 				\
+  __inline_setxid_syscall0 (name)
+#define __inline_setxid_syscall_1(name, a1) 				\
+  __inline_setxid_syscall1 (name, ARGIFY (a1))
+#define __inline_setxid_syscall_2(name, a1, a2) 			\
+  __inline_setxid_syscall2 (name, ARGIFY (a1), ARGIFY (a2))
+#define __inline_setxid_syscall_3(name, a1, a2, a3) 			\
+  __inline_setxid_syscall3 (name, ARGIFY (a1), ARGIFY (a2), ARGIFY (a3))
+
+#define __INLINE_SETXID_NARGS_X(a,b,c,d,e,f,g,h,n,...) n
+#define __INLINE_SETXID_NARGS(...) \
+  __INLINE_SETXID_NARGS_X (__VA_ARGS__,7,6,5,4,3,2,1,0,)
+#define __INLINE_SETXID_CONCAT_X(a,b)     a##b
+#define __INLINE_SETXID_CONCAT(a,b)       __INLINE_SETXID_CONCAT_X (a, b)
+#define __INLINE_SETXID_DISP(b,...) \
+  __INLINE_SETXID_CONCAT (b,__INLINE_SETXID_NARGS(__VA_ARGS__))(__VA_ARGS__)
+
+#define inline_setxid_syscall(...)					\
+  __INLINE_SETXID_DISP (__inline_setxid_syscall_, __VA_ARGS__)
diff --git a/sysdeps/unix/sysv/linux/_exit.c b/sysdeps/unix/sysv/linux/_exit.c
index a8521101b3..742ae2d402 100644
--- a/sysdeps/unix/sysv/linux/_exit.c
+++ b/sysdeps/unix/sysv/linux/_exit.c
@@ -27,8 +27,8 @@ _exit (int status)
 {
   while (1)
     {
-      INLINE_SYSCALL (exit_group, 1, status);
-      INLINE_SYSCALL (exit, 1, status);
+      inline_syscall (__NR_exit_group, status);
+      inline_syscall (__NR_exit, status);
 
 #ifdef ABORT_INSTRUCTION
       ABORT_INSTRUCTION;
diff --git a/sysdeps/unix/sysv/linux/accept.c b/sysdeps/unix/sysv/linux/accept.c
index f6021a75e7..d685230ec3 100644
--- a/sysdeps/unix/sysv/linux/accept.c
+++ b/sysdeps/unix/sysv/linux/accept.c
@@ -23,11 +23,11 @@ int
 __libc_accept (int fd, __SOCKADDR_ARG addr, socklen_t *len)
 {
 #ifdef __ASSUME_ACCEPT_SYSCALL
-  return SYSCALL_CANCEL (accept, fd, addr.__sockaddr__, len);
+  return inline_syscall_cancel (__NR_accept, fd, addr.__sockaddr__, len);
 #elif defined __ASSUME_ACCEPT4_SYSCALL
-  return SYSCALL_CANCEL (accept4, fd, addr.__sockaddr__, len, 0);
+  return inline_syscall_cancel (__NR_accept4, fd, addr.__sockaddr__, len, 0);
 #else
-  return SOCKETCALL_CANCEL (accept, fd, addr.__sockaddr__, len);
+  return socketcall_cancel (accept, fd, addr.__sockaddr__, len);
 #endif
 }
 weak_alias (__libc_accept, accept)
diff --git a/sysdeps/unix/sysv/linux/accept4.c b/sysdeps/unix/sysv/linux/accept4.c
index 85cdeef0e8..4cadef071f 100644
--- a/sysdeps/unix/sysv/linux/accept4.c
+++ b/sysdeps/unix/sysv/linux/accept4.c
@@ -29,8 +29,10 @@ int
 accept4 (int fd, __SOCKADDR_ARG addr, socklen_t *addr_len, int flags)
 {
 #ifdef __ASSUME_ACCEPT4_SYSCALL
-  return SYSCALL_CANCEL (accept4, fd, addr.__sockaddr__, addr_len, flags);
+  return inline_syscall_cancel (__NR_accept4, fd, addr.__sockaddr__, addr_len,
+				flags);
 #else
-  return SOCKETCALL_CANCEL (accept4, fd, addr.__sockaddr__, addr_len, flags);
+  return socketcall_cancel (accept4, fd, addr.__sockaddr__, addr_len,
+			    flags);
 #endif
 }
diff --git a/sysdeps/unix/sysv/linux/access.c b/sysdeps/unix/sysv/linux/access.c
index d5e8949013..04a4704837 100644
--- a/sysdeps/unix/sysv/linux/access.c
+++ b/sysdeps/unix/sysv/linux/access.c
@@ -24,9 +24,9 @@ int
 __access (const char *file, int type)
 {
 #ifdef __NR_access
-  return INLINE_SYSCALL_CALL (access, file, type);
+  return inline_syscall (__NR_access, file, type);
 #else
-  return INLINE_SYSCALL_CALL (faccessat, AT_FDCWD, file, type);
+  return inline_syscall (__NR_faccessat, AT_FDCWD, file, type);
 #endif
 }
 libc_hidden_def (__access)
diff --git a/sysdeps/unix/sysv/linux/adjtime.c b/sysdeps/unix/sysv/linux/adjtime.c
index d8b7b019b1..cc28b5db67 100644
--- a/sysdeps/unix/sysv/linux/adjtime.c
+++ b/sysdeps/unix/sysv/linux/adjtime.c
@@ -37,7 +37,7 @@ __adjtime64 (const struct __timeval64 *itv, struct __timeval64 *otv)
       tmp.tv_sec = itv->tv_sec + itv->tv_usec / 1000000L;
       tmp.tv_usec = itv->tv_usec % 1000000L;
       if (tmp.tv_sec > MAX_SEC || tmp.tv_sec < MIN_SEC)
-	return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
+	return __syscall_ret_err (EINVAL);
       tntx.offset = tmp.tv_usec + tmp.tv_sec * 1000000L;
       tntx.modes = ADJ_OFFSET_SINGLESHOT;
     }
diff --git a/sysdeps/unix/sysv/linux/aio_misc.h b/sysdeps/unix/sysv/linux/aio_misc.h
index 30c3cd778e..89a04d8b03 100644
--- a/sysdeps/unix/sysv/linux/aio_misc.h
+++ b/sysdeps/unix/sysv/linux/aio_misc.h
@@ -26,15 +26,15 @@
 # define aio_start_notify_thread __aio_start_notify_thread
 # define aio_create_helper_thread __aio_create_helper_thread
 
-extern inline void
+static inline void
 __aio_start_notify_thread (void)
 {
   sigset_t ss;
   sigemptyset (&ss);
-  INTERNAL_SYSCALL_CALL (rt_sigprocmask, SIG_SETMASK, &ss, NULL, _NSIG / 8);
+  internal_syscall (__NR_rt_sigprocmask, SIG_SETMASK, &ss, NULL, _NSIG / 8);
 }
 
-extern inline int
+static inline int
 __aio_create_helper_thread (pthread_t *threadp, void *(*tf) (void *),
 			    void *arg)
 {
@@ -52,12 +52,12 @@ __aio_create_helper_thread (pthread_t *threadp, void *(*tf) (void *),
   sigset_t ss;
   sigset_t oss;
   sigfillset (&ss);
-  INTERNAL_SYSCALL_CALL (rt_sigprocmask, SIG_SETMASK, &ss, &oss, _NSIG / 8);
+  internal_syscall (__NR_rt_sigprocmask, SIG_SETMASK, &ss, &oss, _NSIG / 8);
 
   int ret = pthread_create (threadp, &attr, tf, arg);
 
   /* Restore the signal mask.  */
-  INTERNAL_SYSCALL_CALL (rt_sigprocmask, SIG_SETMASK, &oss, NULL, _NSIG / 8);
+  internal_syscall (__NR_rt_sigprocmask, SIG_SETMASK, &oss, NULL, _NSIG / 8);
 
   (void) pthread_attr_destroy (&attr);
   return ret;
diff --git a/sysdeps/unix/sysv/linux/aio_sigqueue.c b/sysdeps/unix/sysv/linux/aio_sigqueue.c
index 2c5a79bef6..b4107786eb 100644
--- a/sysdeps/unix/sysv/linux/aio_sigqueue.c
+++ b/sysdeps/unix/sysv/linux/aio_sigqueue.c
@@ -42,5 +42,5 @@ __aio_sigqueue (int sig, const union sigval val, pid_t caller_pid)
   info.si_uid = getuid ();
   info.si_value = val;
 
-  return INLINE_SYSCALL (rt_sigqueueinfo, 3, info.si_pid, sig, &info);
+  return inline_syscall (__NR_rt_sigqueueinfo, info.si_pid, sig, &info);
 }
diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c
index aa8ea3c8b1..811cfafd68 100644
--- a/sysdeps/unix/sysv/linux/alpha/ioperm.c
+++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c
@@ -196,7 +196,7 @@ stl_mb(unsigned int val, unsigned long addr)
 static inline void
 __sethae(unsigned long value)
 {
-  INLINE_SYSCALL_CALL (sethae, value);
+  inline_syscall (__NR_sethae, value);
 }
 
 extern long __pciconfig_iobase(enum __pciconfig_iobase_which __which,
diff --git a/sysdeps/unix/sysv/linux/alpha/select.c b/sysdeps/unix/sysv/linux/alpha/select.c
index 7793dfd6b1..ef17480146 100644
--- a/sysdeps/unix/sysv/linux/alpha/select.c
+++ b/sysdeps/unix/sysv/linux/alpha/select.c
@@ -27,7 +27,8 @@ int
 __new_select (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
 	      struct timeval *timeout)
 {
-  return SYSCALL_CANCEL (select, nfds, readfds, writefds, exceptfds, timeout);
+  return inline_syscall_cancel (__NR_select, nfds, readfds, writefds,
+				exceptfds, timeout);
 }
 strong_alias (__new_select, __select)
 libc_hidden_def (__select)
@@ -43,8 +44,8 @@ int
 __select_tv32 (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
 	       struct timeval *timeout)
 {
-  return SYSCALL_CANCEL (osf_select, nfds, readfds, writefds, exceptfds,
-                        timeout);
+  return inline_syscall_cancel (__NR_osf_select, nfds, readfds, writefds,
+				exceptfds, timeout);
 }
 strong_alias (__select_tv32, __select_tv32_1)
 
diff --git a/sysdeps/unix/sysv/linux/arch-fork.h b/sysdeps/unix/sysv/linux/arch-fork.h
index 1a4e8dd75e..37f64da132 100644
--- a/sysdeps/unix/sysv/linux/arch-fork.h
+++ b/sysdeps/unix/sysv/linux/arch-fork.h
@@ -37,16 +37,16 @@ arch_fork (void *ctid)
 # ifdef INLINE_CLONE_SYSCALL
   ret = INLINE_CLONE_SYSCALL (flags, 0, NULL, 0, ctid);
 # else
-  ret = INLINE_SYSCALL_CALL (clone, flags, 0, NULL, 0, ctid);
+  ret = inline_syscall (__NR_clone, flags, 0, NULL, 0, ctid);
 # endif
 #elif defined(__ASSUME_CLONE_BACKWARDS2)
-  ret = INLINE_SYSCALL_CALL (clone, 0, flags, NULL, ctid, 0);
+  ret = inline_syscall (__NR_clone, 0, flags, NULL, ctid, 0);
 #elif defined(__ASSUME_CLONE_BACKWARDS3)
-  ret = INLINE_SYSCALL_CALL (clone, flags, 0, 0, NULL, ctid, 0);
+  ret = inline_syscall (__NR_clone, flags, 0, 0, NULL, ctid, 0);
 #elif defined(__ASSUME_CLONE2)
-  ret = INLINE_SYSCALL_CALL (clone2, flags, 0, 0, NULL, ctid, 0);
+  ret = inline_syscall (__NR_clone2, flags, 0, 0, NULL, ctid, 0);
 #elif defined(__ASSUME_CLONE_DEFAULT)
-  ret = INLINE_SYSCALL_CALL (clone, flags, 0, NULL, ctid, 0);
+  ret = inline_syscall (__NR_clone, flags, 0, NULL, ctid, 0);
 #else
 # error "Undefined clone variant"
 #endif
diff --git a/sysdeps/unix/sysv/linux/bind.c b/sysdeps/unix/sysv/linux/bind.c
index da2ed19a33..f946a7881b 100644
--- a/sysdeps/unix/sysv/linux/bind.c
+++ b/sysdeps/unix/sysv/linux/bind.c
@@ -27,9 +27,9 @@ int
 __bind (int fd, __CONST_SOCKADDR_ARG addr, socklen_t len)
 {
 #ifdef __ASSUME_BIND_SYSCALL
-  return INLINE_SYSCALL (bind, 3, fd, addr.__sockaddr__, len);
+  return inline_syscall (__NR_bind, fd, addr.__sockaddr__, len);
 #else
-  return SOCKETCALL (bind, fd, addr.__sockaddr__, len, 0, 0, 0);
+  return socketcall (bind, fd, addr.__sockaddr__, len);
 #endif
 }
 weak_alias (__bind, bind)
diff --git a/sysdeps/unix/sysv/linux/clock_adjtime.c b/sysdeps/unix/sysv/linux/clock_adjtime.c
index 764a60b9bf..17297132c4 100644
--- a/sysdeps/unix/sysv/linux/clock_adjtime.c
+++ b/sysdeps/unix/sysv/linux/clock_adjtime.c
@@ -30,9 +30,9 @@ __clock_adjtime64 (const clockid_t clock_id, struct __timex64 *tx64)
 # ifndef __NR_clock_adjtime64
 #  define __NR_clock_adjtime64 __NR_clock_adjtime
 # endif
-	return INLINE_SYSCALL_CALL (clock_adjtime64, clock_id, tx64);
+  return inline_syscall (__NR_clock_adjtime64, clock_id, tx64);
 #else
-  int ret = INLINE_SYSCALL_CALL (clock_adjtime64, clock_id, tx64);
+  int ret = inline_syscall (__NR_clock_adjtime64, clock_id, tx64);
   if (errno != ENOSYS)
     return ret;
 
@@ -44,7 +44,7 @@ __clock_adjtime64 (const clockid_t clock_id, struct __timex64 *tx64)
     }
 
   struct timex tx32 = valid_timex64_to_timex (*tx64);
-  int retval = INLINE_SYSCALL_CALL (clock_adjtime, clock_id, &tx32);
+  int retval = inline_syscall (__NR_clock_adjtime, clock_id, &tx32);
   if (retval >= 0)
     *tx64 = valid_timex_to_timex64 (tx32);
 
diff --git a/sysdeps/unix/sysv/linux/clock_getcpuclockid.c b/sysdeps/unix/sysv/linux/clock_getcpuclockid.c
index 687859770b..c649d0cf47 100644
--- a/sysdeps/unix/sysv/linux/clock_getcpuclockid.c
+++ b/sysdeps/unix/sysv/linux/clock_getcpuclockid.c
@@ -31,20 +31,19 @@ __clock_getcpuclockid (pid_t pid, clockid_t *clock_id)
 
   const clockid_t pidclock = MAKE_PROCESS_CPUCLOCK (pid, CPUCLOCK_SCHED);
 
-  int r = INTERNAL_SYSCALL_CALL (clock_getres, pidclock, NULL);
-  if (!INTERNAL_SYSCALL_ERROR_P (r))
+  int r = internal_syscall (__NR_clock_getres, pidclock, NULL);
+  if (r == 0)
     {
       *clock_id = pidclock;
       return 0;
     }
 
-  if (INTERNAL_SYSCALL_ERRNO (r) == EINVAL)
+  if (-r == EINVAL)
     {
       /* The clock_getres system call checked the PID for us.  */
       return ESRCH;
     }
-  else
-    return INTERNAL_SYSCALL_ERRNO (r);
+  return -r;
 }
 
 versioned_symbol (libc, __clock_getcpuclockid, clock_getcpuclockid, GLIBC_2_17);
diff --git a/sysdeps/unix/sysv/linux/clock_getres.c b/sysdeps/unix/sysv/linux/clock_getres.c
index 5f6955ab10..fa0244dd86 100644
--- a/sysdeps/unix/sysv/linux/clock_getres.c
+++ b/sysdeps/unix/sysv/linux/clock_getres.c
@@ -36,7 +36,7 @@ __clock_getres64 (clockid_t clock_id, struct __timespec64 *res)
 # ifdef HAVE_CLOCK_GETRES64_VSYSCALL
   return INLINE_VSYSCALL (clock_getres_time64, 2, clock_id, res);
 # else
-  return INLINE_SYSCALL_CALL (clock_getres_time64, clock_id, res);
+  return inline_syscall (__NR_clock_getres_time64, clock_id, res);
 # endif
 #else
   int r;
@@ -50,7 +50,7 @@ __clock_getres64 (clockid_t clock_id, struct __timespec64 *res)
 #  ifdef HAVE_CLOCK_GETRES64_VSYSCALL
       r = INLINE_VSYSCALL (clock_getres_time64, 2, clock_id, res);
 #  else
-      r = INLINE_SYSCALL_CALL (clock_getres_time64, clock_id, res);
+      r = inline_syscall (__NR_clock_getres_time64, clock_id, res);
 #  endif
       if (r == 0 || errno != ENOSYS)
 	return r;
@@ -63,7 +63,7 @@ __clock_getres64 (clockid_t clock_id, struct __timespec64 *res)
 # ifdef HAVE_CLOCK_GETRES_VSYSCALL
   r = INLINE_VSYSCALL (clock_getres, 2, clock_id, &ts32);
 # else
-  r = INLINE_SYSCALL_CALL (clock_getres, clock_id, &ts32);
+  r = inline_syscall (__NR_clock_getres, clock_id, &ts32);
 # endif
   if (r == 0)
     *res = valid_timespec_to_timespec64 (ts32);
diff --git a/sysdeps/unix/sysv/linux/clock_gettime.c b/sysdeps/unix/sysv/linux/clock_gettime.c
index bfe3823b68..9fbb96df3a 100644
--- a/sysdeps/unix/sysv/linux/clock_gettime.c
+++ b/sysdeps/unix/sysv/linux/clock_gettime.c
@@ -37,7 +37,7 @@ __clock_gettime64 (clockid_t clock_id, struct __timespec64 *tp)
 # ifdef HAVE_CLOCK_GETTIME64_VSYSCALL
   return INLINE_VSYSCALL (clock_gettime64, 2, clock_id, tp);
 # else
-  return INLINE_SYSCALL_CALL (clock_gettime64, clock_id, tp);
+  return inline_syscall (__NR_clock_gettime64, clock_id, tp);
 # endif
 #else
   int r;
@@ -51,7 +51,7 @@ __clock_gettime64 (clockid_t clock_id, struct __timespec64 *tp)
 #  ifdef HAVE_CLOCK_GETTIME64_VSYSCALL
       r = INLINE_VSYSCALL (clock_gettime64, 2, clock_id, tp);
 #  else
-      r = INLINE_SYSCALL_CALL (clock_gettime64, clock_id, tp);
+      r = inline_syscall (__NR_clock_gettime64, clock_id, tp);
 #  endif
       if (r == 0 || errno != ENOSYS)
 	return r;
@@ -64,7 +64,7 @@ __clock_gettime64 (clockid_t clock_id, struct __timespec64 *tp)
 # ifdef HAVE_CLOCK_GETTIME_VSYSCALL
   r = INLINE_VSYSCALL (clock_gettime, 2, clock_id, &tp32);
 # else
-  r = INLINE_SYSCALL_CALL (clock_gettime, clock_id, &tp32);
+  r = inline_syscall (__NR_clock_gettime, clock_id, &tp32);
 # endif
   if (r == 0)
     *tp = valid_timespec_to_timespec64 (tp32);
diff --git a/sysdeps/unix/sysv/linux/clock_nanosleep.c b/sysdeps/unix/sysv/linux/clock_nanosleep.c
index cc7a09569d..1b3900585a 100644
--- a/sysdeps/unix/sysv/linux/clock_nanosleep.c
+++ b/sysdeps/unix/sysv/linux/clock_nanosleep.c
@@ -43,17 +43,14 @@ __clock_nanosleep_time64 (clockid_t clock_id, int flags, const struct __timespec
 # ifndef __NR_clock_nanosleep_time64
 #  define __NR_clock_nanosleep_time64 __NR_clock_nanosleep
 # endif
-  r = INTERNAL_SYSCALL_CANCEL (clock_nanosleep_time64, clock_id,
+  r = internal_syscall_cancel (__NR_clock_nanosleep_time64, clock_id,
                                flags, req, rem);
 #else
 # ifdef __NR_clock_nanosleep_time64
-  r = INTERNAL_SYSCALL_CANCEL (clock_nanosleep_time64, clock_id,
+  r = internal_syscall_cancel (__NR_clock_nanosleep_time64, clock_id,
                                flags, req, rem);
-
-  if (! INTERNAL_SYSCALL_ERROR_P (r))
-    return 0;
-  if (INTERNAL_SYSCALL_ERRNO (r) != ENOSYS)
-    return INTERNAL_SYSCALL_ERRNO (r);
+  if (r == 0 || r != -ENOSYS)
+    return -r;
 # endif /* __NR_clock_nanosleep_time64 */
 
   if (! in_time_t_range (req->tv_sec))
@@ -64,18 +61,16 @@ __clock_nanosleep_time64 (clockid_t clock_id, int flags, const struct __timespec
 
   struct timespec tr32;
   struct timespec ts32 = valid_timespec64_to_timespec (*req);
-  r = INTERNAL_SYSCALL_CANCEL (clock_nanosleep, clock_id, flags,
+  r = internal_syscall_cancel (__NR_clock_nanosleep, clock_id, flags,
                                &ts32, &tr32);
-  if (INTERNAL_SYSCALL_ERROR_P (r))
+  if (__syscall_err (r))
     {
-      if (INTERNAL_SYSCALL_ERRNO (r) == EINTR && rem != NULL
-	  && (flags & TIMER_ABSTIME) == 0)
+      if (r == -EINTR && rem != NULL && (flags & TIMER_ABSTIME) == 0)
 	*rem = valid_timespec_to_timespec64 (tr32);
     }
 #endif /* __ASSUME_TIME64_SYSCALLS */
 
-  return (INTERNAL_SYSCALL_ERROR_P (r)
-	  ? INTERNAL_SYSCALL_ERRNO (r) : 0);
+  return -r;
 }
 
 #if __TIMESIZE != 64
diff --git a/sysdeps/unix/sysv/linux/clock_settime.c b/sysdeps/unix/sysv/linux/clock_settime.c
index ebda871f4c..6fcfb074b9 100644
--- a/sysdeps/unix/sysv/linux/clock_settime.c
+++ b/sysdeps/unix/sysv/linux/clock_settime.c
@@ -36,10 +36,10 @@ __clock_settime64 (clockid_t clock_id, const struct __timespec64 *tp)
 # ifndef __NR_clock_settime64
 #  define __NR_clock_settime64 __NR_clock_settime
 # endif
-  return INLINE_SYSCALL_CALL (clock_settime64, clock_id, tp);
+  return inline_syscall (__NR_clock_settime64, clock_id, tp);
 #else
 # ifdef __NR_clock_settime64
-  int ret = INLINE_SYSCALL_CALL (clock_settime64, clock_id, tp);
+  int ret = inline_syscall (__NR_clock_settime64, clock_id, tp);
   if (ret == 0 || errno != ENOSYS)
     return ret;
 # endif
@@ -50,7 +50,7 @@ __clock_settime64 (clockid_t clock_id, const struct __timespec64 *tp)
     }
 
   struct timespec ts32 = valid_timespec64_to_timespec (*tp);
-  return INLINE_SYSCALL_CALL (clock_settime, clock_id, &ts32);
+  return inline_syscall (__NR_clock_settime, clock_id, &ts32);
 #endif
 }
 
diff --git a/sysdeps/unix/sysv/linux/close.c b/sysdeps/unix/sysv/linux/close.c
index 602ab558e6..a326bf017f 100644
--- a/sysdeps/unix/sysv/linux/close.c
+++ b/sysdeps/unix/sysv/linux/close.c
@@ -24,7 +24,7 @@
 int
 __close (int fd)
 {
-  return SYSCALL_CANCEL (close, fd);
+  return inline_syscall_cancel (__NR_close, fd);
 }
 libc_hidden_def (__close)
 strong_alias (__close, __libc_close)
diff --git a/sysdeps/unix/sysv/linux/close_nocancel.c b/sysdeps/unix/sysv/linux/close_nocancel.c
index 23ebcd0df5..cbbc310d3b 100644
--- a/sysdeps/unix/sysv/linux/close_nocancel.c
+++ b/sysdeps/unix/sysv/linux/close_nocancel.c
@@ -23,6 +23,6 @@
 int
 __close_nocancel (int fd)
 {
-  return INLINE_SYSCALL_CALL (close, fd);
+  return inline_syscall (__NR_close, fd);
 }
 libc_hidden_def (__close_nocancel)
diff --git a/sysdeps/unix/sysv/linux/connect.c b/sysdeps/unix/sysv/linux/connect.c
index 0e970b41ed..8f4916bf54 100644
--- a/sysdeps/unix/sysv/linux/connect.c
+++ b/sysdeps/unix/sysv/linux/connect.c
@@ -23,9 +23,9 @@ int
 __libc_connect (int fd, __CONST_SOCKADDR_ARG addr, socklen_t len)
 {
 #ifdef __ASSUME_CONNECT_SYSCALL
-  return SYSCALL_CANCEL (connect, fd, addr.__sockaddr__, len);
+  return inline_syscall_cancel (__NR_connect, fd, addr.__sockaddr__, len);
 #else
-  return SOCKETCALL_CANCEL (connect, fd, addr.__sockaddr__, len);
+  return socketcall_cancel (connect, fd, addr.__sockaddr__, len);
 #endif
 }
 weak_alias (__libc_connect, connect)
diff --git a/sysdeps/unix/sysv/linux/copy_file_range.c b/sysdeps/unix/sysv/linux/copy_file_range.c
index a73c89f079..186c46294e 100644
--- a/sysdeps/unix/sysv/linux/copy_file_range.c
+++ b/sysdeps/unix/sysv/linux/copy_file_range.c
@@ -25,6 +25,6 @@ copy_file_range (int infd, __off64_t *pinoff,
                  int outfd, __off64_t *poutoff,
                  size_t length, unsigned int flags)
 {
-  return SYSCALL_CANCEL (copy_file_range, infd, pinoff, outfd, poutoff,
-                         length, flags);
+  return inline_syscall_cancel (__NR_copy_file_range, infd, pinoff, outfd,
+				poutoff, length, flags);
 }
diff --git a/sysdeps/unix/sysv/linux/creat.c b/sysdeps/unix/sysv/linux/creat.c
index 184e5f55f7..f7727f56ce 100644
--- a/sysdeps/unix/sysv/linux/creat.c
+++ b/sysdeps/unix/sysv/linux/creat.c
@@ -28,7 +28,7 @@ int
 __creat (const char *file, mode_t mode)
 {
 # ifdef __NR_creat
-  return SYSCALL_CANCEL (creat, file, mode);
+  return inline_syscall_cancel (__NR_creat, file, mode);
 # else
   return __open (file, O_WRONLY | O_CREAT | O_TRUNC, mode);
 # endif
diff --git a/sysdeps/unix/sysv/linux/creat64.c b/sysdeps/unix/sysv/linux/creat64.c
index d29323ad64..682484672a 100644
--- a/sysdeps/unix/sysv/linux/creat64.c
+++ b/sysdeps/unix/sysv/linux/creat64.c
@@ -25,7 +25,7 @@ int
 __creat64 (const char *file, mode_t mode)
 {
 #if defined __OFF_T_MATCHES_OFF64_T && defined __NR_creat
-  return SYSCALL_CANCEL (creat, file, mode);
+  return inline_syscall_cancel (__NR_creat, file, mode);
 #else
   /* We need to pass O_LARGEFILE.  */
   return __open64 (file, O_WRONLY | O_CREAT | O_TRUNC, mode);
diff --git a/sysdeps/unix/sysv/linux/createthread.c b/sysdeps/unix/sysv/linux/createthread.c
index 6588893ba5..4365faa10e 100644
--- a/sysdeps/unix/sysv/linux/createthread.c
+++ b/sysdeps/unix/sysv/linux/createthread.c
@@ -119,20 +119,20 @@ create_thread (struct pthread *pd, const struct pthread_attr *attr,
 	{
 	  assert (*stopped_start);
 
-	  res = INTERNAL_SYSCALL_CALL (sched_setaffinity, pd->tid,
-				       attr->extension->cpusetsize,
-				       attr->extension->cpuset);
+	  res = internal_syscall (__NR_sched_setaffinity, pd->tid,
+				  attr->extension->cpusetsize,
+				  attr->extension->cpuset);
 
-	  if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (res)))
+	  if (__glibc_unlikely (__syscall_err (res)))
 	  err_out:
 	    {
 	      /* The operation failed.  We have to kill the thread.
 		 We let the normal cancellation mechanism do the work.  */
 
 	      pid_t pid = __getpid ();
-	      INTERNAL_SYSCALL_CALL (tgkill, pid, pd->tid, SIGCANCEL);
+	      internal_syscall (__NR_tgkill, pid, pd->tid, SIGCANCEL);
 
-	      return INTERNAL_SYSCALL_ERRNO (res);
+	      return -res;
 	    }
 	}
 
@@ -141,10 +141,10 @@ create_thread (struct pthread *pd, const struct pthread_attr *attr,
 	{
 	  assert (*stopped_start);
 
-	  res = INTERNAL_SYSCALL_CALL (sched_setscheduler, pd->tid,
-				       pd->schedpolicy, &pd->schedparam);
+	  res = internal_syscall (__NR_sched_setscheduler, pd->tid,
+				  pd->schedpolicy, &pd->schedparam);
 
-	  if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (res)))
+	  if (__syscall_err (res))
 	    goto err_out;
 	}
     }
diff --git a/sysdeps/unix/sysv/linux/default-sched.h b/sysdeps/unix/sysv/linux/default-sched.h
index 6db3e3ba46..f32019a889 100644
--- a/sysdeps/unix/sysv/linux/default-sched.h
+++ b/sysdeps/unix/sysv/linux/default-sched.h
@@ -28,13 +28,13 @@ collect_default_sched (struct pthread *pd)
 {
   if ((pd->flags & ATTR_FLAG_POLICY_SET) == 0)
     {
-      pd->schedpolicy = INTERNAL_SYSCALL_CALL (sched_getscheduler, 0);
+      pd->schedpolicy = internal_syscall (__NR_sched_getscheduler, 0);
       pd->flags |= ATTR_FLAG_POLICY_SET;
     }
 
   if ((pd->flags & ATTR_FLAG_SCHED_SET) == 0)
     {
-      INTERNAL_SYSCALL_CALL (sched_getparam, 0, &pd->schedparam);
+      internal_syscall (__NR_sched_getparam, 0, &pd->schedparam);
       pd->flags |= ATTR_FLAG_SCHED_SET;
     }
 }
diff --git a/sysdeps/unix/sysv/linux/dl-openat64.c b/sysdeps/unix/sysv/linux/dl-openat64.c
index bca2403de6..1b64bd2dc7 100644
--- a/sysdeps/unix/sysv/linux/dl-openat64.c
+++ b/sysdeps/unix/sysv/linux/dl-openat64.c
@@ -27,5 +27,5 @@ openat64 (int dfd, const char *file, int oflag, ...)
 {
   assert (!__OPEN_NEEDS_MODE (oflag));
 
-  return INLINE_SYSCALL (openat, 3, dfd, file, oflag | O_LARGEFILE);
+  return inline_syscall (__NR_openat, dfd, file, oflag | O_LARGEFILE);
 }
diff --git a/sysdeps/unix/sysv/linux/dl-origin.c b/sysdeps/unix/sysv/linux/dl-origin.c
index 515ed6fc8c..4ccc86b262 100644
--- a/sysdeps/unix/sysv/linux/dl-origin.c
+++ b/sysdeps/unix/sysv/linux/dl-origin.c
@@ -38,9 +38,9 @@ _dl_get_origin (void)
   char *result;
   int len;
 
-  len = INTERNAL_SYSCALL_CALL (readlink, "/proc/self/exe", linkval,
-			       sizeof (linkval));
-  if (! INTERNAL_SYSCALL_ERROR_P (len) && len > 0 && linkval[0] != '[')
+  len = internal_syscall (__NR_readlink, "/proc/self/exe", linkval,
+			  sizeof (linkval));
+  if (! __syscall_err (len) && len > 0 && linkval[0] != '[')
     {
       /* We can use this value.  */
       assert (linkval[0] == '/');
diff --git a/sysdeps/unix/sysv/linux/dl-writev.h b/sysdeps/unix/sysv/linux/dl-writev.h
index 3dd8376385..a1b115dd6a 100644
--- a/sysdeps/unix/sysv/linux/dl-writev.h
+++ b/sysdeps/unix/sysv/linux/dl-writev.h
@@ -33,5 +33,5 @@
 static inline void
 _dl_writev (int fd, const struct iovec *iov, size_t niov)
 {
-  INTERNAL_SYSCALL_CALL (writev, fd, iov, niov);
+  internal_syscall (__NR_writev, fd, iov, niov);
 }
diff --git a/sysdeps/unix/sysv/linux/epoll_pwait.c b/sysdeps/unix/sysv/linux/epoll_pwait.c
index 66f04482c7..0a5d7b4e2f 100644
--- a/sysdeps/unix/sysv/linux/epoll_pwait.c
+++ b/sysdeps/unix/sysv/linux/epoll_pwait.c
@@ -37,7 +37,7 @@ int epoll_pwait (int epfd, struct epoll_event *events,
 		 int maxevents, int timeout,
 		 const sigset_t *set)
 {
-  return SYSCALL_CANCEL (epoll_pwait, epfd, events, maxevents,
-			 timeout, set, _NSIG / 8);
+  return inline_syscall_cancel (__NR_epoll_pwait, epfd, events, maxevents,
+				timeout, set, _NSIG / 8);
 }
 libc_hidden_def (epoll_pwait)
diff --git a/sysdeps/unix/sysv/linux/epoll_wait.c b/sysdeps/unix/sysv/linux/epoll_wait.c
index 4e343b9344..d263d6b424 100644
--- a/sysdeps/unix/sysv/linux/epoll_wait.c
+++ b/sysdeps/unix/sysv/linux/epoll_wait.c
@@ -27,7 +27,8 @@ int
 epoll_wait (int epfd, struct epoll_event *events, int maxevents, int timeout)
 {
 #ifdef __NR_epoll_wait
-  return SYSCALL_CANCEL (epoll_wait, epfd, events, maxevents, timeout);
+  return inline_syscall_cancel (__NR_epoll_wait, epfd, events, maxevents,
+				timeout);
 #else
   return epoll_pwait (epfd, events, maxevents, timeout, NULL);
 #endif
diff --git a/sysdeps/unix/sysv/linux/exit-thread.h b/sysdeps/unix/sysv/linux/exit-thread.h
index d617594bfd..e552f1c642 100644
--- a/sysdeps/unix/sysv/linux/exit-thread.h
+++ b/sysdeps/unix/sysv/linux/exit-thread.h
@@ -32,6 +32,6 @@ __exit_thread (void)
      of the caller and doing unexpectedly strange things.  */
   while (1)
     {
-      INTERNAL_SYSCALL_CALL (exit, 0);
+      internal_syscall (__NR_exit, 0);
     }
 }
diff --git a/sysdeps/unix/sysv/linux/faccessat.c b/sysdeps/unix/sysv/linux/faccessat.c
index 61c25cce46..0a314ffff6 100644
--- a/sysdeps/unix/sysv/linux/faccessat.c
+++ b/sysdeps/unix/sysv/linux/faccessat.c
@@ -27,10 +27,10 @@ int
 faccessat (int fd, const char *file, int mode, int flag)
 {
   if (flag & ~(AT_SYMLINK_NOFOLLOW | AT_EACCESS))
-    return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
+    return __syscall_ret_err (EINVAL);
 
   if ((flag == 0 || ((flag & ~AT_EACCESS) == 0 && ! __libc_enable_secure)))
-    return INLINE_SYSCALL (faccessat, 3, fd, file, mode);
+    return inline_syscall (__NR_faccessat, fd, file, mode);
 
   struct stat64 stats;
   if (__fxstatat64 (_STAT_VER, fd, file, &stats, flag & AT_SYMLINK_NOFOLLOW))
@@ -63,5 +63,5 @@ faccessat (int fd, const char *file, int mode, int flag)
   if (granted == mode)
     return 0;
 
-  return INLINE_SYSCALL_ERROR_RETURN_VALUE (EACCES);
+  return __syscall_ret (-EACCES);
 }
diff --git a/sysdeps/unix/sysv/linux/fallocate.c b/sysdeps/unix/sysv/linux/fallocate.c
index e40d0c4a23..1fd11d7a5f 100644
--- a/sysdeps/unix/sysv/linux/fallocate.c
+++ b/sysdeps/unix/sysv/linux/fallocate.c
@@ -24,7 +24,7 @@
 int
 fallocate (int fd, int mode, __off_t offset, __off_t len)
 {
-  return SYSCALL_CANCEL (fallocate, fd, mode,
-			 SYSCALL_LL (offset), SYSCALL_LL (len));
+  return inline_syscall_cancel (__NR_fallocate, fd, mode,
+				SYSCALL_LL (offset), SYSCALL_LL (len));
 }
 #endif
diff --git a/sysdeps/unix/sysv/linux/fallocate64.c b/sysdeps/unix/sysv/linux/fallocate64.c
index b2d2fab797..0baac39ecf 100644
--- a/sysdeps/unix/sysv/linux/fallocate64.c
+++ b/sysdeps/unix/sysv/linux/fallocate64.c
@@ -24,8 +24,8 @@
 int
 fallocate64 (int fd, int mode, __off64_t offset, __off64_t len)
 {
-  return SYSCALL_CANCEL (fallocate, fd, mode,
-			 SYSCALL_LL64 (offset), SYSCALL_LL64 (len));
+  return inline_syscall_cancel (__NR_fallocate, fd, mode,
+				SYSCALL_LL64 (offset), SYSCALL_LL64 (len));
 }
 
 #ifdef __OFF_T_MATCHES_OFF64_T
diff --git a/sysdeps/unix/sysv/linux/fchmodat.c b/sysdeps/unix/sysv/linux/fchmodat.c
index 5531f1aa6f..0d3ba3d93e 100644
--- a/sysdeps/unix/sysv/linux/fchmodat.c
+++ b/sysdeps/unix/sysv/linux/fchmodat.c
@@ -29,9 +29,9 @@ int
 fchmodat (int fd, const char *file, mode_t mode, int flag)
 {
   if (flag == 0)
-    return INLINE_SYSCALL (fchmodat, 3, fd, file, mode);
+    return inline_syscall (__NR_fchmodat, fd, file, mode);
   else if (flag != AT_SYMLINK_NOFOLLOW)
-    return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
+    return __syscall_ret_err (EINVAL);
   else
     {
       /* The kernel system call does not have a mode argument.
diff --git a/sysdeps/unix/sysv/linux/fcntl.c b/sysdeps/unix/sysv/linux/fcntl.c
index 14ac328cf5..0c9d6790d1 100644
--- a/sysdeps/unix/sysv/linux/fcntl.c
+++ b/sysdeps/unix/sysv/linux/fcntl.c
@@ -43,7 +43,7 @@ __libc_fcntl (int fd, int cmd, ...)
     {
       case F_SETLKW:
       case F_SETLKW64:
-	return SYSCALL_CANCEL (fcntl64, fd, cmd, arg);
+	return inline_syscall_cancel (__NR_fcntl64, fd, cmd, arg);
       case F_OFD_SETLKW:
 	{
 	  struct flock *flk = (struct flock *) arg;
@@ -55,7 +55,7 @@ __libc_fcntl (int fd, int cmd, ...)
 	    .l_len = flk->l_len,
 	    .l_pid = flk->l_pid
 	  };
-	  return SYSCALL_CANCEL (fcntl64, fd, cmd, &flk64);
+	  return inline_syscall_cancel (__NR_fcntl64, fd, cmd, &flk64);
 	}
       case F_OFD_GETLK:
       case F_OFD_SETLK:
@@ -69,7 +69,7 @@ __libc_fcntl (int fd, int cmd, ...)
 	    .l_len = flk->l_len,
 	    .l_pid = flk->l_pid
 	  };
-	  int ret = INLINE_SYSCALL_CALL (fcntl64, fd, cmd, &flk64);
+	  int ret = inline_syscall (__NR_fcntl64, fd, cmd, &flk64);
 	  if (ret == -1)
 	    return -1;
 	  if ((off_t) flk64.l_start != flk64.l_start
diff --git a/sysdeps/unix/sysv/linux/fcntl64.c b/sysdeps/unix/sysv/linux/fcntl64.c
index 783f564cba..0141317ea9 100644
--- a/sysdeps/unix/sysv/linux/fcntl64.c
+++ b/sysdeps/unix/sysv/linux/fcntl64.c
@@ -46,7 +46,7 @@ __libc_fcntl64 (int fd, int cmd, ...)
   cmd = FCNTL_ADJUST_CMD (cmd);
 
   if (cmd == F_SETLKW || cmd == F_SETLKW64 || cmd == F_OFD_SETLKW)
-    return SYSCALL_CANCEL (fcntl64, fd, cmd, arg);
+    return inline_syscall_cancel (__NR_fcntl64, fd, cmd, arg);
 
   return __fcntl64_nocancel_adjusted (fd, cmd, arg);
 }
diff --git a/sysdeps/unix/sysv/linux/fcntl_nocancel.c b/sysdeps/unix/sysv/linux/fcntl_nocancel.c
index ed9211001f..8125185ee1 100644
--- a/sysdeps/unix/sysv/linux/fcntl_nocancel.c
+++ b/sysdeps/unix/sysv/linux/fcntl_nocancel.c
@@ -52,13 +52,11 @@ __fcntl64_nocancel_adjusted (int fd, int cmd, void *arg)
   if (cmd == F_GETOWN)
     {
       struct f_owner_ex fex;
-      int res = INTERNAL_SYSCALL_CALL (fcntl64, fd, F_GETOWN_EX, &fex);
-      if (!INTERNAL_SYSCALL_ERROR_P (res))
+      int res = internal_syscall (__NR_fcntl64, fd, F_GETOWN_EX, &fex);
+      if (res == 0)
 	return fex.type == F_OWNER_GID ? -fex.pid : fex.pid;
-
-      return INLINE_SYSCALL_ERROR_RETURN_VALUE
-        (INTERNAL_SYSCALL_ERRNO (res));
+      return __syscall_ret (res);
     }
 
-  return INLINE_SYSCALL_CALL (fcntl64, fd, cmd, (void *) arg);
+  return inline_syscall (__NR_fcntl64, fd, cmd, (void *) arg);
 }
diff --git a/sysdeps/unix/sysv/linux/fdatasync.c b/sysdeps/unix/sysv/linux/fdatasync.c
index 87175b47d1..6186a47be6 100644
--- a/sysdeps/unix/sysv/linux/fdatasync.c
+++ b/sysdeps/unix/sysv/linux/fdatasync.c
@@ -25,5 +25,5 @@
 int
 fdatasync (int fd)
 {
-  return SYSCALL_CANCEL (fdatasync, fd);
+  return inline_syscall_cancel (__NR_fdatasync, fd);
 }
diff --git a/sysdeps/unix/sysv/linux/fexecve.c b/sysdeps/unix/sysv/linux/fexecve.c
index 23c9799f5d..d7cf46e05c 100644
--- a/sysdeps/unix/sysv/linux/fexecve.c
+++ b/sysdeps/unix/sysv/linux/fexecve.c
@@ -40,7 +40,7 @@ fexecve (int fd, char *const argv[], char *const envp[])
 
 #ifdef __NR_execveat
   /* Avoid implicit array coercion in syscall macros.  */
-  INLINE_SYSCALL (execveat, 5, fd, "", &argv[0], &envp[0], AT_EMPTY_PATH);
+  inline_syscall (__NR_execveat, fd, "", &argv[0], &envp[0], AT_EMPTY_PATH);
 # ifndef __ASSUME_EXECVEAT
   if (errno != ENOSYS)
     return -1;
diff --git a/sysdeps/unix/sysv/linux/fstatfs64.c b/sysdeps/unix/sysv/linux/fstatfs64.c
index 9d22fa228f..93d9165765 100644
--- a/sysdeps/unix/sysv/linux/fstatfs64.c
+++ b/sysdeps/unix/sysv/linux/fstatfs64.c
@@ -47,7 +47,7 @@ __fstatfs64 (int fd, struct statfs64 *buf)
   if (! __no_statfs64)
 # endif
     {
-      int result = INLINE_SYSCALL (fstatfs64, 3, fd, sizeof (*buf), buf);
+      int result = inline_syscall (__NR_fstatfs64, fd, sizeof (*buf), buf);
 
 # if __ASSUME_STATFS64 == 0
       if (result == 0 || errno != ENOSYS)
diff --git a/sysdeps/unix/sysv/linux/fsync.c b/sysdeps/unix/sysv/linux/fsync.c
index afcca6e862..0e8501c8f0 100644
--- a/sysdeps/unix/sysv/linux/fsync.c
+++ b/sysdeps/unix/sysv/linux/fsync.c
@@ -24,5 +24,5 @@
 int
 fsync (int fd)
 {
-  return SYSCALL_CANCEL (fsync, fd);
+  return inline_syscall_cancel (__NR_fsync, fd);
 }
diff --git a/sysdeps/unix/sysv/linux/ftruncate.c b/sysdeps/unix/sysv/linux/ftruncate.c
index 250e6700e6..d6b531afd9 100644
--- a/sysdeps/unix/sysv/linux/ftruncate.c
+++ b/sysdeps/unix/sysv/linux/ftruncate.c
@@ -25,10 +25,10 @@ int
 __ftruncate (int fd, off_t length)
 {
 # ifndef __NR_ftruncate
-  return INLINE_SYSCALL_CALL (ftruncate64, fd,
+  return inline_syscall (__NR_ftruncate64, fd,
 			      __ALIGNMENT_ARG SYSCALL_LL (length));
 # else
-  return INLINE_SYSCALL_CALL (ftruncate, fd, length);
+  return inline_syscall (__NR_ftruncate, fd, length);
 # endif
 }
 weak_alias (__ftruncate, ftruncate)
diff --git a/sysdeps/unix/sysv/linux/ftruncate64.c b/sysdeps/unix/sysv/linux/ftruncate64.c
index 3d43a5a90f..cff138bad4 100644
--- a/sysdeps/unix/sysv/linux/ftruncate64.c
+++ b/sysdeps/unix/sysv/linux/ftruncate64.c
@@ -26,8 +26,8 @@
 int
 __ftruncate64 (int fd, off64_t length)
 {
-  return INLINE_SYSCALL_CALL (ftruncate64, fd,
-			      __ALIGNMENT_ARG SYSCALL_LL64 (length));
+  return inline_syscall (__NR_ftruncate64, fd,
+			 __ALIGNMENT_ARG SYSCALL_LL64 (length));
 }
 weak_alias (__ftruncate64, ftruncate64)
 
diff --git a/sysdeps/unix/sysv/linux/futimens.c b/sysdeps/unix/sysv/linux/futimens.c
index 2c698b4e85..7994b07994 100644
--- a/sysdeps/unix/sysv/linux/futimens.c
+++ b/sysdeps/unix/sysv/linux/futimens.c
@@ -32,7 +32,7 @@ int
 __futimens64 (int fd, const struct __timespec64 tsp64[2])
 {
   if (fd < 0)
-    return INLINE_SYSCALL_ERROR_RETURN_VALUE (EBADF);
+    return __syscall_ret_err (EBADF);
 
   return __utimensat64_helper (fd, NULL, &tsp64[0], 0);
 }
diff --git a/sysdeps/unix/sysv/linux/fxstat.c b/sysdeps/unix/sysv/linux/fxstat.c
index ce474dcd47..527f53d637 100644
--- a/sysdeps/unix/sysv/linux/fxstat.c
+++ b/sysdeps/unix/sysv/linux/fxstat.c
@@ -36,15 +36,15 @@ int
 __fxstat (int vers, int fd, struct stat *buf)
 {
   if (vers == _STAT_VER_KERNEL)
-    return INLINE_SYSCALL (fstat, 2, fd, buf);
+    return inline_syscall (__NR_fstat, fd, buf);
 
 #ifdef STAT_IS_KERNEL_STAT
-  return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
+  return __syscall_ret_err (EINVAL);
 #else
   struct kernel_stat kbuf;
   int result;
 
-  result = INLINE_SYSCALL (fstat, 2, fd, &kbuf);
+  result = inline_syscall (__NR_fstat, fd, &kbuf);
   if (result == 0)
     result = __xstat_conv (vers, &kbuf, buf);
 
diff --git a/sysdeps/unix/sysv/linux/fxstat64.c b/sysdeps/unix/sysv/linux/fxstat64.c
index 9133a0a29b..dc06328343 100644
--- a/sysdeps/unix/sysv/linux/fxstat64.c
+++ b/sysdeps/unix/sysv/linux/fxstat64.c
@@ -34,11 +34,11 @@ ___fxstat64 (int vers, int fd, struct stat64 *buf)
 {
   int result;
 #ifdef __NR_fstat64
-  result = INLINE_SYSCALL (fstat64, 2, fd, buf);
+  result = inline_syscall (__NR_fstat64, fd, buf);
 #else
   struct statx tmp;
-  result = INLINE_SYSCALL (statx, 5, fd, "", AT_EMPTY_PATH, STATX_BASIC_STATS,
-                           &tmp);
+  result = inline_syscall (__NR_statx, fd, "", AT_EMPTY_PATH,
+			   STATX_BASIC_STATS, &tmp);
   if (result == 0)
     __cp_stat64_statx (buf, &tmp);
 #endif
diff --git a/sysdeps/unix/sysv/linux/fxstatat.c b/sysdeps/unix/sysv/linux/fxstatat.c
index 3eb898e322..dab8bc233b 100644
--- a/sysdeps/unix/sysv/linux/fxstatat.c
+++ b/sysdeps/unix/sysv/linux/fxstatat.c
@@ -43,8 +43,8 @@ __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag)
   struct kernel_stat kst;
 #endif
 
-  result = INTERNAL_SYSCALL_CALL (newfstatat, fd, file, &kst, flag);
-  if (!__glibc_likely (INTERNAL_SYSCALL_ERROR_P (result)))
+  result = internal_syscall (__NR_newfstatat, fd, file, &kst, flag);
+  if (result == 0)
     {
 #ifdef STAT_IS_KERNEL_STAT
       return 0;
@@ -52,7 +52,7 @@ __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag)
       return __xstat_conv (vers, &kst, st);
 #endif
     }
-  return INLINE_SYSCALL_ERROR_RETURN_VALUE (INTERNAL_SYSCALL_ERRNO (result));
+  return __syscall_ret (result);
 }
 libc_hidden_def (__fxstatat)
 #if XSTAT_IS_XSTAT64
diff --git a/sysdeps/unix/sysv/linux/fxstatat64.c b/sysdeps/unix/sysv/linux/fxstatat64.c
index e24b456604..c086526ce5 100644
--- a/sysdeps/unix/sysv/linux/fxstatat64.c
+++ b/sysdeps/unix/sysv/linux/fxstatat64.c
@@ -34,22 +34,20 @@ int
 __fxstatat64 (int vers, int fd, const char *file, struct stat64 *st, int flag)
 {
   if (__glibc_unlikely (vers != _STAT_VER_LINUX))
-    return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
+    return __syscall_ret_err (EINVAL);
 
   int result;
 
 #ifdef __NR_fstatat64
-  result = INTERNAL_SYSCALL_CALL (fstatat64, fd, file, st, flag);
+  result = internal_syscall (__NR_fstatat64, fd, file, st, flag);
 #else
   struct statx tmp;
 
-  result = INTERNAL_SYSCALL_CALL (statx, fd, file, AT_NO_AUTOMOUNT | flag,
-				  STATX_BASIC_STATS, &tmp);
+  result = internal_syscall (__NR_statx, fd, file, AT_NO_AUTOMOUNT | flag,
+			     STATX_BASIC_STATS, &tmp);
   if (result == 0)
     __cp_stat64_statx (st, &tmp);
 #endif
-  if (!__glibc_likely (INTERNAL_SYSCALL_ERROR_P (result)))
-    return 0;
-  return INLINE_SYSCALL_ERROR_RETURN_VALUE (INTERNAL_SYSCALL_ERRNO (result));
+  return __syscall_ret (result);
 }
 libc_hidden_def (__fxstatat64)
diff --git a/sysdeps/unix/sysv/linux/gai_sigqueue.c b/sysdeps/unix/sysv/linux/gai_sigqueue.c
index e4d7260743..3d579660a4 100644
--- a/sysdeps/unix/sysv/linux/gai_sigqueue.c
+++ b/sysdeps/unix/sysv/linux/gai_sigqueue.c
@@ -42,5 +42,5 @@ __gai_sigqueue (int sig, const union sigval val, pid_t caller_pid)
   info.si_uid = __getuid ();
   info.si_value = val;
 
-  return INLINE_SYSCALL (rt_sigqueueinfo, 3, info.si_pid, sig, &info);
+  return inline_syscall (__NR_rt_sigqueueinfo, info.si_pid, sig, &info);
 }
diff --git a/sysdeps/unix/sysv/linux/generic/____longjmp_chk.c b/sysdeps/unix/sysv/linux/generic/____longjmp_chk.c
index 9be49ad91c..41b3c3bb5a 100644
--- a/sysdeps/unix/sysv/linux/generic/____longjmp_chk.c
+++ b/sysdeps/unix/sysv/linux/generic/____longjmp_chk.c
@@ -43,7 +43,7 @@ void ____longjmp_chk (__jmp_buf env, int val)
     __longjmp (env, val);
 
   /* If we can't get the current stack state, give up and do the longjmp. */
-  if (INTERNAL_SYSCALL_CALL (sigaltstack, NULL, &ss) != 0)
+  if (internal_syscall (__NR_sigaltstack, NULL, &ss) != 0)
     __longjmp (env, val);
 
   /* If we we are executing on the alternate stack and within the
diff --git a/sysdeps/unix/sysv/linux/generic/brk.c b/sysdeps/unix/sysv/linux/generic/brk.c
index 40a80ab970..20c1a60e37 100644
--- a/sysdeps/unix/sysv/linux/generic/brk.c
+++ b/sysdeps/unix/sysv/linux/generic/brk.c
@@ -31,7 +31,7 @@ weak_alias (__curbrk, ___brk_addr)
 int
 __brk (void *addr)
 {
-  __curbrk = (void *) INTERNAL_SYSCALL_CALL (brk, addr);
+  __curbrk = (void *) internal_syscall (__NR_brk, addr);
   if (__curbrk < addr)
     {
       __set_errno (ENOMEM);
diff --git a/sysdeps/unix/sysv/linux/generic/chmod.c b/sysdeps/unix/sysv/linux/generic/chmod.c
index 8a5be52144..fea017402f 100644
--- a/sysdeps/unix/sysv/linux/generic/chmod.c
+++ b/sysdeps/unix/sysv/linux/generic/chmod.c
@@ -24,7 +24,7 @@
 int
 __chmod (const char *file, mode_t mode)
 {
-  return INLINE_SYSCALL (fchmodat, 3, AT_FDCWD, file, mode);
+  return inline_syscall (__NR_fchmodat, AT_FDCWD, file, mode);
 }
 
 libc_hidden_def (__chmod)
diff --git a/sysdeps/unix/sysv/linux/generic/chown.c b/sysdeps/unix/sysv/linux/generic/chown.c
index 57a81834db..7d17ff3e86 100644
--- a/sysdeps/unix/sysv/linux/generic/chown.c
+++ b/sysdeps/unix/sysv/linux/generic/chown.c
@@ -24,7 +24,7 @@
 int
 __chown (const char *file, uid_t owner, gid_t group)
 {
-  return INLINE_SYSCALL (fchownat, 5, AT_FDCWD, file, owner, group, 0);
+  return inline_syscall (__NR_fchownat, AT_FDCWD, file, owner, group, 0);
 }
 libc_hidden_def (__chown)
 weak_alias (__chown, chown)
diff --git a/sysdeps/unix/sysv/linux/generic/dl-origin.c b/sysdeps/unix/sysv/linux/generic/dl-origin.c
index 1ab02bbf10..9f3e0c57ed 100644
--- a/sysdeps/unix/sysv/linux/generic/dl-origin.c
+++ b/sysdeps/unix/sysv/linux/generic/dl-origin.c
@@ -39,9 +39,9 @@ _dl_get_origin (void)
   char *result;
   int len;
 
-  len = INTERNAL_SYSCALL_CALL (readlinkat, AT_FDCWD, "/proc/self/exe",
-			       linkval, sizeof (linkval));
-  if (! INTERNAL_SYSCALL_ERROR_P (len) && len > 0 && linkval[0] != '[')
+  len = internal_syscall (__NR_readlinkat, AT_FDCWD, "/proc/self/exe",
+			  linkval, sizeof (linkval));
+  if (! __syscall_err (len) && len > 0 && linkval[0] != '[')
     {
       /* We can use this value.  */
       assert (linkval[0] == '/');
diff --git a/sysdeps/unix/sysv/linux/generic/dup2.c b/sysdeps/unix/sysv/linux/generic/dup2.c
index dfa348b375..9dd85318c2 100644
--- a/sysdeps/unix/sysv/linux/generic/dup2.c
+++ b/sysdeps/unix/sysv/linux/generic/dup2.c
@@ -30,7 +30,7 @@ __dup2 (int fd, int fd2)
   if (fd == fd2)
     return __libc_fcntl (fd, F_GETFL, 0) < 0 ? -1 : fd;
 
-  return INLINE_SYSCALL (dup3, 3, fd, fd2, 0);
+  return inline_syscall (__NR_dup3, fd, fd2, 0);
 }
 libc_hidden_def (__dup2)
 weak_alias (__dup2, dup2)
diff --git a/sysdeps/unix/sysv/linux/generic/epoll_create.c b/sysdeps/unix/sysv/linux/generic/epoll_create.c
index 1715c6d9bf..1db2dd6cb1 100644
--- a/sysdeps/unix/sysv/linux/generic/epoll_create.c
+++ b/sysdeps/unix/sysv/linux/generic/epoll_create.c
@@ -30,6 +30,6 @@ epoll_create (int size)
       return -1;
     }
 
-  return INLINE_SYSCALL (epoll_create1, 1, 0);
+  return inline_syscall (__NR_epoll_create1, 0);
 }
 libc_hidden_def (epoll_create)
diff --git a/sysdeps/unix/sysv/linux/generic/futimesat.c b/sysdeps/unix/sysv/linux/generic/futimesat.c
index 7be1fbc252..13079b54a6 100644
--- a/sysdeps/unix/sysv/linux/generic/futimesat.c
+++ b/sysdeps/unix/sysv/linux/generic/futimesat.c
@@ -47,6 +47,6 @@ futimesat (int fd, const char *file, const struct timeval tvp[2])
       TIMEVAL_TO_TIMESPEC (&tvp[1], &tsp[1]);
     }
 
-  result = INLINE_SYSCALL (utimensat, 4, fd, file, tvp ? tsp : NULL, 0);
+  result = inline_syscall (__NR_utimensat, fd, file, tvp ? tsp : NULL, 0);
   return result;
 }
diff --git a/sysdeps/unix/sysv/linux/generic/inotify_init.c b/sysdeps/unix/sysv/linux/generic/inotify_init.c
index 25a323f7e7..b665d147b0 100644
--- a/sysdeps/unix/sysv/linux/generic/inotify_init.c
+++ b/sysdeps/unix/sysv/linux/generic/inotify_init.c
@@ -24,6 +24,6 @@ libc_hidden_proto (inotify_init)
 int
 inotify_init (void)
 {
-  return INLINE_SYSCALL (inotify_init1, 1, 0);
+  return inline_syscall (__NR_inotify_init1, 0);
 }
 libc_hidden_def (inotify_init)
diff --git a/sysdeps/unix/sysv/linux/generic/lchown.c b/sysdeps/unix/sysv/linux/generic/lchown.c
index 379079e8ca..d988256be3 100644
--- a/sysdeps/unix/sysv/linux/generic/lchown.c
+++ b/sysdeps/unix/sysv/linux/generic/lchown.c
@@ -24,7 +24,7 @@
 int
 __lchown (const char *file, uid_t owner, gid_t group)
 {
-  return INLINE_SYSCALL (fchownat, 5, AT_FDCWD, file, owner, group,
+  return inline_syscall (__NR_fchownat, AT_FDCWD, file, owner, group,
                          AT_SYMLINK_NOFOLLOW);
 }
 weak_alias (__lchown, lchown)
diff --git a/sysdeps/unix/sysv/linux/generic/link.c b/sysdeps/unix/sysv/linux/generic/link.c
index 1baa6b5e6a..549d39ba84 100644
--- a/sysdeps/unix/sysv/linux/generic/link.c
+++ b/sysdeps/unix/sysv/linux/generic/link.c
@@ -24,7 +24,7 @@
 int
 __link (const char *from, const char *to)
 {
-  return INLINE_SYSCALL (linkat, 5, AT_FDCWD, from, AT_FDCWD, to, 0);
+  return inline_syscall (__NR_linkat, AT_FDCWD, from, AT_FDCWD, to, 0);
 }
 
 weak_alias (__link, link)
diff --git a/sysdeps/unix/sysv/linux/generic/lxstat.c b/sysdeps/unix/sysv/linux/generic/lxstat.c
index 1cf082961a..a43c50431a 100644
--- a/sysdeps/unix/sysv/linux/generic/lxstat.c
+++ b/sysdeps/unix/sysv/linux/generic/lxstat.c
@@ -33,7 +33,7 @@ int
 __lxstat (int vers, const char *name, struct stat *buf)
 {
   if (vers == _STAT_VER_KERNEL)
-    return INLINE_SYSCALL (newfstatat, 4, AT_FDCWD, name, buf,
+    return inline_syscall (__NR_newfstatat, AT_FDCWD, name, buf,
                            AT_SYMLINK_NOFOLLOW);
   errno = EINVAL;
   return -1;
diff --git a/sysdeps/unix/sysv/linux/generic/mkdir.c b/sysdeps/unix/sysv/linux/generic/mkdir.c
index ff2e41fe96..0c8941dc98 100644
--- a/sysdeps/unix/sysv/linux/generic/mkdir.c
+++ b/sysdeps/unix/sysv/linux/generic/mkdir.c
@@ -28,7 +28,7 @@
 int
 __mkdir (const char *path, mode_t mode)
 {
-  return INLINE_SYSCALL (mkdirat, 3, AT_FDCWD, path, mode);
+  return inline_syscall (__NR_mkdirat, AT_FDCWD, path, mode);
 }
 
 libc_hidden_def (__mkdir)
diff --git a/sysdeps/unix/sysv/linux/generic/pipe.c b/sysdeps/unix/sysv/linux/generic/pipe.c
index 52f3231cb8..6133f14959 100644
--- a/sysdeps/unix/sysv/linux/generic/pipe.c
+++ b/sysdeps/unix/sysv/linux/generic/pipe.c
@@ -26,7 +26,7 @@
 int
 __pipe (int __pipedes[2])
 {
-  return INLINE_SYSCALL (pipe2, 2, __pipedes, 0);
+  return inline_syscall (__NR_pipe2, __pipedes, 0);
 }
 libc_hidden_def (__pipe)
 weak_alias (__pipe, pipe)
diff --git a/sysdeps/unix/sysv/linux/generic/readlink.c b/sysdeps/unix/sysv/linux/generic/readlink.c
index 6f690a9750..8f5a9f4e5b 100644
--- a/sysdeps/unix/sysv/linux/generic/readlink.c
+++ b/sysdeps/unix/sysv/linux/generic/readlink.c
@@ -26,6 +26,6 @@
 ssize_t
 __readlink (const char *path, char *buf, size_t len)
 {
-  return INLINE_SYSCALL (readlinkat, 4, AT_FDCWD, path, buf, len);
+  return inline_syscall (__NR_readlinkat, AT_FDCWD, path, buf, len);
 }
 weak_alias (__readlink, readlink)
diff --git a/sysdeps/unix/sysv/linux/generic/rmdir.c b/sysdeps/unix/sysv/linux/generic/rmdir.c
index f9d721f3db..0dd019763e 100644
--- a/sysdeps/unix/sysv/linux/generic/rmdir.c
+++ b/sysdeps/unix/sysv/linux/generic/rmdir.c
@@ -24,6 +24,6 @@
 int
 __rmdir (const char *path)
 {
-  return INLINE_SYSCALL (unlinkat, 3, AT_FDCWD, path, AT_REMOVEDIR);
+  return inline_syscall (__NR_unlinkat, AT_FDCWD, path, AT_REMOVEDIR);
 }
 weak_alias (__rmdir, rmdir)
diff --git a/sysdeps/unix/sysv/linux/generic/symlink.c b/sysdeps/unix/sysv/linux/generic/symlink.c
index 2c358f54c9..e5e53dc875 100644
--- a/sysdeps/unix/sysv/linux/generic/symlink.c
+++ b/sysdeps/unix/sysv/linux/generic/symlink.c
@@ -24,6 +24,6 @@
 int
 __symlink (const char *from, const char *to)
 {
-  return INLINE_SYSCALL (symlinkat, 3, from, AT_FDCWD, to);
+  return inline_syscall (__NR_symlinkat, from, AT_FDCWD, to);
 }
 weak_alias (__symlink, symlink)
diff --git a/sysdeps/unix/sysv/linux/generic/unlink.c b/sysdeps/unix/sysv/linux/generic/unlink.c
index 8df55753a0..1caa395775 100644
--- a/sysdeps/unix/sysv/linux/generic/unlink.c
+++ b/sysdeps/unix/sysv/linux/generic/unlink.c
@@ -24,6 +24,6 @@
 int
 __unlink (const char *name)
 {
-  return INLINE_SYSCALL (unlinkat, 3, AT_FDCWD, name, 0);
+  return inline_syscall (__NR_unlinkat, AT_FDCWD, name, 0);
 }
 weak_alias (__unlink, unlink)
diff --git a/sysdeps/unix/sysv/linux/generic/utimes.c b/sysdeps/unix/sysv/linux/generic/utimes.c
index 0a8100e1b8..776f3d4455 100644
--- a/sysdeps/unix/sysv/linux/generic/utimes.c
+++ b/sysdeps/unix/sysv/linux/generic/utimes.c
@@ -40,7 +40,7 @@ __utimes (const char *file, const struct timeval tvp[2])
       tsp = &ts[0];
     }
 
-  return INLINE_SYSCALL (utimensat, 4, AT_FDCWD, file, tsp, 0);
+  return inline_syscall (__NR_utimensat, AT_FDCWD, file, tsp, 0);
 }
 
 weak_alias (__utimes, utimes)
diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/fstatfs.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/fstatfs.c
index f80b56b303..2737176460 100644
--- a/sysdeps/unix/sysv/linux/generic/wordsize-32/fstatfs.c
+++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/fstatfs.c
@@ -28,7 +28,7 @@
 int
 __fstatfs (int fd, struct statfs *buf)
 {
-  int rc = INLINE_SYSCALL (fstatfs64, 3, fd, sizeof (*buf), buf);
+  int rc = inline_syscall (__NR_fstatfs64, fd, sizeof (*buf), buf);
   return rc ?: statfs_overflow (buf);
 }
 weak_alias (__fstatfs, fstatfs)
diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/fxstat.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/fxstat.c
index 850450e1e8..23115cf78a 100644
--- a/sysdeps/unix/sysv/linux/generic/wordsize-32/fxstat.c
+++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/fxstat.c
@@ -37,10 +37,10 @@ __fxstat (int vers, int fd, struct stat *buf)
   if (vers == _STAT_VER_KERNEL)
     {
 # ifdef __NR_fstat64
-      int rc = INLINE_SYSCALL (fstat64, 2, fd, buf);
+      int rc = inline_syscall (__NR_fstat64, fd, buf);
 # else
       struct statx tmp;
-      int rc = INLINE_SYSCALL (statx, 5, fd, "", AT_EMPTY_PATH,
+      int rc = inline_syscall (__NR_statx, fd, "", AT_EMPTY_PATH,
                                STATX_BASIC_STATS, &tmp);
       if (rc == 0)
         __cp_stat64_statx ((struct stat64 *)buf, &tmp);
diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/fxstatat.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/fxstatat.c
index 8df65ebea0..e7103c9b07 100644
--- a/sysdeps/unix/sysv/linux/generic/wordsize-32/fxstatat.c
+++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/fxstatat.c
@@ -37,10 +37,10 @@ __fxstatat (int vers, int fd, const char *file, struct stat *buf, int flag)
   if (vers == _STAT_VER_KERNEL)
     {
 # ifdef __NR_fstatat64
-      int rc = INLINE_SYSCALL (fstatat64, 4, fd, file, buf, flag);
+      int rc = inline_syscall (__NR_fstatat64, fd, file, buf, flag);
 # else
       struct statx tmp;
-      int rc = INLINE_SYSCALL (statx, 5, fd, file,
+      int rc = inline_syscall (__NR_statx, fd, file,
                                AT_NO_AUTOMOUNT | flag,
                                STATX_BASIC_STATS, &tmp);
       if (rc == 0)
diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat.c
index bd02631d68..a6bbacca3b 100644
--- a/sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat.c
+++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat.c
@@ -36,11 +36,11 @@ __lxstat (int vers, const char *name, struct stat *buf)
   if (vers == _STAT_VER_KERNEL)
     {
 #ifdef __NR_fstatat64
-      int rc = INLINE_SYSCALL (fstatat64, 4, AT_FDCWD, name, buf,
+      int rc = inline_syscall (__NR_fstatat64, AT_FDCWD, name, buf,
                                AT_SYMLINK_NOFOLLOW);
 #else
       struct statx tmp;
-      int rc = INLINE_SYSCALL (statx, 5, AT_FDCWD, name,
+      int rc = inline_syscall (__NR_statx, AT_FDCWD, name,
                                AT_NO_AUTOMOUNT | AT_SYMLINK_NOFOLLOW,
                                STATX_BASIC_STATS, &tmp);
       if (rc == 0)
diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat64.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat64.c
index 3eab0a1847..88871ce4e9 100644
--- a/sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat64.c
+++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/lxstat64.c
@@ -41,11 +41,11 @@ __lxstat64 (int vers, const char *name, struct stat64 *buf)
   if (vers == _STAT_VER_KERNEL)
     {
 #ifdef __NR_fstatat64
-      return INLINE_SYSCALL (fstatat64, 4, AT_FDCWD, name, buf,
+      return inline_syscall (__NR_fstatat64, AT_FDCWD, name, buf,
                              AT_SYMLINK_NOFOLLOW);
 #else
       struct statx tmp;
-      int rc = INLINE_SYSCALL (statx, 5, AT_FDCWD, name,
+      int rc = inline_syscall (__NR_statx, AT_FDCWD, name,
                                AT_NO_AUTOMOUNT | AT_SYMLINK_NOFOLLOW,
                                STATX_BASIC_STATS, &tmp);
       if (rc == 0)
diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/sendfile.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/sendfile.c
index 72e2d49d1a..6193b82647 100644
--- a/sysdeps/unix/sysv/linux/generic/wordsize-32/sendfile.c
+++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/sendfile.c
@@ -39,7 +39,7 @@ sendfile (int out_fd, int in_fd, off_t *offset, size_t count)
       off64 = *offset;
     }
 
-  rc = INLINE_SYSCALL (sendfile64, 4, out_fd, in_fd,
+  rc = inline_syscall (__NR_sendfile64, out_fd, in_fd,
                        offset ? &off64 : NULL, count);
   if (offset)
     *offset = off64;
diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/statfs.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/statfs.c
index 4484341075..456afd609b 100644
--- a/sysdeps/unix/sysv/linux/generic/wordsize-32/statfs.c
+++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/statfs.c
@@ -28,7 +28,7 @@
 int
 __statfs (const char *file, struct statfs *buf)
 {
-  int rc = INLINE_SYSCALL (statfs64, 3, file, sizeof (*buf), buf);
+  int rc = inline_syscall (__NR_statfs64, file, sizeof (*buf), buf);
   return rc ?: statfs_overflow (buf);
 }
 libc_hidden_def (__statfs)
diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/xstat.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/xstat.c
index a4a921c1ea..424e860714 100644
--- a/sysdeps/unix/sysv/linux/generic/wordsize-32/xstat.c
+++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/xstat.c
@@ -36,10 +36,10 @@ __xstat (int vers, const char *name, struct stat *buf)
   if (vers == _STAT_VER_KERNEL)
     {
 # ifdef __NR_fstatat64
-      int rc = INLINE_SYSCALL (fstatat64, 4, AT_FDCWD, name, buf, 0);
+      int rc = inline_syscall (__NR_fstatat64, AT_FDCWD, name, buf, 0);
 # else
       struct statx tmp;
-      int rc = INLINE_SYSCALL (statx, 5, AT_FDCWD, name, AT_NO_AUTOMOUNT,
+      int rc = inline_syscall (__NR_statx, AT_FDCWD, name, AT_NO_AUTOMOUNT,
                                STATX_BASIC_STATS, &tmp);
       if (rc == 0)
         __cp_stat64_statx ((struct stat64 *)buf, &tmp);
diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/xstat64.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/xstat64.c
index 0848b5a4b4..c4850dfc42 100644
--- a/sysdeps/unix/sysv/linux/generic/wordsize-32/xstat64.c
+++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/xstat64.c
@@ -41,10 +41,10 @@ __xstat64 (int vers, const char *name, struct stat64 *buf)
   if (vers == _STAT_VER_KERNEL)
     {
 #ifdef __NR_fstatat64
-      return INLINE_SYSCALL (fstatat64, 4, AT_FDCWD, name, buf, 0);
+      return inline_syscall (__NR_fstatat64, AT_FDCWD, name, buf, 0);
 #else
       struct statx tmp;
-      int rc = INLINE_SYSCALL (statx, 5, AT_FDCWD, name, AT_NO_AUTOMOUNT,
+      int rc = inline_syscall (__NR_statx, AT_FDCWD, name, AT_NO_AUTOMOUNT,
                                STATX_BASIC_STATS, &tmp);
       if (rc == 0)
         __cp_stat64_statx (buf, &tmp);
diff --git a/sysdeps/unix/sysv/linux/generic/xmknod.c b/sysdeps/unix/sysv/linux/generic/xmknod.c
index a51fcbee22..e472dba438 100644
--- a/sysdeps/unix/sysv/linux/generic/xmknod.c
+++ b/sysdeps/unix/sysv/linux/generic/xmknod.c
@@ -47,7 +47,7 @@ __xmknod (int vers, const char *path, mode_t mode, dev_t *dev)
       return -1;
     }
 
-  return INLINE_SYSCALL (mknodat, 4, AT_FDCWD, path, mode,
+  return inline_syscall (__NR_mknodat, AT_FDCWD, path, mode,
                          (unsigned int) k_dev);
 }
 weak_alias (__xmknod, _xmknod)
diff --git a/sysdeps/unix/sysv/linux/generic/xstat.c b/sysdeps/unix/sysv/linux/generic/xstat.c
index 2eb27a6f91..f1d97a235e 100644
--- a/sysdeps/unix/sysv/linux/generic/xstat.c
+++ b/sysdeps/unix/sysv/linux/generic/xstat.c
@@ -33,7 +33,7 @@ int
 __xstat (int vers, const char *name, struct stat *buf)
 {
   if (vers == _STAT_VER_KERNEL)
-    return INLINE_SYSCALL (newfstatat, 4, AT_FDCWD, name, buf, 0);
+    return inline_syscall (__NR_newfstatat, AT_FDCWD, name, buf, 0);
 
   errno = EINVAL;
   return -1;
diff --git a/sysdeps/unix/sysv/linux/getcpu.c b/sysdeps/unix/sysv/linux/getcpu.c
index db381d33a8..ccfdbba831 100644
--- a/sysdeps/unix/sysv/linux/getcpu.c
+++ b/sysdeps/unix/sysv/linux/getcpu.c
@@ -26,7 +26,7 @@ __getcpu (unsigned int *cpu, unsigned int *node)
 #ifdef HAVE_GETCPU_VSYSCALL
   return INLINE_VSYSCALL (getcpu, 3, cpu, node, NULL);
 #else
-  return INLINE_SYSCALL_CALL (getcpu, cpu, node, NULL);
+  return inline_syscall (__NR_getcpu, cpu, node, NULL);
 #endif
 }
 weak_alias (__getcpu, getcpu)
diff --git a/sysdeps/unix/sysv/linux/getcwd.c b/sysdeps/unix/sysv/linux/getcwd.c
index fabc4bb8cc..0d5a15caf1 100644
--- a/sysdeps/unix/sysv/linux/getcwd.c
+++ b/sysdeps/unix/sysv/linux/getcwd.c
@@ -75,7 +75,7 @@ __getcwd (char *buf, size_t size)
 
   int retval;
 
-  retval = INLINE_SYSCALL (getcwd, 2, path, alloc_size);
+  retval = inline_syscall (__NR_getcwd, path, alloc_size);
   if (retval > 0 && path[0] == '/')
     {
 #ifndef NO_ALLOCATION
diff --git a/sysdeps/unix/sysv/linux/getdents.c b/sysdeps/unix/sysv/linux/getdents.c
index a76be2e5e7..3b9d7a9470 100644
--- a/sysdeps/unix/sysv/linux/getdents.c
+++ b/sysdeps/unix/sysv/linux/getdents.c
@@ -53,7 +53,7 @@ __getdents (int fd, void *buf0, size_t nbytes)
   if (nbytes <= sizeof (struct dirent))
     kbuf = (void*) kbuftmp;
 
-  retval = INLINE_SYSCALL_CALL (getdents64, fd, kbuf, kbytes);
+  retval = inline_syscall (__NR_getdents64, fd, kbuf, kbytes);
   if (retval == -1)
     return -1;
 
@@ -98,7 +98,7 @@ __getdents (int fd, void *buf0, size_t nbytes)
               __lseek64 (fd, last_offset, SEEK_SET);
               return outp->b - buf;
             }
-	  return INLINE_SYSCALL_ERROR_RETURN_VALUE (EOVERFLOW);
+ 	  return __syscall_ret_err (EOVERFLOW);
         }
 
       last_offset = d_off;
diff --git a/sysdeps/unix/sysv/linux/getdents64.c b/sysdeps/unix/sysv/linux/getdents64.c
index 75892c2823..296ef5a727 100644
--- a/sysdeps/unix/sysv/linux/getdents64.c
+++ b/sysdeps/unix/sysv/linux/getdents64.c
@@ -29,7 +29,7 @@ __getdents64 (int fd, void *buf, size_t nbytes)
      checks in the kernel use an int type.  */
   if (nbytes > INT_MAX)
     nbytes = INT_MAX;
-  return INLINE_SYSCALL_CALL (getdents64, fd, buf, nbytes);
+  return inline_syscall (__NR_getdents64, fd, buf, nbytes);
 }
 libc_hidden_def (__getdents64)
 weak_alias (__getdents64, getdents64)
@@ -74,7 +74,7 @@ __old_getdents64 (int fd, char *buf, size_t nbytes)
 		  <= __alignof__ (struct dirent64),
 		  "alignment of __old_dirent64 is larger than dirent64");
 
-  ssize_t retval = INLINE_SYSCALL_CALL (getdents64, fd, buf, nbytes);
+  ssize_t retval = inline_syscall (__NR_getdents64, fd, buf, nbytes);
   if (retval > 0)
     {
       /* This is the marker for the first entry.  Offset 0 is reserved
diff --git a/sysdeps/unix/sysv/linux/getentropy.c b/sysdeps/unix/sysv/linux/getentropy.c
index 02cf46ff42..a54b945a1b 100644
--- a/sysdeps/unix/sysv/linux/getentropy.c
+++ b/sysdeps/unix/sysv/linux/getentropy.c
@@ -42,7 +42,7 @@ getentropy (void *buffer, size_t length)
   while (buffer < end)
     {
       /* NB: No cancellation point.  */
-      ssize_t bytes = INLINE_SYSCALL_CALL (getrandom, buffer, end - buffer, 0);
+      ssize_t bytes = inline_syscall (__NR_getrandom, buffer, end - buffer, 0);
       if (bytes < 0)
         {
           if (errno == EINTR)
diff --git a/sysdeps/unix/sysv/linux/getitimer.c b/sysdeps/unix/sysv/linux/getitimer.c
index cb894a5516..eb133d267c 100644
--- a/sysdeps/unix/sysv/linux/getitimer.c
+++ b/sysdeps/unix/sysv/linux/getitimer.c
@@ -26,11 +26,11 @@ int
 __getitimer64 (__itimer_which_t which, struct __itimerval64 *curr_value)
 {
 #if __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64
-  return INLINE_SYSCALL_CALL (getitimer, which, curr_value);
+  return inline_syscall (__NR_getitimer, which, curr_value);
 #else
   struct __itimerval32 curr_value_32;
 
-  if (INLINE_SYSCALL_CALL (getitimer, which, &curr_value_32) == -1)
+  if (inline_syscall (__NR_getitimer, which, &curr_value_32) == -1)
     return -1;
 
   curr_value->it_interval
diff --git a/sysdeps/unix/sysv/linux/getpeername.c b/sysdeps/unix/sysv/linux/getpeername.c
index addd32dc85..98a78156bc 100644
--- a/sysdeps/unix/sysv/linux/getpeername.c
+++ b/sysdeps/unix/sysv/linux/getpeername.c
@@ -27,9 +27,9 @@ int
 __getpeername (int fd, __SOCKADDR_ARG addr, socklen_t *len)
 {
 #ifdef __ASSUME_GETPEERNAME_SYSCALL
-  return INLINE_SYSCALL (getpeername, 3, fd, addr.__sockaddr__, len);
+  return inline_syscall (__NR_getpeername, fd, addr.__sockaddr__, len);
 #else
-  return SOCKETCALL (getpeername, fd, addr.__sockaddr__, len);
+  return socketcall (getpeername, fd, addr.__sockaddr__, len);
 #endif
 }
 weak_alias (__getpeername, getpeername)
diff --git a/sysdeps/unix/sysv/linux/getpriority.c b/sysdeps/unix/sysv/linux/getpriority.c
index 1e0e8b89b0..8838ff3bb2 100644
--- a/sysdeps/unix/sysv/linux/getpriority.c
+++ b/sysdeps/unix/sysv/linux/getpriority.c
@@ -36,7 +36,7 @@ __getpriority (enum __priority_which which, id_t who)
 {
   int res;
 
-  res = INLINE_SYSCALL (getpriority, 2, (int) which, who);
+  res = inline_syscall (__NR_getpriority, (int) which, who);
   if (res >= 0)
     res = PZERO - res;
   return res;
diff --git a/sysdeps/unix/sysv/linux/getrandom.c b/sysdeps/unix/sysv/linux/getrandom.c
index 63b8d36bf4..de1a4d5343 100644
--- a/sysdeps/unix/sysv/linux/getrandom.c
+++ b/sysdeps/unix/sysv/linux/getrandom.c
@@ -26,7 +26,7 @@
 ssize_t
 __getrandom (void *buffer, size_t length, unsigned int flags)
 {
-  return SYSCALL_CANCEL (getrandom, buffer, length, flags);
+  return inline_syscall_cancel (__NR_getrandom, buffer, length, flags);
 }
 libc_hidden_def (__getrandom)
 weak_alias (__getrandom, getrandom)
diff --git a/sysdeps/unix/sysv/linux/getrlimit.c b/sysdeps/unix/sysv/linux/getrlimit.c
index 7000e4d604..69c24bf347 100644
--- a/sysdeps/unix/sysv/linux/getrlimit.c
+++ b/sysdeps/unix/sysv/linux/getrlimit.c
@@ -35,7 +35,7 @@
 int
 __new_getrlimit (enum __rlimit_resource resource, struct rlimit *rlim)
 {
-  return INLINE_SYSCALL_CALL (ugetrlimit, resource, rlim);
+  return inline_syscall (__NR_ugetrlimit, resource, rlim);
 }
 weak_alias (__new_getrlimit, __getrlimit)
 hidden_weak (__getrlimit)
@@ -45,7 +45,7 @@ hidden_weak (__getrlimit)
 int
 __old_getrlimit (enum __rlimit_resource resource, struct rlimit *rlim)
 {
-  return INLINE_SYSCALL_CALL (getrlimit, resource, rlim);
+  return inline_syscall (__NR_getrlimit, resource, rlim);
 }
 compat_symbol (libc, __old_getrlimit, getrlimit, GLIBC_2_0);
 versioned_symbol (libc, __new_getrlimit, getrlimit, GLIBC_2_2);
diff --git a/sysdeps/unix/sysv/linux/getrlimit64.c b/sysdeps/unix/sysv/linux/getrlimit64.c
index e06ffd1a16..18f4617a6c 100644
--- a/sysdeps/unix/sysv/linux/getrlimit64.c
+++ b/sysdeps/unix/sysv/linux/getrlimit64.c
@@ -36,7 +36,7 @@
 int
 __getrlimit64 (enum __rlimit_resource resource, struct rlimit64 *rlimits)
 {
-  return INLINE_SYSCALL_CALL (prlimit64, 0, resource, NULL, rlimits);
+  return inline_syscall (__NR_prlimit64, 0, resource, NULL, rlimits);
 }
 libc_hidden_def (__getrlimit64)
 
diff --git a/sysdeps/unix/sysv/linux/getrusage.c b/sysdeps/unix/sysv/linux/getrusage.c
index a4e382ed53..43f3a77e3d 100644
--- a/sysdeps/unix/sysv/linux/getrusage.c
+++ b/sysdeps/unix/sysv/linux/getrusage.c
@@ -26,10 +26,10 @@ int
 __getrusage64 (enum __rusage_who who, struct __rusage64 *usage)
 {
 #if __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64
-  return INLINE_SYSCALL_CALL (getrusage, who, usage);
+  return inline_syscall (__NR_getrusage, who, usage);
 #else
   struct __rusage32 usage32;
-  if (INLINE_SYSCALL_CALL (getrusage, who, &usage32) == -1)
+  if (inline_syscall (__NR_getrusage, who, &usage32) == -1)
     return -1;
 
   rusage32_to_rusage64 (&usage32, usage);
diff --git a/sysdeps/unix/sysv/linux/getsockname.c b/sysdeps/unix/sysv/linux/getsockname.c
index e24a5515ab..23a001c917 100644
--- a/sysdeps/unix/sysv/linux/getsockname.c
+++ b/sysdeps/unix/sysv/linux/getsockname.c
@@ -27,9 +27,9 @@ int
 __getsockname (int fd, __SOCKADDR_ARG addr, socklen_t *len)
 {
 #ifdef __ASSUME_GETSOCKNAME_SYSCALL
-  return INLINE_SYSCALL (getsockname, 3, fd, addr.__sockaddr__, len);
+  return inline_syscall (__NR_getsockname, fd, addr.__sockaddr__, len);
 #else
-  return SOCKETCALL (getsockname, fd, addr.__sockaddr__, len);
+  return socketcall (getsockname, fd, addr.__sockaddr__, len);
 #endif
 }
 weak_alias (__getsockname, getsockname)
diff --git a/sysdeps/unix/sysv/linux/getsockopt.c b/sysdeps/unix/sysv/linux/getsockopt.c
index 11939660c1..9df3449de7 100644
--- a/sysdeps/unix/sysv/linux/getsockopt.c
+++ b/sysdeps/unix/sysv/linux/getsockopt.c
@@ -27,9 +27,9 @@ int
 __getsockopt (int fd, int level, int optname, void *optval, socklen_t *len)
 {
 #ifdef __ASSUME_GETSOCKOPT_SYSCALL
-  return INLINE_SYSCALL (getsockopt, 5, fd, level, optname, optval, len);
+  return inline_syscall (__NR_getsockopt, fd, level, optname, optval, len);
 #else
-  return SOCKETCALL (getsockopt, fd, level, optname, optval, len);
+  return socketcall (getsockopt, fd, level, optname, optval, len);
 #endif
 }
 weak_alias (__getsockopt, getsockopt)
diff --git a/sysdeps/unix/sysv/linux/gettimeofday.c b/sysdeps/unix/sysv/linux/gettimeofday.c
index ffae2c2d5a..8002144fb8 100644
--- a/sysdeps/unix/sysv/linux/gettimeofday.c
+++ b/sysdeps/unix/sysv/linux/gettimeofday.c
@@ -33,7 +33,7 @@ __gettimeofday_syscall (struct timeval *restrict tv, void *restrict tz)
 {
   if (__glibc_unlikely (tz != 0))
     memset (tz, 0, sizeof *tz);
-  return INLINE_SYSCALL_CALL (gettimeofday, tv, tz);
+  return inline_syscall (__NR_gettimeofday, tv, tz);
 }
 
 # undef INIT_ARCH
diff --git a/sysdeps/unix/sysv/linux/ifaddrs.c b/sysdeps/unix/sysv/linux/ifaddrs.c
index 8ab73a7422..3fc783f834 100644
--- a/sysdeps/unix/sysv/linux/ifaddrs.c
+++ b/sysdeps/unix/sysv/linux/ifaddrs.c
@@ -244,7 +244,7 @@ void
 __netlink_close (struct netlink_handle *h)
 {
   /* Don't modify errno.  */
-  INTERNAL_SYSCALL_CALL (close, h->fd);
+  internal_syscall (__NR_close, h->fd);
 }
 
 
diff --git a/sysdeps/unix/sysv/linux/internal-signals.h b/sysdeps/unix/sysv/linux/internal-signals.h
index 8d88f6417d..c8de9fe04f 100644
--- a/sysdeps/unix/sysv/linux/internal-signals.h
+++ b/sysdeps/unix/sysv/linux/internal-signals.h
@@ -68,7 +68,7 @@ static const sigset_t sigtimer_set = {
 static inline void
 __libc_signal_block_all (sigset_t *set)
 {
-  INTERNAL_SYSCALL_CALL (rt_sigprocmask, SIG_BLOCK, &sigall_set, set,
+  internal_syscall (__NR_rt_sigprocmask, SIG_BLOCK, &sigall_set, set,
 			 _NSIG / 8);
 }
 
@@ -78,32 +78,32 @@ __libc_signal_block_app (sigset_t *set)
 {
   sigset_t allset = sigall_set;
   __clear_internal_signals (&allset);
-  INTERNAL_SYSCALL_CALL (rt_sigprocmask, SIG_BLOCK, &allset, set,
-			 _NSIG / 8);
+  internal_syscall (__NR_rt_sigprocmask, SIG_BLOCK, &allset, set,
+		    _NSIG / 8);
 }
 
 /* Block only SIGTIMER and return the previous set on SET.  */
 static inline void
 __libc_signal_block_sigtimer (sigset_t *set)
 {
-  INTERNAL_SYSCALL_CALL (rt_sigprocmask, SIG_BLOCK, &sigtimer_set, set,
-			 _NSIG / 8);
+  internal_syscall (__NR_rt_sigprocmask, SIG_BLOCK, &sigtimer_set, set,
+		    _NSIG / 8);
 }
 
 /* Unblock only SIGTIMER and return the previous set on SET.  */
 static inline void
 __libc_signal_unblock_sigtimer (sigset_t *set)
 {
-  INTERNAL_SYSCALL_CALL (rt_sigprocmask, SIG_UNBLOCK, &sigtimer_set, set,
-			 _NSIG / 8);
+  internal_syscall (__NR_rt_sigprocmask, SIG_UNBLOCK, &sigtimer_set, set,
+		    _NSIG / 8);
 }
 
 /* Restore current process signal mask.  */
 static inline void
 __libc_signal_restore_set (const sigset_t *set)
 {
-  INTERNAL_SYSCALL_CALL (rt_sigprocmask, SIG_SETMASK, set, NULL,
-			 _NSIG / 8);
+  internal_syscall (__NR_rt_sigprocmask, SIG_SETMASK, set, NULL,
+		    _NSIG / 8);
 }
 
 /* Used to communicate with signal handler.  */
diff --git a/sysdeps/unix/sysv/linux/libc_fatal.c b/sysdeps/unix/sysv/linux/libc_fatal.c
index 6f568eed51..b1c963fc42 100644
--- a/sysdeps/unix/sysv/linux/libc_fatal.c
+++ b/sysdeps/unix/sysv/linux/libc_fatal.c
@@ -26,9 +26,8 @@ writev_for_fatal (int fd, const struct iovec *iov, size_t niov, size_t total)
 {
   ssize_t cnt;
   do
-    cnt = INTERNAL_SYSCALL_CALL (writev, fd, iov, niov);
-  while (INTERNAL_SYSCALL_ERROR_P (cnt)
-         && INTERNAL_SYSCALL_ERRNO (cnt) == EINTR);
+    cnt = internal_syscall (__NR_writev, fd, iov, niov);
+  while (__syscall_err (cnt) && cnt == -EINTR);
   return cnt == total;
 }
 #define WRITEV_FOR_FATAL	writev_for_fatal
diff --git a/sysdeps/unix/sysv/linux/listen.c b/sysdeps/unix/sysv/linux/listen.c
index 124c2fed74..b04e6a2664 100644
--- a/sysdeps/unix/sysv/linux/listen.c
+++ b/sysdeps/unix/sysv/linux/listen.c
@@ -27,9 +27,9 @@ int
 listen (int fd, int backlog)
 {
 #ifdef __ASSUME_LISTEN_SYSCALL
-  return INLINE_SYSCALL (listen, 2, fd, backlog);
+  return inline_syscall (__NR_listen, fd, backlog);
 #else
-  return SOCKETCALL (listen, fd, backlog);
+  return socketcall (listen, fd, backlog);
 #endif
 }
 weak_alias (listen, __listen);
diff --git a/sysdeps/unix/sysv/linux/lseek.c b/sysdeps/unix/sysv/linux/lseek.c
index 3b3e0c4a8b..b5750ee2eb 100644
--- a/sysdeps/unix/sysv/linux/lseek.c
+++ b/sysdeps/unix/sysv/linux/lseek.c
@@ -43,12 +43,12 @@ __lseek (int fd, off_t offset, int whence)
 {
 # ifdef __NR__llseek
   loff_t res;
-  int rc = INLINE_SYSCALL_CALL (_llseek, fd,
-				(long) (((uint64_t) (offset)) >> 32),
-				(long) offset, &res, whence);
+  int rc = inline_syscall (__NR__llseek, fd,
+			   (long) (((uint64_t) (offset)) >> 32),
+			   (long) offset, &res, whence);
   return rc ?: lseek_overflow (res);
 # else
-  return INLINE_SYSCALL_CALL (lseek, fd, offset, whence);
+  return inline_syscall (__NR_lseek, fd, offset, whence);
 # endif
 }
 libc_hidden_def (__lseek)
diff --git a/sysdeps/unix/sysv/linux/lseek64.c b/sysdeps/unix/sysv/linux/lseek64.c
index d1aee524e2..660df24ca8 100644
--- a/sysdeps/unix/sysv/linux/lseek64.c
+++ b/sysdeps/unix/sysv/linux/lseek64.c
@@ -28,12 +28,12 @@ __lseek64 (int fd, off64_t offset, int whence)
 {
 #ifdef __NR__llseek
   loff_t res;
-  int rc = INLINE_SYSCALL_CALL (_llseek, fd,
+  int rc = inline_syscall (__NR__llseek, fd,
 				(long) (((uint64_t) (offset)) >> 32),
 				(long) offset, &res, whence);
   return rc ?: res;
 #else
-  return INLINE_SYSCALL_CALL (lseek, fd, offset, whence);
+  return inline_syscall (__NR_lseek, fd, offset, whence);
 #endif
 }
 
diff --git a/sysdeps/unix/sysv/linux/lxstat.c b/sysdeps/unix/sysv/linux/lxstat.c
index e0cfc4f1fa..5382173f95 100644
--- a/sysdeps/unix/sysv/linux/lxstat.c
+++ b/sysdeps/unix/sysv/linux/lxstat.c
@@ -35,15 +35,15 @@ int
 __lxstat (int vers, const char *name, struct stat *buf)
 {
   if (vers == _STAT_VER_KERNEL)
-    return INLINE_SYSCALL (lstat, 2, name, buf);
+    return inline_syscall (__NR_lstat, name, buf);
 
 #ifdef STAT_IS_KERNEL_STAT
-  return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
+  return __syscall_ret_err (EINVAL);
 #else
   struct kernel_stat kbuf;
   int result;
 
-  result = INLINE_SYSCALL (lstat, 2, name, &kbuf);
+  result = inline_syscall (__NR_lstat, name, &kbuf);
   if (result == 0)
     result = __xstat_conv (vers, &kbuf, buf);
 
diff --git a/sysdeps/unix/sysv/linux/lxstat64.c b/sysdeps/unix/sysv/linux/lxstat64.c
index 0ea8399d68..597e942c12 100644
--- a/sysdeps/unix/sysv/linux/lxstat64.c
+++ b/sysdeps/unix/sysv/linux/lxstat64.c
@@ -29,7 +29,7 @@ int
 ___lxstat64 (int vers, const char *name, struct stat64 *buf)
 {
   int result;
-  result = INLINE_SYSCALL (lstat64, 2, name, buf);
+  result = inline_syscall (__NR_lstat64, name, buf);
   return result;
 }
 
diff --git a/sysdeps/unix/sysv/linux/mips/brk.c b/sysdeps/unix/sysv/linux/mips/brk.c
index 0335837948..9e60640276 100644
--- a/sysdeps/unix/sysv/linux/mips/brk.c
+++ b/sysdeps/unix/sysv/linux/mips/brk.c
@@ -32,7 +32,7 @@ __brk (void *addr)
 {
   void *newbrk;
 
-  newbrk = (void *) INTERNAL_SYSCALL_CALL (brk, addr);
+  newbrk = (void *) internal_syscall (__NR_brk, addr);
   __curbrk = newbrk;
 
   if (newbrk < addr)
diff --git a/sysdeps/unix/sysv/linux/mlock2.c b/sysdeps/unix/sysv/linux/mlock2.c
index e52f43f35c..fd58832c3a 100644
--- a/sysdeps/unix/sysv/linux/mlock2.c
+++ b/sysdeps/unix/sysv/linux/mlock2.c
@@ -23,11 +23,11 @@ int
 mlock2 (const void *addr, size_t length, unsigned int flags)
 {
 #ifdef __ASSUME_MLOCK2
-  return INLINE_SYSCALL_CALL (mlock2, addr, length, flags);
+  return inline_syscall (__NR_mlock2, addr, length, flags);
 #else
   if (flags == 0)
-    return INLINE_SYSCALL_CALL (mlock, addr, length);
-  int ret = INLINE_SYSCALL_CALL (mlock2, addr, length, flags);
+    return inline_syscall (__NR_mlock, addr, length);
+  int ret = inline_syscall (__NR_mlock2, addr, length, flags);
   if (ret == 0 || errno != ENOSYS)
     return ret;
   /* Treat the missing system call as an invalid (non-zero) flag
diff --git a/sysdeps/unix/sysv/linux/mmap.c b/sysdeps/unix/sysv/linux/mmap.c
index 22f276bb14..91a28caaa3 100644
--- a/sysdeps/unix/sysv/linux/mmap.c
+++ b/sysdeps/unix/sysv/linux/mmap.c
@@ -36,13 +36,13 @@ __mmap (void *addr, size_t len, int prot, int flags, int fd, off_t offset)
   MMAP_CHECK_PAGE_UNIT ();
 
   if (offset & MMAP_OFF_LOW_MASK)
-    return (void *) INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
+    return (void *) __syscall_ret_err (EINVAL);
 
 #ifdef __NR_mmap2
-  return (void *) MMAP_CALL (mmap2, addr, len, prot, flags, fd,
+  return (void *) MMAP_CALL (__NR_mmap2, addr, len, prot, flags, fd,
 			     offset / (uint32_t) MMAP2_PAGE_UNIT);
 #else
-  return (void *) MMAP_CALL (mmap, addr, len, prot, flags, fd,
+  return (void *) MMAP_CALL (__NR_mmap, addr, len, prot, flags, fd,
 			     MMAP_ADJUST_OFFSET (offset));
 #endif
 }
diff --git a/sysdeps/unix/sysv/linux/mmap64.c b/sysdeps/unix/sysv/linux/mmap64.c
index 8074deb466..26f544ec5b 100644
--- a/sysdeps/unix/sysv/linux/mmap64.c
+++ b/sysdeps/unix/sysv/linux/mmap64.c
@@ -49,14 +49,14 @@ __mmap64 (void *addr, size_t len, int prot, int flags, int fd, off64_t offset)
   MMAP_CHECK_PAGE_UNIT ();
 
   if (offset & MMAP_OFF_MASK)
-    return (void *) INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
+    return (void *) __syscall_ret_err (EINVAL);
 
   MMAP_PREPARE (addr, len, prot, flags, fd, offset);
 #ifdef __NR_mmap2
-  return (void *) MMAP_CALL (mmap2, addr, len, prot, flags, fd,
+  return (void *) MMAP_CALL (__NR_mmap2, addr, len, prot, flags, fd,
 			     (off_t) (offset / MMAP2_PAGE_UNIT));
 #else
-  return (void *) MMAP_CALL (mmap, addr, len, prot, flags, fd, offset);
+  return (void *) MMAP_CALL (__NR_mmap, addr, len, prot, flags, fd, offset);
 #endif
 }
 weak_alias (__mmap64, mmap64)
diff --git a/sysdeps/unix/sysv/linux/mmap_internal.h b/sysdeps/unix/sysv/linux/mmap_internal.h
index cec8fdd738..f888709153 100644
--- a/sysdeps/unix/sysv/linux/mmap_internal.h
+++ b/sysdeps/unix/sysv/linux/mmap_internal.h
@@ -45,7 +45,7 @@ static uint64_t page_unit;
 /* An architecture may override this.  */
 #ifndef MMAP_CALL
 # define MMAP_CALL(__nr, __addr, __len, __prot, __flags, __fd, __offset) \
-  INLINE_SYSCALL_CALL (__nr, __addr, __len, __prot, __flags, __fd, __offset)
+  inline_syscall (__nr, __addr, __len, __prot, __flags, __fd, __offset)
 #endif
 
 #endif /* MMAP_INTERNAL_LINUX_H  */
diff --git a/sysdeps/unix/sysv/linux/mq_close.c b/sysdeps/unix/sysv/linux/mq_close.c
index e1b4898170..af1105ee67 100644
--- a/sysdeps/unix/sysv/linux/mq_close.c
+++ b/sysdeps/unix/sysv/linux/mq_close.c
@@ -24,5 +24,5 @@
 int
 mq_close (mqd_t mqdes)
 {
-  return INLINE_SYSCALL (close, 1, mqdes);
+  return inline_syscall (__NR_close, mqdes);
 }
diff --git a/sysdeps/unix/sysv/linux/mq_notify.c b/sysdeps/unix/sysv/linux/mq_notify.c
index 61bbb03b64..3477bc1297 100644
--- a/sysdeps/unix/sysv/linux/mq_notify.c
+++ b/sysdeps/unix/sysv/linux/mq_notify.c
@@ -223,7 +223,7 @@ mq_notify (mqd_t mqdes, const struct sigevent *notification)
 
   /* Special treatment needed for SIGEV_THREAD.  */
   if (notification == NULL || notification->sigev_notify != SIGEV_THREAD)
-    return INLINE_SYSCALL (mq_notify, 2, mqdes, notification);
+    return inline_syscall (__NR_mq_notify, mqdes, notification);
 
   /* The kernel cannot directly start threads.  This will have to be
      done at userlevel.  Since we cannot start threads from signal
@@ -266,7 +266,7 @@ mq_notify (mqd_t mqdes, const struct sigevent *notification)
   se.sigev_value.sival_ptr = &data;
 
   /* Tell the kernel.  */
-  int retval = INLINE_SYSCALL (mq_notify, 2, mqdes, &se);
+  int retval = inline_syscall (__NR_mq_notify, mqdes, &se);
 
   /* If it failed, free the allocated memory.  */
   if (__glibc_unlikely (retval != 0))
diff --git a/sysdeps/unix/sysv/linux/mq_open.c b/sysdeps/unix/sysv/linux/mq_open.c
index c88dc580e4..f350dca4e8 100644
--- a/sysdeps/unix/sysv/linux/mq_open.c
+++ b/sysdeps/unix/sysv/linux/mq_open.c
@@ -33,7 +33,7 @@ mqd_t
 __mq_open (const char *name, int oflag, ...)
 {
   if (name[0] != '/')
-    return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
+    return __syscall_ret_err (EINVAL);
 
   mode_t mode = 0;
   struct mq_attr *attr = NULL;
@@ -47,7 +47,7 @@ __mq_open (const char *name, int oflag, ...)
       va_end (ap);
     }
 
-  return INLINE_SYSCALL (mq_open, 4, name + 1, oflag, mode, attr);
+  return inline_syscall (__NR_mq_open, name + 1, oflag, mode, attr);
 }
 strong_alias (__mq_open, mq_open);
 
diff --git a/sysdeps/unix/sysv/linux/mq_timedreceive.c b/sysdeps/unix/sysv/linux/mq_timedreceive.c
index 728a63d1ec..ed4967ad43 100644
--- a/sysdeps/unix/sysv/linux/mq_timedreceive.c
+++ b/sysdeps/unix/sysv/linux/mq_timedreceive.c
@@ -30,11 +30,11 @@ __mq_timedreceive_time64 (mqd_t mqdes, char *__restrict msg_ptr, size_t msg_len,
 # ifndef __NR_mq_timedreceive_time64
 #  define __NR_mq_timedreceive_time64 __NR_mq_timedreceive
 # endif
-  return SYSCALL_CANCEL (mq_timedreceive_time64, mqdes, msg_ptr, msg_len,
-                         msg_prio, abs_timeout);
+  return inline_syscall_cancel (__NR_mq_timedreceive_time64, mqdes, msg_ptr,
+				msg_len, msg_prio, abs_timeout);
 #else
-  int ret = SYSCALL_CANCEL (mq_timedreceive_time64, mqdes, msg_ptr, msg_len,
-                            msg_prio, abs_timeout);
+  int ret = inline_syscall_cancel (__NR_mq_timedreceive_time64, mqdes,
+				   msg_ptr, msg_len, msg_prio, abs_timeout);
   if (ret == 0 || errno != ENOSYS)
     return ret;
 
@@ -50,8 +50,8 @@ __mq_timedreceive_time64 (mqd_t mqdes, char *__restrict msg_ptr, size_t msg_len,
       ts32 = valid_timespec64_to_timespec (*abs_timeout);
     }
 
-  return SYSCALL_CANCEL (mq_timedreceive, mqdes, msg_ptr, msg_len, msg_prio,
-                         abs_timeout != NULL ? &ts32 : NULL);
+  return inline_syscall_cancel (__NR_mq_timedreceive, mqdes, msg_ptr, msg_len,
+				msg_prio, abs_timeout != NULL ? &ts32 : NULL);
 #endif
 }
 
diff --git a/sysdeps/unix/sysv/linux/mq_timedsend.c b/sysdeps/unix/sysv/linux/mq_timedsend.c
index f2a43df300..af82c89cf4 100644
--- a/sysdeps/unix/sysv/linux/mq_timedsend.c
+++ b/sysdeps/unix/sysv/linux/mq_timedsend.c
@@ -30,11 +30,11 @@ __mq_timedsend_time64 (mqd_t mqdes, const char *msg_ptr, size_t msg_len,
 # ifndef __NR_mq_timedsend_time64
 #  define __NR_mq_timedsend_time64 __NR_mq_timedsend
 # endif
-  return SYSCALL_CANCEL (mq_timedsend_time64, mqdes, msg_ptr, msg_len,
-                         msg_prio, abs_timeout);
+  return inline_syscall_cancel (__NR_mq_timedsend_time64, mqdes, msg_ptr,
+				msg_len, msg_prio, abs_timeout);
 #else
-  int ret = SYSCALL_CANCEL (mq_timedsend_time64, mqdes, msg_ptr, msg_len,
-                            msg_prio, abs_timeout);
+  int ret = inline_syscall_cancel (__NR_mq_timedsend_time64, mqdes, msg_ptr,
+				   msg_len, msg_prio, abs_timeout);
   if (ret == 0 || errno != ENOSYS)
     return ret;
 
@@ -50,8 +50,8 @@ __mq_timedsend_time64 (mqd_t mqdes, const char *msg_ptr, size_t msg_len,
       ts32 = valid_timespec64_to_timespec (*abs_timeout);
     }
 
-  return SYSCALL_CANCEL (mq_timedsend, mqdes, msg_ptr, msg_len, msg_prio,
-                         abs_timeout != NULL ? &ts32 : NULL);
+  return inline_syscall_cancel (__NR_mq_timedsend, mqdes, msg_ptr, msg_len,
+				msg_prio, abs_timeout != NULL ? &ts32 : NULL);
 #endif
 }
 
diff --git a/sysdeps/unix/sysv/linux/mq_unlink.c b/sysdeps/unix/sysv/linux/mq_unlink.c
index 85fb5d0951..cbfb82fe5b 100644
--- a/sysdeps/unix/sysv/linux/mq_unlink.c
+++ b/sysdeps/unix/sysv/linux/mq_unlink.c
@@ -24,18 +24,17 @@ int
 mq_unlink (const char *name)
 {
   if (name[0] != '/')
-    return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
+    return __syscall_ret (-EINVAL);
 
-  int ret = INTERNAL_SYSCALL_CALL (mq_unlink, name + 1);
+  int ret = internal_syscall (__NR_mq_unlink, name + 1);
 
   /* While unlink can return either EPERM or EACCES, mq_unlink should
      return just EACCES.  */
-  if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (ret)))
+  if (__syscall_err (ret))
     {
-      ret = INTERNAL_SYSCALL_ERRNO (ret);
-      if (ret == EPERM)
-	ret = EACCES;
-      return INLINE_SYSCALL_ERROR_RETURN_VALUE (ret);
+      if (ret == -EPERM)
+	ret = -EACCES;
+      return __syscall_ret (ret);
     }
 
   return ret;
diff --git a/sysdeps/unix/sysv/linux/msgctl.c b/sysdeps/unix/sysv/linux/msgctl.c
index fd46aec1a0..5166a36b4f 100644
--- a/sysdeps/unix/sysv/linux/msgctl.c
+++ b/sysdeps/unix/sysv/linux/msgctl.c
@@ -35,10 +35,10 @@ static int
 msgctl_syscall (int msqid, int cmd, struct msqid_ds *buf)
 {
 #ifdef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
-  return INLINE_SYSCALL_CALL (msgctl, msqid, cmd | __IPC_64, buf);
+  return inline_syscall (__NR_msgctl, msqid, cmd | __IPC_64, buf);
 #else
-  return INLINE_SYSCALL_CALL (ipc, IPCOP_msgctl, msqid, cmd | __IPC_64, 0,
-			      buf);
+  return inline_syscall (__NR_ipc, IPCOP_msgctl, msqid, cmd | __IPC_64, 0,
+			 buf);
 #endif
 }
 
@@ -122,9 +122,9 @@ __old_msgctl (int msqid, int cmd, struct __old_msqid_ds *buf)
   /* For architecture that have wire-up msgctl but also have __IPC_64 to a
      value different than default (0x0) it means the compat symbol used the
      __NR_ipc syscall.  */
-  return INLINE_SYSCALL_CALL (msgctl, msqid, cmd, buf);
+  return inline_syscall (__NR_msgctl, msqid, cmd, buf);
 #else
-  return INLINE_SYSCALL_CALL (ipc, IPCOP_msgctl, msqid, cmd, 0, buf);
+  return inline_syscall (__NR_ipc, IPCOP_msgctl, msqid, cmd, 0, buf);
 #endif
 }
 compat_symbol (libc, __old_msgctl, msgctl, GLIBC_2_0);
diff --git a/sysdeps/unix/sysv/linux/msgget.c b/sysdeps/unix/sysv/linux/msgget.c
index 6a629f18f3..aa7ba3000d 100644
--- a/sysdeps/unix/sysv/linux/msgget.c
+++ b/sysdeps/unix/sysv/linux/msgget.c
@@ -28,8 +28,8 @@ int
 msgget (key_t key, int msgflg)
 {
 #ifdef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
-  return INLINE_SYSCALL_CALL (msgget, key, msgflg);
+  return inline_syscall (__NR_msgget, key, msgflg);
 #else
-  return INLINE_SYSCALL_CALL (ipc, IPCOP_msgget, key, msgflg, 0, NULL);
+  return inline_syscall (__NR_ipc, IPCOP_msgget, key, msgflg, 0, NULL);
 #endif
 }
diff --git a/sysdeps/unix/sysv/linux/msgrcv.c b/sysdeps/unix/sysv/linux/msgrcv.c
index 95edc7a787..b047b2481f 100644
--- a/sysdeps/unix/sysv/linux/msgrcv.c
+++ b/sysdeps/unix/sysv/linux/msgrcv.c
@@ -25,10 +25,11 @@ __libc_msgrcv (int msqid, void *msgp, size_t msgsz, long int msgtyp,
 	       int msgflg)
 {
 #ifdef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
-  return SYSCALL_CANCEL (msgrcv, msqid, msgp, msgsz, msgtyp, msgflg);
+  return inline_syscall_cancel (__NR_msgrcv, msqid, msgp, msgsz, msgtyp,
+				msgflg);
 #else
-  return SYSCALL_CANCEL (ipc, IPCOP_msgrcv, msqid, msgsz, msgflg,
-			 MSGRCV_ARGS (msgp, msgtyp));
+  return inline_syscall_cancel (__NR_ipc, IPCOP_msgrcv, msqid, msgsz, msgflg,
+				MSGRCV_ARGS (msgp, msgtyp));
 #endif
 }
 weak_alias (__libc_msgrcv, msgrcv)
diff --git a/sysdeps/unix/sysv/linux/msgsnd.c b/sysdeps/unix/sysv/linux/msgsnd.c
index 554516f2ca..2bd1e28722 100644
--- a/sysdeps/unix/sysv/linux/msgsnd.c
+++ b/sysdeps/unix/sysv/linux/msgsnd.c
@@ -24,10 +24,10 @@ int
 __libc_msgsnd (int msqid, const void *msgp, size_t msgsz, int msgflg)
 {
 #ifdef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
-  return SYSCALL_CANCEL (msgsnd, msqid, msgp, msgsz, msgflg);
+  return inline_syscall_cancel (__NR_msgsnd, msqid, msgp, msgsz, msgflg);
 #else
-  return SYSCALL_CANCEL (ipc, IPCOP_msgsnd, msqid, msgsz, msgflg,
-			 msgp);
+  return inline_syscall_cancel (__NR_ipc, IPCOP_msgsnd, msqid, msgsz, msgflg,
+				msgp);
 #endif
 }
 weak_alias (__libc_msgsnd, msgsnd)
diff --git a/sysdeps/unix/sysv/linux/msync.c b/sysdeps/unix/sysv/linux/msync.c
index de1dd2ac5e..f743de4ac4 100644
--- a/sysdeps/unix/sysv/linux/msync.c
+++ b/sysdeps/unix/sysv/linux/msync.c
@@ -22,5 +22,5 @@
 int
 msync (void *addr, size_t length, int flags)
 {
-  return SYSCALL_CANCEL (msync, addr, length, flags);
+  return inline_syscall_cancel (__NR_msync, addr, length, flags);
 }
diff --git a/sysdeps/unix/sysv/linux/not-cancel.h b/sysdeps/unix/sysv/linux/not-cancel.h
index bf09a3d6b8..23fa3b63b3 100644
--- a/sysdeps/unix/sysv/linux/not-cancel.h
+++ b/sysdeps/unix/sysv/linux/not-cancel.h
@@ -65,7 +65,7 @@ __close_nocancel_nostatus (int fd)
 static inline void
 __writev_nocancel_nostatus (int fd, const struct iovec *iov, int iovcnt)
 {
-  INTERNAL_SYSCALL_CALL (writev, fd, iov, iovcnt);
+  internal_syscall (__NR_writev, fd, iov, iovcnt);
 }
 
 /* Uncancelable fcntl.  */
diff --git a/sysdeps/unix/sysv/linux/not-errno.h b/sysdeps/unix/sysv/linux/not-errno.h
index 394dabeb93..7666ce4a78 100644
--- a/sysdeps/unix/sysv/linux/not-errno.h
+++ b/sysdeps/unix/sysv/linux/not-errno.h
@@ -25,23 +25,15 @@
 static inline int
 __access_noerrno (const char *pathname, int mode)
 {
-  int res;
 #ifdef __NR_access
-  res = INTERNAL_SYSCALL_CALL (access, pathname, mode);
+  return -internal_syscall (__NR_access, pathname, mode);
 #else
-  res = INTERNAL_SYSCALL_CALL (faccessat, AT_FDCWD, pathname, mode);
+  return -internal_syscall (__NR_faccessat, AT_FDCWD, pathname, mode);
 #endif
-  if (INTERNAL_SYSCALL_ERROR_P (res))
-    return INTERNAL_SYSCALL_ERRNO (res);
-  return 0;
 }
 
 static inline int
 __kill_noerrno (pid_t pid, int sig)
 {
-  int res;
-  res = INTERNAL_SYSCALL_CALL (kill, pid, sig);
-  if (INTERNAL_SYSCALL_ERROR_P (res))
-    return INTERNAL_SYSCALL_ERRNO (res);
-  return 0;
+  return -internal_syscall (__NR_kill, pid, sig);
 }
diff --git a/sysdeps/unix/sysv/linux/nscd_setup_thread.c b/sysdeps/unix/sysv/linux/nscd_setup_thread.c
index 2ba64ebea5..22ee71887e 100644
--- a/sysdeps/unix/sysv/linux/nscd_setup_thread.c
+++ b/sysdeps/unix/sysv/linux/nscd_setup_thread.c
@@ -34,9 +34,9 @@ setup_thread (struct database_dyn *db)
   /* Do not try this at home, kids.  We play with the SETTID address
      even thought the process is multi-threaded.  This can only work
      since none of the threads ever terminates.  */
-  int r = INTERNAL_SYSCALL_CALL (set_tid_address,
-				 &db->head->nscd_certainly_running);
-  if (!INTERNAL_SYSCALL_ERROR_P (r))
+  int r = internal_syscall (__NR_set_tid_address,
+			    &db->head->nscd_certainly_running);
+  if (r == 0)
     /* We know the kernel can reset this field when nscd terminates.
        So, set the field to a nonzero value which indicates that nscd
        is certainly running and clients can skip the test.  */
diff --git a/sysdeps/unix/sysv/linux/open.c b/sysdeps/unix/sysv/linux/open.c
index 0c006fb22e..02ec1a03e6 100644
--- a/sysdeps/unix/sysv/linux/open.c
+++ b/sysdeps/unix/sysv/linux/open.c
@@ -41,7 +41,7 @@ __libc_open (const char *file, int oflag, ...)
       va_end (arg);
     }
 
-  return SYSCALL_CANCEL (openat, AT_FDCWD, file, oflag, mode);
+  return inline_syscall_cancel (__NR_openat, AT_FDCWD, file, oflag, mode);
 }
 libc_hidden_def (__libc_open)
 
diff --git a/sysdeps/unix/sysv/linux/open64.c b/sysdeps/unix/sysv/linux/open64.c
index f2d0c55810..55dcf42df7 100644
--- a/sysdeps/unix/sysv/linux/open64.c
+++ b/sysdeps/unix/sysv/linux/open64.c
@@ -45,8 +45,8 @@ __libc_open64 (const char *file, int oflag, ...)
       va_end (arg);
     }
 
-  return SYSCALL_CANCEL (openat, AT_FDCWD, file, oflag | EXTRA_OPEN_FLAGS,
-			 mode);
+  return inline_syscall_cancel (__NR_openat, AT_FDCWD, file,
+				oflag | EXTRA_OPEN_FLAGS, mode);
 }
 
 strong_alias (__libc_open64, __open64)
diff --git a/sysdeps/unix/sysv/linux/open64_nocancel.c b/sysdeps/unix/sysv/linux/open64_nocancel.c
index 6f4580a455..85cd200c1b 100644
--- a/sysdeps/unix/sysv/linux/open64_nocancel.c
+++ b/sysdeps/unix/sysv/linux/open64_nocancel.c
@@ -42,8 +42,8 @@ __open64_nocancel (const char *file, int oflag, ...)
       va_end (arg);
     }
 
-  return INLINE_SYSCALL_CALL (openat, AT_FDCWD, file, oflag | EXTRA_OPEN_FLAGS,
-			      mode);
+  return inline_syscall (__NR_openat, AT_FDCWD, file, oflag | EXTRA_OPEN_FLAGS,
+			 mode);
 }
 
 hidden_def (__open64_nocancel)
diff --git a/sysdeps/unix/sysv/linux/open_by_handle_at.c b/sysdeps/unix/sysv/linux/open_by_handle_at.c
index 6c9c53291a..a0f81196c7 100644
--- a/sysdeps/unix/sysv/linux/open_by_handle_at.c
+++ b/sysdeps/unix/sysv/linux/open_by_handle_at.c
@@ -24,5 +24,6 @@
 int
 open_by_handle_at (int mount_fd, struct file_handle *handle, int flags)
 {
-  return SYSCALL_CANCEL (open_by_handle_at, mount_fd, handle, flags);
+  return inline_syscall_cancel (__NR_open_by_handle_at, mount_fd, handle,
+				flags);
 }
diff --git a/sysdeps/unix/sysv/linux/open_nocancel.c b/sysdeps/unix/sysv/linux/open_nocancel.c
index cec8609916..670f7096e4 100644
--- a/sysdeps/unix/sysv/linux/open_nocancel.c
+++ b/sysdeps/unix/sysv/linux/open_nocancel.c
@@ -39,7 +39,7 @@ __open_nocancel (const char *file, int oflag, ...)
       va_end (arg);
     }
 
-  return INLINE_SYSCALL_CALL (openat, AT_FDCWD, file, oflag, mode);
+  return inline_syscall (__NR_openat, AT_FDCWD, file, oflag, mode);
 }
 hidden_def (__open_nocancel)
 
diff --git a/sysdeps/unix/sysv/linux/openat.c b/sysdeps/unix/sysv/linux/openat.c
index af72c0214c..d6413e7920 100644
--- a/sysdeps/unix/sysv/linux/openat.c
+++ b/sysdeps/unix/sysv/linux/openat.c
@@ -38,7 +38,7 @@ __libc_openat (int fd, const char *file, int oflag, ...)
       va_end (arg);
     }
 
-  return SYSCALL_CANCEL (openat, fd, file, oflag, mode);
+  return inline_syscall_cancel (__NR_openat, fd, file, oflag, mode);
 }
 weak_alias (__libc_openat, __openat)
 libc_hidden_weak (__openat)
diff --git a/sysdeps/unix/sysv/linux/openat64.c b/sysdeps/unix/sysv/linux/openat64.c
index 46da3ecc04..51d1356ce0 100644
--- a/sysdeps/unix/sysv/linux/openat64.c
+++ b/sysdeps/unix/sysv/linux/openat64.c
@@ -42,7 +42,8 @@ __libc_openat64 (int fd, const char *file, int oflag, ...)
       va_end (arg);
     }
 
-  return SYSCALL_CANCEL (openat, fd, file, oflag | EXTRA_OPEN_FLAGS, mode);
+  return inline_syscall_cancel (__NR_openat, fd, file,
+				oflag | EXTRA_OPEN_FLAGS, mode);
 }
 
 strong_alias (__libc_openat64, __openat64)
diff --git a/sysdeps/unix/sysv/linux/openat64_nocancel.c b/sysdeps/unix/sysv/linux/openat64_nocancel.c
index 80fe66210d..88a2e03322 100644
--- a/sysdeps/unix/sysv/linux/openat64_nocancel.c
+++ b/sysdeps/unix/sysv/linux/openat64_nocancel.c
@@ -40,8 +40,8 @@ __openat64_nocancel (int fd, const char *file, int oflag, ...)
       va_end (arg);
     }
 
-  return INLINE_SYSCALL_CALL (openat, fd, file, oflag | EXTRA_OPEN_FLAGS,
-			      mode);
+  return inline_syscall (__NR_openat, fd, file, oflag | EXTRA_OPEN_FLAGS,
+			 mode);
 }
 hidden_def (__openat64_nocancel)
 
diff --git a/sysdeps/unix/sysv/linux/openat_nocancel.c b/sysdeps/unix/sysv/linux/openat_nocancel.c
index caba9e0f88..e25bbdd09d 100644
--- a/sysdeps/unix/sysv/linux/openat_nocancel.c
+++ b/sysdeps/unix/sysv/linux/openat_nocancel.c
@@ -36,7 +36,7 @@ __openat_nocancel (int fd, const char *file, int oflag, ...)
       va_end (arg);
     }
 
-  return INLINE_SYSCALL_CALL (openat, fd, file, oflag, mode);
+  return inline_syscall (__NR_openat, fd, file, oflag, mode);
 }
 hidden_def (__openat_nocancel)
 
diff --git a/sysdeps/unix/sysv/linux/pause.c b/sysdeps/unix/sysv/linux/pause.c
index 02042ebb83..12fb0de1cb 100644
--- a/sysdeps/unix/sysv/linux/pause.c
+++ b/sysdeps/unix/sysv/linux/pause.c
@@ -26,9 +26,9 @@ int
 __libc_pause (void)
 {
 #ifdef __NR_pause
-  return SYSCALL_CANCEL (pause);
+  return inline_syscall_cancel (__NR_pause);
 #else
-  return SYSCALL_CANCEL (ppoll, NULL, 0, NULL, NULL);
+  return inline_syscall_cancel (__NR_ppoll, NULL, 0, NULL, NULL);
 #endif
 }
 weak_alias (__libc_pause, pause)
diff --git a/sysdeps/unix/sysv/linux/personality.c b/sysdeps/unix/sysv/linux/personality.c
index 148750657d..fea38c38cc 100644
--- a/sysdeps/unix/sysv/linux/personality.c
+++ b/sysdeps/unix/sysv/linux/personality.c
@@ -23,14 +23,14 @@ extern __typeof (personality) __personality;
 int
 __personality (unsigned long persona)
 {
-  long int ret = INTERNAL_SYSCALL_CALL (personality, persona);
+  long int ret = internal_syscall (__NR_personality, persona);
 
   /* Starting with kernel commit v2.6.29-6609-g11d06b2, the personality syscall
      never fails.  However, 32-bit kernels might flag valid values as errors, so
      we need to reverse the error setting.  We can't use the raw result as some
      arches split the return/error values.  */
-  if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (ret)))
-    ret = -INTERNAL_SYSCALL_ERRNO (ret);
+  if (__syscall_err (ret))
+    ret = -ret;
   return ret;
 }
 weak_alias (__personality, personality)
diff --git a/sysdeps/unix/sysv/linux/pkey_mprotect.c b/sysdeps/unix/sysv/linux/pkey_mprotect.c
index 4ec1feba2e..04fc8059bd 100644
--- a/sysdeps/unix/sysv/linux/pkey_mprotect.c
+++ b/sysdeps/unix/sysv/linux/pkey_mprotect.c
@@ -28,5 +28,5 @@ pkey_mprotect (void *addr, size_t len, int prot, int pkey)
     /* If the key is -1, the system call is precisely equivalent to
        mprotect.  */
     return __mprotect (addr, len, prot);
-  return INLINE_SYSCALL_CALL (pkey_mprotect, addr, len, prot, pkey);
+  return inline_syscall (__NR_pkey_mprotect, addr, len, prot, pkey);
 }
diff --git a/sysdeps/unix/sysv/linux/poll.c b/sysdeps/unix/sysv/linux/poll.c
index 1c41ade1b7..b2c359515b 100644
--- a/sysdeps/unix/sysv/linux/poll.c
+++ b/sysdeps/unix/sysv/linux/poll.c
@@ -26,7 +26,7 @@ int
 __poll (struct pollfd *fds, nfds_t nfds, int timeout)
 {
 #ifdef __NR_poll
-  return SYSCALL_CANCEL (poll, fds, nfds, timeout);
+  return inline_syscall_cancel (__NR_poll, fds, nfds, timeout);
 #else
   struct timespec timeout_ts;
   struct timespec *timeout_ts_p = NULL;
@@ -38,7 +38,7 @@ __poll (struct pollfd *fds, nfds_t nfds, int timeout)
       timeout_ts_p = &timeout_ts;
     }
 
-  return SYSCALL_CANCEL (ppoll, fds, nfds, timeout_ts_p, NULL, 0);
+  return inline_syscall_cancel (__NR_ppoll, fds, nfds, timeout_ts_p, NULL, 0);
 #endif
 }
 libc_hidden_def (__poll)
diff --git a/sysdeps/unix/sysv/linux/posix_fadvise.c b/sysdeps/unix/sysv/linux/posix_fadvise.c
index bada96b697..1cd0d60522 100644
--- a/sysdeps/unix/sysv/linux/posix_fadvise.c
+++ b/sysdeps/unix/sysv/linux/posix_fadvise.c
@@ -42,26 +42,23 @@ int
 posix_fadvise (int fd, off_t offset, off_t len, int advise)
 {
 # if defined (__NR_fadvise64) && !defined (__ASSUME_FADVISE64_AS_64_64)
-  int ret = INTERNAL_SYSCALL_CALL (fadvise64, fd,
-				   __ALIGNMENT_ARG SYSCALL_LL (offset),
-				   len, advise);
+  return -internal_syscall (__NR_fadvise64, fd,
+			    __ALIGNMENT_ARG SYSCALL_LL (offset),
+			    len, advise);
 # else
 #  ifdef __ASSUME_FADVISE64_64_6ARG
-  int ret = INTERNAL_SYSCALL_CALL (fadvise64_64, fd, advise,
-				   SYSCALL_LL (offset), SYSCALL_LL (len));
+  return -internal_syscall (__NR_fadvise64_64, fd, advise,
+			    SYSCALL_LL (offset), SYSCALL_LL (len));
 #  else
 
 #   ifndef __NR_fadvise64_64
 #    define __NR_fadvise64_64 __NR_fadvise64
 #   endif
 
-  int ret = INTERNAL_SYSCALL_CALL (fadvise64_64, fd,
-				   __ALIGNMENT_ARG SYSCALL_LL (offset),
-				   SYSCALL_LL (len), advise);
+  return -internal_syscall (__NR_fadvise64_64, fd,
+			    __ALIGNMENT_ARG SYSCALL_LL (offset),
+			    SYSCALL_LL (len), advise);
 #  endif
 # endif
-  if (INTERNAL_SYSCALL_ERROR_P (ret))
-    return INTERNAL_SYSCALL_ERRNO (ret);
-  return 0;
 }
 #endif /* __OFF_T_MATCHES_OFF64_T  */
diff --git a/sysdeps/unix/sysv/linux/posix_fadvise64.c b/sysdeps/unix/sysv/linux/posix_fadvise64.c
index 7323c82a07..a4dd5d7945 100644
--- a/sysdeps/unix/sysv/linux/posix_fadvise64.c
+++ b/sysdeps/unix/sysv/linux/posix_fadvise64.c
@@ -42,16 +42,13 @@ int
 __posix_fadvise64_l64 (int fd, off64_t offset, off64_t len, int advise)
 {
 #ifdef __ASSUME_FADVISE64_64_6ARG
-  int ret = INTERNAL_SYSCALL_CALL (fadvise64_64, fd, advise,
-				   SYSCALL_LL64 (offset), SYSCALL_LL64 (len));
+  return -internal_syscall (__NR_fadvise64_64, fd, advise,
+			    SYSCALL_LL64 (offset), SYSCALL_LL64 (len));
 #else
-  int ret = INTERNAL_SYSCALL_CALL (fadvise64_64, fd,
-				   __ALIGNMENT_ARG SYSCALL_LL64 (offset),
-				   SYSCALL_LL64 (len), advise);
+  return -internal_syscall (__NR_fadvise64_64, fd,
+			    __ALIGNMENT_ARG SYSCALL_LL64 (offset),
+			    SYSCALL_LL64 (len), advise);
 #endif
-  if (!INTERNAL_SYSCALL_ERROR_P (ret))
-    return 0;
-  return INTERNAL_SYSCALL_ERRNO (ret);
 }
 
 /* The type of the len argument was changed from size_t to off_t in
diff --git a/sysdeps/unix/sysv/linux/posix_fallocate.c b/sysdeps/unix/sysv/linux/posix_fallocate.c
index 7238b00038..1032699a03 100644
--- a/sysdeps/unix/sysv/linux/posix_fallocate.c
+++ b/sysdeps/unix/sysv/linux/posix_fallocate.c
@@ -26,11 +26,11 @@
 int
 posix_fallocate (int fd, __off_t offset, __off_t len)
 {
-  int res = INTERNAL_SYSCALL_CALL (fallocate, fd, 0,
-				   SYSCALL_LL (offset), SYSCALL_LL (len));
-  if (! INTERNAL_SYSCALL_ERROR_P (res))
+  int res = internal_syscall (__NR_fallocate, fd, 0,
+			      SYSCALL_LL (offset), SYSCALL_LL (len));
+  if (res == 0)
     return 0;
-  if (INTERNAL_SYSCALL_ERRNO (res) != EOPNOTSUPP)
-    return INTERNAL_SYSCALL_ERRNO (res);
+  if (-res != EOPNOTSUPP)
+    return -res;
   return internal_fallocate (fd, offset, len);
 }
diff --git a/sysdeps/unix/sysv/linux/posix_fallocate64.c b/sysdeps/unix/sysv/linux/posix_fallocate64.c
index 2de63ac277..cf15de53b3 100644
--- a/sysdeps/unix/sysv/linux/posix_fallocate64.c
+++ b/sysdeps/unix/sysv/linux/posix_fallocate64.c
@@ -28,12 +28,12 @@ libc_hidden_proto (__posix_fallocate64_l64)
 int
 __posix_fallocate64_l64 (int fd, __off64_t offset, __off64_t len)
 {
-  int res = INTERNAL_SYSCALL_CALL (fallocate, fd, 0,
-				   SYSCALL_LL64 (offset), SYSCALL_LL64 (len));
-  if (! INTERNAL_SYSCALL_ERROR_P (res))
+  int res = internal_syscall (__NR_fallocate, fd, 0,
+			      SYSCALL_LL64 (offset), SYSCALL_LL64 (len));
+  if (res == 0)
     return 0;
-  if (INTERNAL_SYSCALL_ERRNO (res) != EOPNOTSUPP)
-    return INTERNAL_SYSCALL_ERRNO (res);
+  if (-res != EOPNOTSUPP)
+    return -res;
   return internal_fallocate64 (fd, offset, len);
 }
 libc_hidden_def (__posix_fallocate64_l64)
diff --git a/sysdeps/unix/sysv/linux/posix_madvise.c b/sysdeps/unix/sysv/linux/posix_madvise.c
index 0e49f3b7ac..806ba90303 100644
--- a/sysdeps/unix/sysv/linux/posix_madvise.c
+++ b/sysdeps/unix/sysv/linux/posix_madvise.c
@@ -31,6 +31,5 @@ posix_madvise (void *addr, size_t len, int advice)
   if (advice == POSIX_MADV_DONTNEED)
     return 0;
 
-  int result = INTERNAL_SYSCALL_CALL (madvise, addr, len, advice);
-  return INTERNAL_SYSCALL_ERRNO (result);
+  return -internal_syscall (__NR_madvise, addr, len, advice);
 }
diff --git a/sysdeps/unix/sysv/linux/ppoll.c b/sysdeps/unix/sysv/linux/ppoll.c
index 4ffb23710e..d2ae87a42e 100644
--- a/sysdeps/unix/sysv/linux/ppoll.c
+++ b/sysdeps/unix/sysv/linux/ppoll.c
@@ -41,11 +41,12 @@ __ppoll64 (struct pollfd *fds, nfds_t nfds, const struct __timespec64 *timeout,
 # ifndef __NR_ppoll_time64
 #  define __NR_ppoll_time64 __NR_ppoll
 # endif
-  return SYSCALL_CANCEL (ppoll_time64, fds, nfds, timeout, sigmask, _NSIG / 8);
+  return inline_syscall_cancel (__NR_ppoll_time64, fds, nfds, timeout,
+				sigmask, _NSIG / 8);
 #else
 # ifdef __NR_ppoll_time64
-  int ret = SYSCALL_CANCEL (ppoll_time64, fds, nfds, timeout, sigmask,
-                            _NSIG / 8);
+  int ret = inline_syscall_cancel (__NR_ppoll_time64, fds, nfds, timeout,
+				   sigmask, _NSIG / 8);
   if (ret >= 0 || errno != ENOSYS)
     return ret;
 # endif
@@ -61,8 +62,8 @@ __ppoll64 (struct pollfd *fds, nfds_t nfds, const struct __timespec64 *timeout,
       ts32 = valid_timespec64_to_timespec (*timeout);
     }
 
-  return SYSCALL_CANCEL (ppoll, fds, nfds, timeout ? &ts32 : NULL, sigmask,
-                         _NSIG / 8);
+  return inline_syscall_cancel (__NR_ppoll, fds, nfds, timeout ? &ts32 : NULL,
+				sigmask, _NSIG / 8);
 #endif
 }
 
diff --git a/sysdeps/unix/sysv/linux/prctl.c b/sysdeps/unix/sysv/linux/prctl.c
index d5725f14cf..684d7680c9 100644
--- a/sysdeps/unix/sysv/linux/prctl.c
+++ b/sysdeps/unix/sysv/linux/prctl.c
@@ -35,7 +35,7 @@ __prctl (int option, ...)
   unsigned long int arg4 = va_arg (arg, unsigned long int);
   unsigned long int arg5 = va_arg (arg, unsigned long int);
   va_end (arg);
-  return INLINE_SYSCALL_CALL (prctl, option, arg2, arg3, arg4, arg5);
+  return inline_syscall (__NR_prctl, option, arg2, arg3, arg4, arg5);
 }
 
 libc_hidden_def (__prctl)
diff --git a/sysdeps/unix/sysv/linux/pread.c b/sysdeps/unix/sysv/linux/pread.c
index 8dd87b3976..c5802faa78 100644
--- a/sysdeps/unix/sysv/linux/pread.c
+++ b/sysdeps/unix/sysv/linux/pread.c
@@ -24,7 +24,8 @@
 ssize_t
 __libc_pread (int fd, void *buf, size_t count, off_t offset)
 {
-  return SYSCALL_CANCEL (pread64, fd, buf, count, SYSCALL_LL_PRW (offset));
+  return inline_syscall_cancel (__NR_pread64, fd, buf, count,
+				SYSCALL_LL_PRW (offset));
 }
 
 strong_alias (__libc_pread, __pread)
diff --git a/sysdeps/unix/sysv/linux/pread64.c b/sysdeps/unix/sysv/linux/pread64.c
index 3d4ffbafc1..9f15f15a25 100644
--- a/sysdeps/unix/sysv/linux/pread64.c
+++ b/sysdeps/unix/sysv/linux/pread64.c
@@ -22,7 +22,8 @@
 ssize_t
 __libc_pread64 (int fd, void *buf, size_t count, off64_t offset)
 {
-  return SYSCALL_CANCEL (pread64, fd, buf, count, SYSCALL_LL64_PRW (offset));
+  return inline_syscall_cancel (__NR_pread64, fd, buf, count,
+				SYSCALL_LL64_PRW (offset));
 }
 
 weak_alias (__libc_pread64, __pread64)
diff --git a/sysdeps/unix/sysv/linux/pread64_nocancel.c b/sysdeps/unix/sysv/linux/pread64_nocancel.c
index af33985959..3a0a605927 100644
--- a/sysdeps/unix/sysv/linux/pread64_nocancel.c
+++ b/sysdeps/unix/sysv/linux/pread64_nocancel.c
@@ -23,6 +23,7 @@
 ssize_t
 __pread64_nocancel (int fd, void *buf, size_t count, off64_t offset)
 {
-  return INLINE_SYSCALL_CALL (pread64, fd, buf, count, SYSCALL_LL64_PRW (offset));
+  return inline_syscall (__NR_pread64, fd, buf, count,
+			 SYSCALL_LL64_PRW (offset));
 }
 hidden_def (__pread64_nocancel)
diff --git a/sysdeps/unix/sysv/linux/preadv.c b/sysdeps/unix/sysv/linux/preadv.c
index 9fccb917a1..3ab0c983fb 100644
--- a/sysdeps/unix/sysv/linux/preadv.c
+++ b/sysdeps/unix/sysv/linux/preadv.c
@@ -25,7 +25,8 @@
 ssize_t
 preadv (int fd, const struct iovec *vector, int count, off_t offset)
 {
-  return SYSCALL_CANCEL (preadv, fd, vector, count, LO_HI_LONG (offset));
+  return inline_syscall_cancel (__NR_preadv, fd, vector, count,
+				LO_HI_LONG (offset));
 }
 # else
 static ssize_t __atomic_preadv_replacement (int, const struct iovec *,
@@ -33,8 +34,8 @@ static ssize_t __atomic_preadv_replacement (int, const struct iovec *,
 ssize_t
 preadv (int fd, const struct iovec *vector, int count, off_t offset)
 {
-  ssize_t result = SYSCALL_CANCEL (preadv, fd, vector, count,
-				   LO_HI_LONG (offset));
+  ssize_t result = inline_syscall_cancel (__NR_preadv, fd, vector, count,
+					  LO_HI_LONG (offset));
   if (result >= 0 || errno != ENOSYS)
     return result;
   return __atomic_preadv_replacement (fd, vector, count, offset);
diff --git a/sysdeps/unix/sysv/linux/preadv2.c b/sysdeps/unix/sysv/linux/preadv2.c
index 4e3aa923da..6ce7953f1d 100644
--- a/sysdeps/unix/sysv/linux/preadv2.c
+++ b/sysdeps/unix/sysv/linux/preadv2.c
@@ -25,8 +25,8 @@ ssize_t
 preadv2 (int fd, const struct iovec *vector, int count, off_t offset,
 	 int flags)
 {
-  ssize_t result = SYSCALL_CANCEL (preadv2, fd, vector, count,
-				   LO_HI_LONG (offset), flags);
+  ssize_t result = inline_syscall_cancel (__NR_preadv2, fd, vector, count,
+					  LO_HI_LONG (offset), flags);
   if (result >= 0 || errno != ENOSYS)
     return result;
 
diff --git a/sysdeps/unix/sysv/linux/preadv64.c b/sysdeps/unix/sysv/linux/preadv64.c
index 9fe43522a5..2daa22e3b2 100644
--- a/sysdeps/unix/sysv/linux/preadv64.c
+++ b/sysdeps/unix/sysv/linux/preadv64.c
@@ -23,7 +23,8 @@
 ssize_t
 preadv64 (int fd, const struct iovec *vector, int count, off64_t offset)
 {
-  return SYSCALL_CANCEL (preadv, fd, vector, count, LO_HI_LONG (offset));
+  return inline_syscall_cancel (__NR_preadv, fd, vector, count,
+				LO_HI_LONG (offset));
 }
 #else
 static ssize_t __atomic_preadv64_replacement (int, const struct iovec *,
@@ -31,8 +32,8 @@ static ssize_t __atomic_preadv64_replacement (int, const struct iovec *,
 ssize_t
 preadv64 (int fd, const struct iovec *vector, int count, off64_t offset)
 {
-  ssize_t result = SYSCALL_CANCEL (preadv, fd, vector, count,
-				   LO_HI_LONG (offset));
+  ssize_t result = inline_syscall_cancel (__NR_preadv, fd, vector, count,
+					  LO_HI_LONG (offset));
   if (result >= 0 || errno != ENOSYS)
     return result;
   return __atomic_preadv64_replacement (fd, vector, count, offset);
diff --git a/sysdeps/unix/sysv/linux/preadv64v2.c b/sysdeps/unix/sysv/linux/preadv64v2.c
index 1bf1a4c696..9920e499f9 100644
--- a/sysdeps/unix/sysv/linux/preadv64v2.c
+++ b/sysdeps/unix/sysv/linux/preadv64v2.c
@@ -23,8 +23,8 @@ ssize_t
 preadv64v2 (int fd, const struct iovec *vector, int count, off64_t offset,
 	    int flags)
 {
-  ssize_t result = SYSCALL_CANCEL (preadv2, fd, vector, count,
-				   LO_HI_LONG (offset), flags);
+  ssize_t result = inline_syscall_cancel (__NR_preadv2, fd, vector, count,
+					  LO_HI_LONG (offset), flags);
   if (result >= 0 || errno != ENOSYS)
     return result;
 
diff --git a/sysdeps/unix/sysv/linux/prlimit.c b/sysdeps/unix/sysv/linux/prlimit.c
index e12eb4e9bc..4f212df776 100644
--- a/sysdeps/unix/sysv/linux/prlimit.c
+++ b/sysdeps/unix/sysv/linux/prlimit.c
@@ -41,7 +41,7 @@ prlimit (__pid_t pid, enum __rlimit_resource resource,
       new_rlimit64 = &new_rlimit64_mem;
     }
 
-  int res = INLINE_SYSCALL (prlimit64, 4, pid, resource, new_rlimit64,
+  int res = inline_syscall (__NR_prlimit64, pid, resource, new_rlimit64,
 			    old_rlimit64);
 
   if (res == 0 && old_rlimit != NULL)
@@ -58,7 +58,7 @@ prlimit (__pid_t pid, enum __rlimit_resource resource,
 	{
 	  if ((new_rlimit == NULL)
 	      && (old_rlimit64_mem.rlim_cur != RLIM64_INFINITY))
-	    return INLINE_SYSCALL_ERROR_RETURN_VALUE (EOVERFLOW);
+ 	    return __syscall_ret_err (EOVERFLOW);
 	  old_rlimit->rlim_cur = RLIM_INFINITY;
 	}
       old_rlimit->rlim_max = old_rlimit64_mem.rlim_max;
@@ -66,7 +66,7 @@ prlimit (__pid_t pid, enum __rlimit_resource resource,
 	{
 	  if ((new_rlimit == NULL)
 	      && (old_rlimit64_mem.rlim_max != RLIM64_INFINITY))
-	    return INLINE_SYSCALL_ERROR_RETURN_VALUE (EOVERFLOW);
+	    return __syscall_ret_err (EOVERFLOW);
 	  old_rlimit->rlim_max = RLIM_INFINITY;
 	}
     }
diff --git a/sysdeps/unix/sysv/linux/process_vm_readv.c b/sysdeps/unix/sysv/linux/process_vm_readv.c
index e1377f7e50..bb8e9dbe33 100644
--- a/sysdeps/unix/sysv/linux/process_vm_readv.c
+++ b/sysdeps/unix/sysv/linux/process_vm_readv.c
@@ -27,6 +27,6 @@ process_vm_readv (pid_t pid, const struct iovec *local_iov,
 		  const struct iovec *remote_iov,
 		  unsigned long int riovcnt, unsigned long int flags)
 {
-  return INLINE_SYSCALL_CALL (process_vm_readv, pid, local_iov,
-			      liovcnt, remote_iov, riovcnt, flags);
+  return inline_syscall (__NR_process_vm_readv, pid, local_iov,
+			 liovcnt, remote_iov, riovcnt, flags);
 }
diff --git a/sysdeps/unix/sysv/linux/process_vm_writev.c b/sysdeps/unix/sysv/linux/process_vm_writev.c
index 944ab9b7f1..95b17e35a8 100644
--- a/sysdeps/unix/sysv/linux/process_vm_writev.c
+++ b/sysdeps/unix/sysv/linux/process_vm_writev.c
@@ -27,6 +27,6 @@ process_vm_writev (pid_t pid, const struct iovec *local_iov,
 		   const struct iovec *remote_iov,
 		   unsigned long int riovcnt, unsigned long int flags)
 {
-  return INLINE_SYSCALL_CALL (process_vm_writev, pid, local_iov,
-			      liovcnt, remote_iov, riovcnt, flags);
+  return inline_syscall (__NR_process_vm_writev, pid, local_iov,
+			 liovcnt, remote_iov, riovcnt, flags);
 }
diff --git a/sysdeps/unix/sysv/linux/pselect.c b/sysdeps/unix/sysv/linux/pselect.c
index d7c6ff8fdb..b8ac4cf419 100644
--- a/sysdeps/unix/sysv/linux/pselect.c
+++ b/sysdeps/unix/sysv/linux/pselect.c
@@ -45,8 +45,8 @@ __pselect (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
   data.ss = (__syscall_ulong_t) (uintptr_t) sigmask;
   data.ss_len = _NSIG / 8;
 
-  return SYSCALL_CANCEL (pselect6, nfds, readfds, writefds, exceptfds,
-                         timeout, &data);
+  return inline_syscall_cancel (__NR_pselect6, nfds, readfds, writefds,
+				exceptfds, timeout, &data);
 }
 #ifndef __pselect
 weak_alias (__pselect, pselect)
diff --git a/sysdeps/unix/sysv/linux/pthread-pids.h b/sysdeps/unix/sysv/linux/pthread-pids.h
index 0b8ca4ec06..b72c1943eb 100644
--- a/sysdeps/unix/sysv/linux/pthread-pids.h
+++ b/sysdeps/unix/sysv/linux/pthread-pids.h
@@ -25,5 +25,5 @@
 static inline void
 __pthread_initialize_pids (struct pthread *pd)
 {
-  pd->tid = INTERNAL_SYSCALL_CALL (set_tid_address, &pd->tid);
+  pd->tid = internal_syscall (__NR_set_tid_address, &pd->tid);
 }
diff --git a/sysdeps/unix/sysv/linux/pthread_kill.c b/sysdeps/unix/sysv/linux/pthread_kill.c
index 4dfe08ffcd..c0e89a8097 100644
--- a/sysdeps/unix/sysv/linux/pthread_kill.c
+++ b/sysdeps/unix/sysv/linux/pthread_kill.c
@@ -50,8 +50,6 @@ __pthread_kill (pthread_t threadid, int signo)
   /* We have a special syscall to do the work.  */
   pid_t pid = __getpid ();
 
-  int val = INTERNAL_SYSCALL_CALL (tgkill, pid, tid, signo);
-  return (INTERNAL_SYSCALL_ERROR_P (val)
-	  ? INTERNAL_SYSCALL_ERRNO (val) : 0);
+  return -internal_syscall (__NR_tgkill, pid, tid, signo);
 }
 strong_alias (__pthread_kill, pthread_kill)
diff --git a/sysdeps/unix/sysv/linux/pthread_sigqueue.c b/sysdeps/unix/sysv/linux/pthread_sigqueue.c
index 4b32be2d64..df98b83735 100644
--- a/sysdeps/unix/sysv/linux/pthread_sigqueue.c
+++ b/sysdeps/unix/sysv/linux/pthread_sigqueue.c
@@ -61,10 +61,8 @@ pthread_sigqueue (pthread_t threadid, int signo, const union sigval value)
   info.si_value = value;
 
   /* We have a special syscall to do the work.  */
-  int val = INTERNAL_SYSCALL_CALL (rt_tgsigqueueinfo, pid, tid, signo,
-				   &info);
-  return (INTERNAL_SYSCALL_ERROR_P (val)
-	  ? INTERNAL_SYSCALL_ERRNO (val) : 0);
+  return -internal_syscall (__NR_rt_tgsigqueueinfo, pid, tid, signo,
+			    &info);
 #else
   return ENOSYS;
 #endif
diff --git a/sysdeps/unix/sysv/linux/ptrace.c b/sysdeps/unix/sysv/linux/ptrace.c
index 7826a269ec..5815a4b137 100644
--- a/sysdeps/unix/sysv/linux/ptrace.c
+++ b/sysdeps/unix/sysv/linux/ptrace.c
@@ -42,7 +42,7 @@ ptrace (enum __ptrace_request request, ...)
   if (request > 0 && request < 4)
     data = &ret;
 
-  res = INLINE_SYSCALL (ptrace, 4, request, pid, addr, data);
+  res = inline_syscall (__NR_ptrace, request, pid, addr, data);
   if (res >= 0 && request > 0 && request < 4)
     {
       __set_errno (0);
diff --git a/sysdeps/unix/sysv/linux/pwrite.c b/sysdeps/unix/sysv/linux/pwrite.c
index 17964686e5..0bd5663f09 100644
--- a/sysdeps/unix/sysv/linux/pwrite.c
+++ b/sysdeps/unix/sysv/linux/pwrite.c
@@ -24,7 +24,8 @@
 ssize_t
 __libc_pwrite (int fd, const void *buf, size_t count, off_t offset)
 {
-  return SYSCALL_CANCEL (pwrite64, fd, buf, count, SYSCALL_LL_PRW (offset));
+  return inline_syscall_cancel (__NR_pwrite64, fd, buf, count,
+				SYSCALL_LL_PRW (offset));
 }
 
 strong_alias (__libc_pwrite, __pwrite)
diff --git a/sysdeps/unix/sysv/linux/pwrite64.c b/sysdeps/unix/sysv/linux/pwrite64.c
index 709775c207..5c4e8703ed 100644
--- a/sysdeps/unix/sysv/linux/pwrite64.c
+++ b/sysdeps/unix/sysv/linux/pwrite64.c
@@ -22,7 +22,8 @@
 ssize_t
 __libc_pwrite64 (int fd, const void *buf, size_t count, off64_t offset)
 {
-  return SYSCALL_CANCEL (pwrite64, fd, buf, count, SYSCALL_LL64_PRW (offset));
+  return inline_syscall_cancel (__NR_pwrite64, fd, buf, count,
+				SYSCALL_LL64_PRW (offset));
 }
 
 weak_alias (__libc_pwrite64, __pwrite64)
diff --git a/sysdeps/unix/sysv/linux/pwritev.c b/sysdeps/unix/sysv/linux/pwritev.c
index d6cb3c8d5c..010c289482 100644
--- a/sysdeps/unix/sysv/linux/pwritev.c
+++ b/sysdeps/unix/sysv/linux/pwritev.c
@@ -25,7 +25,8 @@
 ssize_t
 pwritev (int fd, const struct iovec *vector, int count, off_t offset)
 {
-  return SYSCALL_CANCEL (pwritev, fd, vector, count, LO_HI_LONG (offset));
+  return inline_syscall_cancel (__NR_pwritev, fd, vector, count,
+				LO_HI_LONG (offset));
 }
 # else
 static ssize_t __atomic_pwritev_replacement (int, const struct iovec *,
@@ -33,8 +34,8 @@ static ssize_t __atomic_pwritev_replacement (int, const struct iovec *,
 ssize_t
 pwritev (int fd, const struct iovec *vector, int count, off_t offset)
 {
-  ssize_t result = SYSCALL_CANCEL (pwritev, fd, vector, count,
-				   LO_HI_LONG (offset));
+  ssize_t result = inline_syscall_cancel (__NR_pwritev, fd, vector, count,
+					  LO_HI_LONG (offset));
   if (result >= 0 || errno != ENOSYS)
     return result;
   return __atomic_pwritev_replacement (fd, vector, count, offset);
diff --git a/sysdeps/unix/sysv/linux/pwritev2.c b/sysdeps/unix/sysv/linux/pwritev2.c
index a179654970..036bcc0e8e 100644
--- a/sysdeps/unix/sysv/linux/pwritev2.c
+++ b/sysdeps/unix/sysv/linux/pwritev2.c
@@ -26,8 +26,8 @@ pwritev2 (int fd, const struct iovec *vector, int count, off_t offset,
 	  int flags)
 {
 
-  ssize_t result = SYSCALL_CANCEL (pwritev2, fd, vector, count,
-				   LO_HI_LONG (offset), flags);
+  ssize_t result = inline_syscall_cancel (__NR_pwritev2, fd, vector, count,
+					  LO_HI_LONG (offset), flags);
   if (result >= 0 || errno != ENOSYS)
     return result;
 
diff --git a/sysdeps/unix/sysv/linux/pwritev64.c b/sysdeps/unix/sysv/linux/pwritev64.c
index 08bda27d4f..81d3701993 100644
--- a/sysdeps/unix/sysv/linux/pwritev64.c
+++ b/sysdeps/unix/sysv/linux/pwritev64.c
@@ -23,7 +23,8 @@
 ssize_t
 pwritev64 (int fd, const struct iovec *vector, int count, off64_t offset)
 {
-  return SYSCALL_CANCEL (pwritev, fd, vector, count, LO_HI_LONG (offset));
+  return inline_syscall_cancel (__NR_pwritev, fd, vector, count,
+				LO_HI_LONG (offset));
 }
 #else
 static ssize_t __atomic_pwritev64_replacement (int, const struct iovec *,
@@ -31,8 +32,8 @@ static ssize_t __atomic_pwritev64_replacement (int, const struct iovec *,
 ssize_t
 pwritev64 (int fd, const struct iovec *vector, int count, off64_t offset)
 {
-  ssize_t result = SYSCALL_CANCEL (pwritev, fd, vector, count,
-				   LO_HI_LONG (offset));
+  ssize_t result = inline_syscall_cancel (__NR_pwritev, fd, vector, count,
+					  LO_HI_LONG (offset));
   if (result >= 0 || errno != ENOSYS)
     return result;
   return __atomic_pwritev64_replacement (fd, vector, count, offset);
diff --git a/sysdeps/unix/sysv/linux/pwritev64v2.c b/sysdeps/unix/sysv/linux/pwritev64v2.c
index 8df32528b7..cdedbacff8 100644
--- a/sysdeps/unix/sysv/linux/pwritev64v2.c
+++ b/sysdeps/unix/sysv/linux/pwritev64v2.c
@@ -23,8 +23,8 @@ ssize_t
 pwritev64v2 (int fd, const struct iovec *vector, int count, off64_t offset,
 	     int flags)
 {
-  ssize_t result = SYSCALL_CANCEL (pwritev2, fd, vector, count,
-				   LO_HI_LONG (offset), flags);
+  ssize_t result = inline_syscall_cancel (__NR_pwritev2, fd, vector, count,
+					  LO_HI_LONG (offset), flags);
   if (result >= 0 || errno != ENOSYS)
     return result;
 
diff --git a/sysdeps/unix/sysv/linux/raise.c b/sysdeps/unix/sysv/linux/raise.c
index 3b90ae1d55..69f9602fbc 100644
--- a/sysdeps/unix/sysv/linux/raise.c
+++ b/sysdeps/unix/sysv/linux/raise.c
@@ -39,10 +39,10 @@ raise (int sig)
   sigset_t set;
   __libc_signal_block_app (&set);
 
-  pid_t pid = INTERNAL_SYSCALL_CALL (getpid);
-  pid_t tid = INTERNAL_SYSCALL_CALL (gettid);
+  pid_t pid = internal_syscall (__NR_getpid);
+  pid_t tid = internal_syscall (__NR_gettid);
 
-  int ret = INLINE_SYSCALL_CALL (tgkill, pid, tid, sig);
+  int ret = inline_syscall (__NR_tgkill, pid, tid, sig);
 
   __libc_signal_restore_set (&set);
 
diff --git a/sysdeps/unix/sysv/linux/read.c b/sysdeps/unix/sysv/linux/read.c
index 64f558a587..940ea5ece0 100644
--- a/sysdeps/unix/sysv/linux/read.c
+++ b/sysdeps/unix/sysv/linux/read.c
@@ -23,7 +23,7 @@
 ssize_t
 __libc_read (int fd, void *buf, size_t nbytes)
 {
-  return SYSCALL_CANCEL (read, fd, buf, nbytes);
+  return inline_syscall_cancel (__NR_read, fd, buf, nbytes);
 }
 libc_hidden_def (__libc_read)
 
diff --git a/sysdeps/unix/sysv/linux/read_nocancel.c b/sysdeps/unix/sysv/linux/read_nocancel.c
index f9d8a3b563..e9214f52fc 100644
--- a/sysdeps/unix/sysv/linux/read_nocancel.c
+++ b/sysdeps/unix/sysv/linux/read_nocancel.c
@@ -23,6 +23,6 @@
 ssize_t
 __read_nocancel (int fd, void *buf, size_t nbytes)
 {
-  return INLINE_SYSCALL_CALL (read, fd, buf, nbytes);
+  return inline_syscall (__NR_read, fd, buf, nbytes);
 }
 hidden_def (__read_nocancel)
diff --git a/sysdeps/unix/sysv/linux/readahead.c b/sysdeps/unix/sysv/linux/readahead.c
index ad01a0aed8..9b0556a143 100644
--- a/sysdeps/unix/sysv/linux/readahead.c
+++ b/sysdeps/unix/sysv/linux/readahead.c
@@ -23,8 +23,8 @@
 ssize_t
 __readahead (int fd, off64_t offset, size_t count)
 {
-  return INLINE_SYSCALL_CALL (readahead, fd,
-			      __ALIGNMENT_ARG SYSCALL_LL64 (offset),
-			      count);
+  return inline_syscall (__NR_readahead, fd,
+			 __ALIGNMENT_ARG SYSCALL_LL64 (offset),
+			 count);
 }
 weak_alias (__readahead, readahead)
diff --git a/sysdeps/unix/sysv/linux/readv.c b/sysdeps/unix/sysv/linux/readv.c
index 1a4305c597..b5d1cb988f 100644
--- a/sysdeps/unix/sysv/linux/readv.c
+++ b/sysdeps/unix/sysv/linux/readv.c
@@ -23,7 +23,7 @@
 ssize_t
 __readv (int fd, const struct iovec *iov, int iovcnt)
 {
-  return SYSCALL_CANCEL (readv, fd, iov, iovcnt);
+  return inline_syscall_cancel (__NR_readv, fd, iov, iovcnt);
 }
 libc_hidden_def (__readv)
 weak_alias (__readv, readv)
diff --git a/sysdeps/unix/sysv/linux/reboot.c b/sysdeps/unix/sysv/linux/reboot.c
index 3bddff1f7f..7603192cfb 100644
--- a/sysdeps/unix/sysv/linux/reboot.c
+++ b/sysdeps/unix/sysv/linux/reboot.c
@@ -25,5 +25,5 @@
 int
 reboot (int howto)
 {
-  return INLINE_SYSCALL (reboot, 3, (int) 0xfee1dead, 672274793, howto);
+  return inline_syscall (__NR_reboot, (int) 0xfee1dead, 672274793, howto);
 }
diff --git a/sysdeps/unix/sysv/linux/recv.c b/sysdeps/unix/sysv/linux/recv.c
index 79fb3c32d1..89573650a6 100644
--- a/sysdeps/unix/sysv/linux/recv.c
+++ b/sysdeps/unix/sysv/linux/recv.c
@@ -23,11 +23,12 @@ ssize_t
 __libc_recv (int fd, void *buf, size_t len, int flags)
 {
 #ifdef __ASSUME_RECV_SYSCALL
-  return SYSCALL_CANCEL (recv, fd, buf, len, flags);
+  return inline_syscall_cancel (__NR_recv, fd, buf, len, flags);
 #elif defined __ASSUME_RECVFROM_SYSCALL
-  return SYSCALL_CANCEL (recvfrom, fd, buf, len, flags, NULL, NULL);
+  return inline_syscall_cancel (__NR_recvfrom, fd, buf, len, flags, NULL,
+				NULL);
 #else
-  return SOCKETCALL_CANCEL (recv, fd, buf, len, flags);
+  return socketcall_cancel (recv, fd, buf, len, flags);
 #endif
 }
 weak_alias (__libc_recv, recv)
diff --git a/sysdeps/unix/sysv/linux/recvfrom.c b/sysdeps/unix/sysv/linux/recvfrom.c
index 70532529c9..ad3a5c1306 100644
--- a/sysdeps/unix/sysv/linux/recvfrom.c
+++ b/sysdeps/unix/sysv/linux/recvfrom.c
@@ -24,11 +24,11 @@ __libc_recvfrom (int fd, void *buf, size_t len, int flags,
 		 __SOCKADDR_ARG addr, socklen_t *addrlen)
 {
 #ifdef __ASSUME_RECVFROM_SYSCALL
-  return SYSCALL_CANCEL (recvfrom, fd, buf, len, flags, addr.__sockaddr__,
-                         addrlen);
+  return inline_syscall_cancel (__NR_recvfrom, fd, buf, len, flags,
+				addr.__sockaddr__, addrlen);
 #else
-  return SOCKETCALL_CANCEL (recvfrom, fd, buf, len, flags, addr.__sockaddr__,
-			    addrlen);
+  return socketcall_cancel (recvfrom, fd, buf, len, flags,
+			    addr.__sockaddr__, addrlen);
 #endif
 }
 weak_alias (__libc_recvfrom, recvfrom)
diff --git a/sysdeps/unix/sysv/linux/recvmmsg.c b/sysdeps/unix/sysv/linux/recvmmsg.c
index 42c80c59c3..158ae1e786 100644
--- a/sysdeps/unix/sysv/linux/recvmmsg.c
+++ b/sysdeps/unix/sysv/linux/recvmmsg.c
@@ -29,8 +29,9 @@ recvmmsg (int fd, struct mmsghdr *vmessages, unsigned int vlen, int flags,
 	  struct timespec *tmo)
 {
 #ifdef __ASSUME_RECVMMSG_SYSCALL
-  return SYSCALL_CANCEL (recvmmsg, fd, vmessages, vlen, flags, tmo);
+  return inline_syscall_cancel (__NR_recvmmsg, fd, vmessages, vlen, flags,
+				tmo);
 #else
-  return SOCKETCALL_CANCEL (recvmmsg, fd, vmessages, vlen, flags, tmo);
+  return socketcall_cancel (recvmmsg, fd, vmessages, vlen, flags, tmo);
 #endif
 }
diff --git a/sysdeps/unix/sysv/linux/recvmsg.c b/sysdeps/unix/sysv/linux/recvmsg.c
index a86d502922..c514deb5c8 100644
--- a/sysdeps/unix/sysv/linux/recvmsg.c
+++ b/sysdeps/unix/sysv/linux/recvmsg.c
@@ -25,9 +25,9 @@ ssize_t
 __libc_recvmsg (int fd, struct msghdr *msg, int flags)
 {
 # ifdef __ASSUME_RECVMSG_SYSCALL
-  return SYSCALL_CANCEL (recvmsg, fd, msg, flags);
+  return inline_syscall_cancel (__NR_recvmsg, fd, msg, flags);
 # else
-  return SOCKETCALL_CANCEL (recvmsg, fd, msg, flags);
+  return socketcall_cancel (recvmsg, fd, msg, flags);
 # endif
 }
 weak_alias (__libc_recvmsg, recvmsg)
diff --git a/sysdeps/unix/sysv/linux/rename.c b/sysdeps/unix/sysv/linux/rename.c
index bfd3ea63da..9422839abe 100644
--- a/sysdeps/unix/sysv/linux/rename.c
+++ b/sysdeps/unix/sysv/linux/rename.c
@@ -26,10 +26,10 @@ int
 rename (const char *old, const char *new)
 {
 #if defined (__NR_rename)
-  return INLINE_SYSCALL_CALL (rename, old, new);
+  return inline_syscall (__NR_rename, old, new);
 #elif defined (__NR_renameat)
-  return INLINE_SYSCALL_CALL (renameat, AT_FDCWD, old, AT_FDCWD, new);
+  return inline_syscall (__NR_renameat, AT_FDCWD, old, AT_FDCWD, new);
 #else
-  return INLINE_SYSCALL_CALL (renameat2, AT_FDCWD, old, AT_FDCWD, new, 0);
+  return inline_syscall (__NR_renameat2, AT_FDCWD, old, AT_FDCWD, new, 0);
 #endif
 }
diff --git a/sysdeps/unix/sysv/linux/renameat.c b/sysdeps/unix/sysv/linux/renameat.c
index 901d61f37e..c50b289036 100644
--- a/sysdeps/unix/sysv/linux/renameat.c
+++ b/sysdeps/unix/sysv/linux/renameat.c
@@ -25,9 +25,9 @@ int
 __renameat (int oldfd, const char *old, int newfd, const char *new)
 {
 #ifdef __NR_renameat
-  return INLINE_SYSCALL_CALL (renameat, oldfd, old, newfd, new);
+  return inline_syscall (__NR_renameat, oldfd, old, newfd, new);
 #else
-  return INLINE_SYSCALL_CALL (renameat2, oldfd, old, newfd, new, 0);
+  return inline_syscall (__NR_renameat2, oldfd, old, newfd, new, 0);
 #endif
 }
 libc_hidden_def (__renameat)
diff --git a/sysdeps/unix/sysv/linux/renameat2.c b/sysdeps/unix/sysv/linux/renameat2.c
index 22b4178a08..50f877ae43 100644
--- a/sysdeps/unix/sysv/linux/renameat2.c
+++ b/sysdeps/unix/sysv/linux/renameat2.c
@@ -25,13 +25,13 @@ __renameat2 (int oldfd, const char *old, int newfd, const char *new,
            unsigned int flags)
 {
 #if !defined (__NR_renameat) || defined (__ASSUME_RENAMEAT2)
-  return INLINE_SYSCALL_CALL (renameat2, oldfd, old, newfd, new, flags);
+  return inline_syscall (__NR_renameat2, oldfd, old, newfd, new, flags);
 #else
   if (flags == 0)
     return __renameat (oldfd, old, newfd, new);
 
   /* For non-zero flags, try the renameat2 system call.  */
-  int ret = INLINE_SYSCALL_CALL (renameat2, oldfd, old, newfd, new, flags);
+  int ret = inline_syscall (__NR_renameat2, oldfd, old, newfd, new, flags);
   if (ret != -1 || errno != ENOSYS)
     /* Preserve non-error/non-ENOSYS return values.  */
     return ret;
diff --git a/sysdeps/unix/sysv/linux/riscv/flush-icache.c b/sysdeps/unix/sysv/linux/riscv/flush-icache.c
index 72caeb190f..c51d6c4ac8 100644
--- a/sysdeps/unix/sysv/linux/riscv/flush-icache.c
+++ b/sysdeps/unix/sysv/linux/riscv/flush-icache.c
@@ -33,7 +33,7 @@ typedef int (*func_type) (void *, void *, unsigned long int);
 static int
 __riscv_flush_icache_syscall (void *start, void *end, unsigned long int flags)
 {
-  return INLINE_SYSCALL (riscv_flush_icache, 3, start, end, flags);
+  return inline_syscall (__NR_riscv_flush_icache, start, end, flags);
 }
 
 static func_type
diff --git a/sysdeps/unix/sysv/linux/riscv/syscall.c b/sysdeps/unix/sysv/linux/riscv/syscall.c
index a99375c054..484824b0e3 100644
--- a/sysdeps/unix/sysv/linux/riscv/syscall.c
+++ b/sysdeps/unix/sysv/linux/riscv/syscall.c
@@ -22,13 +22,6 @@ long int
 syscall (long int syscall_number, long int arg1, long int arg2, long int arg3,
 	 long int arg4, long int arg5, long int arg6, long int arg7)
 {
-  long int ret;
-
-  ret = INTERNAL_SYSCALL_NCS (syscall_number, 7, arg1, arg2, arg3, arg4,
-			      arg5, arg6, arg7);
-
-  if (INTERNAL_SYSCALL_ERROR_P (ret))
-    return __syscall_error (ret);
-
-  return ret;
+  return inline_syscall (syscall_number, 7, arg1, arg2, arg3, arg4,
+			 arg5, arg6, arg7);
 }
diff --git a/sysdeps/unix/sysv/linux/s390/mmap_internal.h b/sysdeps/unix/sysv/linux/s390/mmap_internal.h
index 49c161039a..cd94748135 100644
--- a/sysdeps/unix/sysv/linux/s390/mmap_internal.h
+++ b/sysdeps/unix/sysv/linux/s390/mmap_internal.h
@@ -24,7 +24,7 @@
     long int __args[6] = { (long int) (__addr), (long int) (__len),	\
 			   (long int) (__prot), (long int) (__flags),	\
 			   (long int) (__fd), (long int) (__offset) };	\
-    inline_syscall (__NR_##__nr, __args);				\
+    inline_syscall (__nr, __args);					\
   })
 
 #include_next <mmap_internal.h>
diff --git a/sysdeps/unix/sysv/linux/safe-fatal.h b/sysdeps/unix/sysv/linux/safe-fatal.h
index 62126d1195..c7a07d3bf8 100644
--- a/sysdeps/unix/sysv/linux/safe-fatal.h
+++ b/sysdeps/unix/sysv/linux/safe-fatal.h
@@ -25,8 +25,8 @@
 static inline void
 __safe_fatal (void)
 {
-  pid_t self = INTERNAL_SYSCALL_CALL (getpid);
-  INTERNAL_SYSCALL_CALL (kill, self, SIGKILL);
+  pid_t self = internal_syscall (__NR_getpid);
+  internal_syscall (__NR_kill, self, SIGKILL);
 }
 
 #endif  /* safe-fatal.h */
diff --git a/sysdeps/unix/sysv/linux/sched_getaffinity.c b/sysdeps/unix/sysv/linux/sched_getaffinity.c
index 325bfb29c1..42446adbea 100644
--- a/sysdeps/unix/sysv/linux/sched_getaffinity.c
+++ b/sysdeps/unix/sysv/linux/sched_getaffinity.c
@@ -32,7 +32,7 @@ libc_hidden_proto (__sched_getaffinity_new)
 int
 __sched_getaffinity_new (pid_t pid, size_t cpusetsize, cpu_set_t *cpuset)
 {
-  int res = INLINE_SYSCALL (sched_getaffinity, 3, pid,
+  int res = inline_syscall (__NR_sched_getaffinity, pid,
 			    MIN (INT_MAX, cpusetsize), cpuset);
   if (res != -1)
     {
diff --git a/sysdeps/unix/sysv/linux/sched_getcpu.c b/sysdeps/unix/sysv/linux/sched_getcpu.c
index c019cfb3cf..b2530a3c73 100644
--- a/sysdeps/unix/sysv/linux/sched_getcpu.c
+++ b/sysdeps/unix/sysv/linux/sched_getcpu.c
@@ -28,7 +28,7 @@ sched_getcpu (void)
 #ifdef HAVE_GETCPU_VSYSCALL
   r = INLINE_VSYSCALL (getcpu, 3, &cpu, NULL, NULL);
 #else
-  r = INLINE_SYSCALL_CALL (getcpu, &cpu, NULL, NULL);
+  r = inline_syscall (__NR_getcpu, &cpu, NULL, NULL);
 #endif
   return r == -1 ? r : cpu;
 }
diff --git a/sysdeps/unix/sysv/linux/sched_rr_gi.c b/sysdeps/unix/sysv/linux/sched_rr_gi.c
index 3d7b484591..9b02f8f6cd 100644
--- a/sysdeps/unix/sysv/linux/sched_rr_gi.c
+++ b/sysdeps/unix/sysv/linux/sched_rr_gi.c
@@ -29,15 +29,15 @@ __sched_rr_get_interval64 (pid_t pid, struct __timespec64 *tp)
 # ifndef __NR_sched_rr_get_interval_time64
 #  define __NR_sched_rr_get_interval_time64 __NR_sched_rr_get_interval
 # endif
-  return INLINE_SYSCALL_CALL (sched_rr_get_interval_time64, pid, tp);
+  return inline_syscall (__NR_sched_rr_get_interval_time64, pid, tp);
 #else
 # ifdef __NR_sched_rr_get_interval_time64
-  int ret = INLINE_SYSCALL_CALL (sched_rr_get_interval_time64, pid, tp);
+  int ret = inline_syscall (__NR_sched_rr_get_interval_time64, pid, tp);
   if (ret == 0 || errno != ENOSYS)
     return ret;
 # endif
   struct timespec tp32;
-  int retval = INLINE_SYSCALL_CALL (sched_rr_get_interval, pid, &tp32);
+  int retval = inline_syscall (__NR_sched_rr_get_interval, pid, &tp32);
   if (retval == 0)
     *tp = valid_timespec_to_timespec64 (tp32);
 
diff --git a/sysdeps/unix/sysv/linux/sched_setaffinity.c b/sysdeps/unix/sysv/linux/sched_setaffinity.c
index 978291fc3e..28f41473d8 100644
--- a/sysdeps/unix/sysv/linux/sched_setaffinity.c
+++ b/sysdeps/unix/sysv/linux/sched_setaffinity.c
@@ -30,7 +30,7 @@ libc_hidden_proto (__sched_setaffinity_new)
 int
 __sched_setaffinity_new (pid_t pid, size_t cpusetsize, const cpu_set_t *cpuset)
 {
-  int result = INLINE_SYSCALL (sched_setaffinity, 3, pid, cpusetsize, cpuset);
+  int result = inline_syscall (__NR_sched_setaffinity, pid, cpusetsize, cpuset);
 
   return result;
 }
diff --git a/sysdeps/unix/sysv/linux/select.c b/sysdeps/unix/sysv/linux/select.c
index 54c50edba2..e711e8d4ff 100644
--- a/sysdeps/unix/sysv/linux/select.c
+++ b/sysdeps/unix/sysv/linux/select.c
@@ -38,8 +38,8 @@ __select (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
 	  struct timeval *timeout)
 {
 #ifdef __NR_select
-  return SYSCALL_CANCEL (select, nfds, readfds, writefds, exceptfds,
-			 timeout);
+  return inline_syscall_cancel (__NR_select, nfds, readfds, writefds,
+				exceptfds, timeout);
 #else
   int result;
   struct timespec ts, *tsp = NULL;
@@ -50,7 +50,8 @@ __select (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
       tsp = &ts;
     }
 
-  result = SYSCALL_CANCEL (pselect6, nfds, readfds, writefds, exceptfds, tsp,
+  result = inline_syscall_cancel (__NR_pselect6, nfds, readfds, writefds,
+				  exceptfds, tsp,
 			   NULL);
 
   if (timeout)
diff --git a/sysdeps/unix/sysv/linux/semctl.c b/sysdeps/unix/sysv/linux/semctl.c
index 30571af49f..c5632a4ba2 100644
--- a/sysdeps/unix/sysv/linux/semctl.c
+++ b/sysdeps/unix/sysv/linux/semctl.c
@@ -45,11 +45,11 @@ static int
 semctl_syscall (int semid, int semnum, int cmd, union semun arg)
 {
 #ifdef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
-  return INLINE_SYSCALL_CALL (semctl, semid, semnum, cmd | __IPC_64,
-			      arg.array);
+  return inline_syscall (__NR_semctl, semid, semnum, cmd | __IPC_64,
+			 arg.array);
 #else
-  return INLINE_SYSCALL_CALL (ipc, IPCOP_semctl, semid, semnum, cmd | __IPC_64,
-			      SEMCTL_ARG_ADDRESS (arg));
+  return inline_syscall (__NR_ipc, IPCOP_semctl, semid, semnum, cmd | __IPC_64,
+			 SEMCTL_ARG_ADDRESS (arg));
 #endif
 }
 
@@ -179,10 +179,10 @@ __old_semctl (int semid, int semnum, int cmd, ...)
  /* For architectures that have wire-up semctl but also have __IPC_64 to a
     value different than default (0x0) it means the compat symbol used the
     __NR_ipc syscall.  */
-  return INLINE_SYSCALL_CALL (semctl, semid, semnum, cmd, arg.array);
+  return inline_syscall (__NR_semctl, semid, semnum, cmd, arg.array);
 # else
-  return INLINE_SYSCALL_CALL (ipc, IPCOP_semctl, semid, semnum, cmd,
-			      SEMCTL_ARG_ADDRESS (arg));
+  return inline_syscall (__NR_ipc, IPCOP_semctl, semid, semnum, cmd,
+			 SEMCTL_ARG_ADDRESS (arg));
 # endif
 }
 compat_symbol (libc, __old_semctl, semctl, GLIBC_2_0);
diff --git a/sysdeps/unix/sysv/linux/semget.c b/sysdeps/unix/sysv/linux/semget.c
index 128bd0982a..7881906e92 100644
--- a/sysdeps/unix/sysv/linux/semget.c
+++ b/sysdeps/unix/sysv/linux/semget.c
@@ -28,8 +28,8 @@ int
 semget (key_t key, int nsems, int semflg)
 {
 #ifdef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
-  return INLINE_SYSCALL_CALL (semget, key, nsems, semflg);
+  return inline_syscall (__NR_semget, key, nsems, semflg);
 #else
-  return INLINE_SYSCALL_CALL (ipc, IPCOP_semget, key, nsems, semflg, NULL);
+  return inline_syscall (__NR_ipc, IPCOP_semget, key, nsems, semflg, NULL);
 #endif
 }
diff --git a/sysdeps/unix/sysv/linux/semtimedop.c b/sysdeps/unix/sysv/linux/semtimedop.c
index 6fdde09bad..83c513d9a7 100644
--- a/sysdeps/unix/sysv/linux/semtimedop.c
+++ b/sysdeps/unix/sysv/linux/semtimedop.c
@@ -30,10 +30,10 @@ __semtimedop (int semid, struct sembuf *sops, size_t nsops,
   /* semtimedop wire-up syscall is not exported for 32-bit ABIs (they have
      semtimedop_time64 instead with uses a 64-bit time_t).  */
 #if defined __ASSUME_DIRECT_SYSVIPC_SYSCALLS && defined __NR_semtimedop
-  return INLINE_SYSCALL_CALL (semtimedop, semid, sops, nsops, timeout);
+  return inline_syscall (__NR_semtimedop, semid, sops, nsops, timeout);
 #else
-  return INLINE_SYSCALL_CALL (ipc, IPCOP_semtimedop, semid,
-			      SEMTIMEDOP_IPC_ARGS (nsops, sops, timeout));
+  return inline_syscall (__NR_ipc, IPCOP_semtimedop, semid,
+			 SEMTIMEDOP_IPC_ARGS (nsops, sops, timeout));
 #endif
 }
 weak_alias (__semtimedop, semtimedop)
diff --git a/sysdeps/unix/sysv/linux/send.c b/sysdeps/unix/sysv/linux/send.c
index aed7d06585..2620e38323 100644
--- a/sysdeps/unix/sysv/linux/send.c
+++ b/sysdeps/unix/sysv/linux/send.c
@@ -23,11 +23,11 @@ ssize_t
 __libc_send (int fd, const void *buf, size_t len, int flags)
 {
 #ifdef __ASSUME_SEND_SYSCALL
-  return SYSCALL_CANCEL (send, fd, buf, len, flags);
+  return inline_syscall_cancel (__NR_send, fd, buf, len, flags);
 #elif defined __ASSUME_SENDTO_SYSCALL
-  return SYSCALL_CANCEL (sendto, fd, buf, len, flags, NULL, 0);
+  return inline_syscall_cancel (__NR_sendto, fd, buf, len, flags, NULL, 0);
 #else
-  return SOCKETCALL_CANCEL (send, fd, buf, len, flags);
+  return socketcall_cancel (send, fd, buf, len, flags);
 #endif
 }
 weak_alias (__libc_send, send)
diff --git a/sysdeps/unix/sysv/linux/sendmmsg.c b/sysdeps/unix/sysv/linux/sendmmsg.c
index 378de59c64..2a14303a95 100644
--- a/sysdeps/unix/sysv/linux/sendmmsg.c
+++ b/sysdeps/unix/sysv/linux/sendmmsg.c
@@ -28,9 +28,9 @@ int
 __sendmmsg (int fd, struct mmsghdr *vmessages, unsigned int vlen, int flags)
 {
 #ifdef __ASSUME_SENDMMSG_SYSCALL
-  return SYSCALL_CANCEL (sendmmsg, fd, vmessages, vlen, flags);
+  return inline_syscall_cancel (__NR_sendmmsg, fd, vmessages, vlen, flags);
 #else
-  return SOCKETCALL_CANCEL (sendmmsg, fd, vmessages, vlen, flags);
+  return socketcall_cancel (sendmmsg, fd, vmessages, vlen, flags);
 #endif
 }
 libc_hidden_def (__sendmmsg)
diff --git a/sysdeps/unix/sysv/linux/sendmsg.c b/sysdeps/unix/sysv/linux/sendmsg.c
index f8f955098f..12f69b06d1 100644
--- a/sysdeps/unix/sysv/linux/sendmsg.c
+++ b/sysdeps/unix/sysv/linux/sendmsg.c
@@ -25,9 +25,9 @@ ssize_t
 __libc_sendmsg (int fd, const struct msghdr *msg, int flags)
 {
 # ifdef __ASSUME_SENDMSG_SYSCALL
-  return SYSCALL_CANCEL (sendmsg, fd, msg, flags);
+  return inline_syscall_cancel (__NR_sendmsg, fd, msg, flags);
 # else
-  return SOCKETCALL_CANCEL (sendmsg, fd, msg, flags);
+  return socketcall_cancel (sendmsg, fd, msg, flags);
 # endif
 }
 weak_alias (__libc_sendmsg, sendmsg)
diff --git a/sysdeps/unix/sysv/linux/sendto.c b/sysdeps/unix/sysv/linux/sendto.c
index 670d0679ea..524e3b532c 100644
--- a/sysdeps/unix/sysv/linux/sendto.c
+++ b/sysdeps/unix/sysv/linux/sendto.c
@@ -24,11 +24,11 @@ __libc_sendto (int fd, const void *buf, size_t len, int flags,
 	       __CONST_SOCKADDR_ARG addr, socklen_t addrlen)
 {
 #ifdef __ASSUME_SENDTO_SYSCALL
-  return SYSCALL_CANCEL (sendto, fd, buf, len, flags, addr.__sockaddr__,
-                         addrlen);
+  return inline_syscall_cancel (__NR_sendto, fd, buf, len, flags,
+				addr.__sockaddr__, addrlen);
 #else
-  return SOCKETCALL_CANCEL (sendto, fd, buf, len, flags, addr.__sockaddr__,
-			    addrlen);
+  return socketcall_cancel (sendto, fd, buf, len, flags,
+			    addr.__sockaddr__, addrlen);
 #endif
 }
 weak_alias (__libc_sendto, sendto)
diff --git a/sysdeps/unix/sysv/linux/setegid.c b/sysdeps/unix/sysv/linux/setegid.c
index ce8bead278..1de1039b46 100644
--- a/sysdeps/unix/sysv/linux/setegid.c
+++ b/sysdeps/unix/sysv/linux/setegid.c
@@ -26,12 +26,12 @@ setegid (gid_t gid)
   int result;
 
   if (gid == (gid_t) ~0)
-    return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
+    return __syscall_ret_err (EINVAL);
 
 #ifdef __NR_setresgid32
-  result = INLINE_SETXID_SYSCALL (setresgid32, 3, -1, gid, -1);
+  result = inline_setxid_syscall (__NR_setresgid32, -1, gid, -1);
 #else
-  result = INLINE_SETXID_SYSCALL (setresgid, 3, -1, gid, -1);
+  result = inline_setxid_syscall (__NR_setresgid, -1, gid, -1);
 #endif
 
   return result;
diff --git a/sysdeps/unix/sysv/linux/seteuid.c b/sysdeps/unix/sysv/linux/seteuid.c
index 4519ac2db6..70d60e7249 100644
--- a/sysdeps/unix/sysv/linux/seteuid.c
+++ b/sysdeps/unix/sysv/linux/seteuid.c
@@ -26,12 +26,12 @@ seteuid (uid_t uid)
   int result;
 
   if (uid == (uid_t) ~0)
-    return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
+    return __syscall_ret_err (EINVAL);
 
 #ifdef __NR_setresuid32
-  result = INLINE_SETXID_SYSCALL (setresuid32, 3, -1, uid, -1);
+  result = inline_setxid_syscall (__NR_setresuid32,  -1, uid, -1);
 #else
-  result = INLINE_SETXID_SYSCALL (setresuid, 3, -1, uid, -1);
+  result = inline_setxid_syscall (__NR_setresuid, -1, uid, -1);
 #endif
 
   return result;
diff --git a/sysdeps/unix/sysv/linux/setgid.c b/sysdeps/unix/sysv/linux/setgid.c
index 9896996c3d..e79b948a8a 100644
--- a/sysdeps/unix/sysv/linux/setgid.c
+++ b/sysdeps/unix/sysv/linux/setgid.c
@@ -24,9 +24,9 @@ int
 __setgid (gid_t gid)
 {
 #ifdef __NR_setgid32
-  return INLINE_SETXID_SYSCALL (setgid32, 1, gid);
+  return inline_setxid_syscall (__NR_setgid32, gid);
 #else
-  return INLINE_SETXID_SYSCALL (setgid, 1, gid);
+  return inline_setxid_syscall (__NR_setgid, gid);
 #endif
 }
 #ifndef __setgid
diff --git a/sysdeps/unix/sysv/linux/setgroups.c b/sysdeps/unix/sysv/linux/setgroups.c
index 77961ea7ae..a06fb759fb 100644
--- a/sysdeps/unix/sysv/linux/setgroups.c
+++ b/sysdeps/unix/sysv/linux/setgroups.c
@@ -28,9 +28,9 @@ int
 setgroups (size_t n, const gid_t *groups)
 {
 #ifdef __NR_setgroups32
-  return INLINE_SETXID_SYSCALL (setgroups32, 2, n, groups);
+  return inline_setxid_syscall (__NR_setgroups32, n, groups);
 #else
-  return INLINE_SETXID_SYSCALL (setgroups, 2, n, groups);
+  return inline_setxid_syscall (__NR_setgroups, n, groups);
 #endif
 }
 libc_hidden_def (setgroups)
diff --git a/sysdeps/unix/sysv/linux/setitimer.c b/sysdeps/unix/sysv/linux/setitimer.c
index 03aff21f11..3dc652f933 100644
--- a/sysdeps/unix/sysv/linux/setitimer.c
+++ b/sysdeps/unix/sysv/linux/setitimer.c
@@ -28,7 +28,7 @@ __setitimer64 (__itimer_which_t which,
                struct __itimerval64 *restrict old_value)
 {
 #if __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64
-  return INLINE_SYSCALL_CALL (setitimer, which, new_value, old_value);
+  return inline_syscall (__NR_setitimer, which, new_value, old_value);
 #else
   struct __itimerval32 new_value_32;
 
@@ -44,10 +44,10 @@ __setitimer64 (__itimer_which_t which,
     = valid_timeval64_to_timeval32 (new_value->it_value);
 
   if (old_value == NULL)
-    return INLINE_SYSCALL_CALL (setitimer, which, &new_value_32, NULL);
+    return inline_syscall (__NR_setitimer, which, &new_value_32, NULL);
 
   struct __itimerval32 old_value_32;
-  if (INLINE_SYSCALL_CALL (setitimer, which, &new_value_32, &old_value_32)
+  if (inline_syscall (__NR_setitimer, which, &new_value_32, &old_value_32)
       == -1)
     return -1;
 
diff --git a/sysdeps/unix/sysv/linux/setregid.c b/sysdeps/unix/sysv/linux/setregid.c
index 810d7320b2..52a2a9a605 100644
--- a/sysdeps/unix/sysv/linux/setregid.c
+++ b/sysdeps/unix/sysv/linux/setregid.c
@@ -24,9 +24,9 @@ int
 __setregid (gid_t rgid, gid_t egid)
 {
 #ifdef __NR_setregid32
-  return INLINE_SETXID_SYSCALL (setregid32, 2, rgid, egid);
+  return inline_setxid_syscall (__NR_setregid32, rgid, egid);
 #else
-  return INLINE_SETXID_SYSCALL (setregid, 2, rgid, egid);
+  return inline_setxid_syscall (__NR_setregid, rgid, egid);
 #endif
 }
 #ifndef __setregid
diff --git a/sysdeps/unix/sysv/linux/setresgid.c b/sysdeps/unix/sysv/linux/setresgid.c
index 4e04aa3172..334864c0ee 100644
--- a/sysdeps/unix/sysv/linux/setresgid.c
+++ b/sysdeps/unix/sysv/linux/setresgid.c
@@ -24,9 +24,9 @@ int
 __setresgid (gid_t rgid, gid_t egid, gid_t sgid)
 {
 #ifdef __NR_setresgid32
-  return INLINE_SETXID_SYSCALL (setresgid32, 3, rgid, egid, sgid);
+  return inline_setxid_syscall (__NR_setresgid32, rgid, egid, sgid);
 #else
-  return INLINE_SETXID_SYSCALL (setresgid, 3, rgid, egid, sgid);
+  return inline_setxid_syscall (__NR_setresgid, rgid, egid, sgid);
 #endif
 }
 libc_hidden_def (__setresgid)
diff --git a/sysdeps/unix/sysv/linux/setresuid.c b/sysdeps/unix/sysv/linux/setresuid.c
index 8dcf445730..8ce0e14550 100644
--- a/sysdeps/unix/sysv/linux/setresuid.c
+++ b/sysdeps/unix/sysv/linux/setresuid.c
@@ -24,9 +24,9 @@ int
 __setresuid (uid_t ruid, uid_t euid, uid_t suid)
 {
 #ifdef __NR_setresuid32
-  return INLINE_SETXID_SYSCALL (setresuid32, 3, ruid, euid, suid);
+  return inline_setxid_syscall (__NR_setresuid32, ruid, euid, suid);
 #else
-  return INLINE_SETXID_SYSCALL (setresuid, 3, ruid, euid, suid);
+  return inline_setxid_syscall (__NR_setresuid, ruid, euid, suid);
 #endif
 }
 libc_hidden_def (__setresuid)
diff --git a/sysdeps/unix/sysv/linux/setreuid.c b/sysdeps/unix/sysv/linux/setreuid.c
index e2f53bc9f2..b32a901729 100644
--- a/sysdeps/unix/sysv/linux/setreuid.c
+++ b/sysdeps/unix/sysv/linux/setreuid.c
@@ -24,9 +24,9 @@ int
 __setreuid (uid_t ruid, uid_t euid)
 {
 #ifdef __NR_setreuid32
-  return INLINE_SETXID_SYSCALL (setreuid32, 2, ruid, euid);
+  return inline_setxid_syscall (__NR_setreuid32, ruid, euid);
 #else
-  return INLINE_SETXID_SYSCALL (setreuid, 2, ruid, euid);
+  return inline_setxid_syscall (__NR_setreuid, ruid, euid);
 #endif
 }
 #ifndef __setreuid
diff --git a/sysdeps/unix/sysv/linux/setrlimit.c b/sysdeps/unix/sysv/linux/setrlimit.c
index 4de5f6ccfa..d813df62ea 100644
--- a/sysdeps/unix/sysv/linux/setrlimit.c
+++ b/sysdeps/unix/sysv/linux/setrlimit.c
@@ -45,7 +45,7 @@ __setrlimit (enum __rlimit_resource resource, const struct rlimit *rlim)
   else
     rlim64.rlim_max = rlim->rlim_max;
 
-  return INLINE_SYSCALL_CALL (prlimit64, 0, resource, &rlim64, NULL);
+  return inline_syscall (__NR_prlimit64, 0, resource, &rlim64, NULL);
 }
 
 libc_hidden_def (__setrlimit)
diff --git a/sysdeps/unix/sysv/linux/setrlimit64.c b/sysdeps/unix/sysv/linux/setrlimit64.c
index 02c94e3c73..ee5b4273f3 100644
--- a/sysdeps/unix/sysv/linux/setrlimit64.c
+++ b/sysdeps/unix/sysv/linux/setrlimit64.c
@@ -37,7 +37,7 @@
 int
 __setrlimit64 (enum __rlimit_resource resource, const struct rlimit64 *rlimits)
 {
-  return INLINE_SYSCALL_CALL (prlimit64, 0, resource, rlimits, NULL);
+  return inline_syscall (__NR_prlimit64, 0, resource, rlimits, NULL);
 }
 /* Alpha defines a versioned setrlimit{64}.  */
 #ifndef USE_VERSIONED_RLIMIT
diff --git a/sysdeps/unix/sysv/linux/setsockopt.c b/sysdeps/unix/sysv/linux/setsockopt.c
index 20c0868783..38e714855e 100644
--- a/sysdeps/unix/sysv/linux/setsockopt.c
+++ b/sysdeps/unix/sysv/linux/setsockopt.c
@@ -27,9 +27,9 @@ int
 setsockopt (int fd, int level, int optname, const void *optval, socklen_t len)
 {
 #ifdef __ASSUME_SETSOCKOPT_SYSCALL
-  return INLINE_SYSCALL (setsockopt, 5, fd, level, optname, optval, len);
+  return inline_syscall (__NR_setsockopt, fd, level, optname, optval, len);
 #else
-  return SOCKETCALL (setsockopt, fd, level, optname, optval, len);
+  return socketcall (setsockopt, fd, level, optname, optval, len);
 #endif
 }
 weak_alias (setsockopt, __setsockopt)
diff --git a/sysdeps/unix/sysv/linux/settimezone.c b/sysdeps/unix/sysv/linux/settimezone.c
index 163956275f..85f92ffd44 100644
--- a/sysdeps/unix/sysv/linux/settimezone.c
+++ b/sysdeps/unix/sysv/linux/settimezone.c
@@ -29,7 +29,7 @@ int
 __settimezone (const struct timezone *tz)
 {
 #ifdef __NR_settimeofday
-  return INLINE_SYSCALL_CALL (settimeofday, NULL, tz);
+  return inline_syscall (__NR_settimeofday, NULL, tz);
 #else
   __set_errno (ENOSYS);
   return -1;
diff --git a/sysdeps/unix/sysv/linux/setuid.c b/sysdeps/unix/sysv/linux/setuid.c
index e5773b8166..3e59c6c8f6 100644
--- a/sysdeps/unix/sysv/linux/setuid.c
+++ b/sysdeps/unix/sysv/linux/setuid.c
@@ -23,9 +23,9 @@ int
 __setuid (uid_t uid)
 {
 #ifdef __NR_setuid32
-  return INLINE_SETXID_SYSCALL (setuid32, 1, uid);
+  return inline_setxid_syscall (__NR_setuid32, uid);
 #else
-  return INLINE_SETXID_SYSCALL (setuid, 1, uid);
+  return inline_setxid_syscall (__NR_setuid, uid);
 #endif
 }
 #ifndef __setuid
diff --git a/sysdeps/unix/sysv/linux/shmat.c b/sysdeps/unix/sysv/linux/shmat.c
index 3bc791c05f..528f9a4b0f 100644
--- a/sysdeps/unix/sysv/linux/shmat.c
+++ b/sysdeps/unix/sysv/linux/shmat.c
@@ -29,16 +29,14 @@ void *
 shmat (int shmid, const void *shmaddr, int shmflg)
 {
 #ifdef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
-  return (void*) INLINE_SYSCALL_CALL (shmat, shmid, shmaddr, shmflg);
+  return (void*) inline_syscall (__NR_shmat, shmid, shmaddr, shmflg);
 #else
   unsigned long resultvar;
   void *raddr;
 
-  resultvar = INTERNAL_SYSCALL_CALL (ipc, IPCOP_shmat, shmid, shmflg,
-				     &raddr, shmaddr);
-  if (INTERNAL_SYSCALL_ERROR_P (resultvar))
-    return (void *) INLINE_SYSCALL_ERROR_RETURN_VALUE (INTERNAL_SYSCALL_ERRNO (resultvar));
-
-  return raddr;
+  resultvar = internal_syscall (__NR_ipc, IPCOP_shmat, shmid, shmflg,
+				&raddr, shmaddr);
+  return __syscall_err (resultvar) ? (void *)__syscall_ret (resultvar)
+				   : raddr;
 #endif
 }
diff --git a/sysdeps/unix/sysv/linux/shmctl.c b/sysdeps/unix/sysv/linux/shmctl.c
index f41b359b8b..9d9feb320b 100644
--- a/sysdeps/unix/sysv/linux/shmctl.c
+++ b/sysdeps/unix/sysv/linux/shmctl.c
@@ -36,10 +36,10 @@ static int
 shmctl_syscall (int shmid, int cmd, struct shmid_ds *buf)
 {
 #ifdef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
-  return INLINE_SYSCALL_CALL (shmctl, shmid, cmd | __IPC_64, buf);
+  return inline_syscall (__NR_shmctl, shmid, cmd | __IPC_64, buf);
 #else
-  return INLINE_SYSCALL_CALL (ipc, IPCOP_shmctl, shmid, cmd | __IPC_64, 0,
-			      buf);
+  return inline_syscall (__NR_ipc, IPCOP_shmctl, shmid, cmd | __IPC_64, 0,
+			 buf);
 #endif
 }
 
@@ -122,9 +122,9 @@ __old_shmctl (int shmid, int cmd, struct __old_shmid_ds *buf)
   /* For architecture that have wire-up shmctl but also have __IPC_64 to a
      value different than default (0x0), it means the compat symbol used the
      __NR_ipc syscall.  */
-  return INLINE_SYSCALL_CALL (shmctl, shmid, cmd, buf);
+  return inline_syscall (__NR_shmctl, shmid, cmd, buf);
 #else
-  return INLINE_SYSCALL_CALL (ipc, IPCOP_shmctl, shmid, cmd, 0, buf);
+  return inline_syscall (__NR_ipc, IPCOP_shmctl, shmid, cmd, 0, buf);
 #endif
 }
 compat_symbol (libc, __old_shmctl, shmctl, GLIBC_2_0);
diff --git a/sysdeps/unix/sysv/linux/shmdt.c b/sysdeps/unix/sysv/linux/shmdt.c
index c506064a48..b386fe9f36 100644
--- a/sysdeps/unix/sysv/linux/shmdt.c
+++ b/sysdeps/unix/sysv/linux/shmdt.c
@@ -28,8 +28,8 @@ int
 shmdt (const void *shmaddr)
 {
 #ifdef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
-  return INLINE_SYSCALL_CALL (shmdt, shmaddr);
+  return inline_syscall (__NR_shmdt, shmaddr);
 #else
-  return INLINE_SYSCALL_CALL (ipc, IPCOP_shmdt, 0, 0, 0, shmaddr);
+  return inline_syscall (__NR_ipc, IPCOP_shmdt, 0, 0, 0, shmaddr);
 #endif
 }
diff --git a/sysdeps/unix/sysv/linux/shmget.c b/sysdeps/unix/sysv/linux/shmget.c
index 6ea788351b..cb0264607e 100644
--- a/sysdeps/unix/sysv/linux/shmget.c
+++ b/sysdeps/unix/sysv/linux/shmget.c
@@ -28,8 +28,8 @@ int
 shmget (key_t key, size_t size, int shmflg)
 {
 #ifdef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
-  return INLINE_SYSCALL_CALL (shmget, key, size, shmflg, NULL);
+  return inline_syscall (__NR_shmget, key, size, shmflg, NULL);
 #else
-  return INLINE_SYSCALL_CALL (ipc, IPCOP_shmget, key, size, shmflg, NULL);
+  return inline_syscall (__NR_ipc, IPCOP_shmget, key, size, shmflg, NULL);
 #endif
 }
diff --git a/sysdeps/unix/sysv/linux/shutdown.c b/sysdeps/unix/sysv/linux/shutdown.c
index 0045ccb978..4c12d013e4 100644
--- a/sysdeps/unix/sysv/linux/shutdown.c
+++ b/sysdeps/unix/sysv/linux/shutdown.c
@@ -27,9 +27,9 @@ int
 __shutdown (int fd, int how)
 {
 #ifdef __ASSUME_SHUTDOWN_SYSCALL
-  return INLINE_SYSCALL (shutdown, 2, fd, how);
+  return inline_syscall (__NR_shutdown, fd, how);
 #else
-  return SOCKETCALL (shutdown, fd, how);
+  return socketcall (shutdown, fd, how);
 #endif
 }
 weak_alias (__shutdown, shutdown)
diff --git a/sysdeps/unix/sysv/linux/sigaction.c b/sysdeps/unix/sysv/linux/sigaction.c
index 4e6d11a6ae..8544780f32 100644
--- a/sysdeps/unix/sysv/linux/sigaction.c
+++ b/sysdeps/unix/sysv/linux/sigaction.c
@@ -55,7 +55,7 @@ __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
 
   /* XXX The size argument hopefully will have to be changed to the
      real size of the user-level sigset_t.  */
-  result = INLINE_SYSCALL_CALL (rt_sigaction, sig,
+  result = inline_syscall (__NR_rt_sigaction, sig,
 				act ? &kact : NULL,
 				oact ? &koact : NULL, STUB (act, _NSIG / 8));
 
diff --git a/sysdeps/unix/sysv/linux/signalfd.c b/sysdeps/unix/sysv/linux/signalfd.c
index 64d7bccba9..0413619c97 100644
--- a/sysdeps/unix/sysv/linux/signalfd.c
+++ b/sysdeps/unix/sysv/linux/signalfd.c
@@ -24,5 +24,5 @@
 int
 signalfd (int fd, const sigset_t *mask, int flags)
 {
-  return INLINE_SYSCALL (signalfd4, 4, fd, mask, _NSIG / 8, flags);
+  return inline_syscall (__NR_signalfd4, fd, mask, _NSIG / 8, flags);
 }
diff --git a/sysdeps/unix/sysv/linux/sigpending.c b/sysdeps/unix/sysv/linux/sigpending.c
index 458a3cf99e..98db24b83b 100644
--- a/sysdeps/unix/sysv/linux/sigpending.c
+++ b/sysdeps/unix/sysv/linux/sigpending.c
@@ -24,5 +24,5 @@
 int
 sigpending (sigset_t *set)
 {
-  return INLINE_SYSCALL (rt_sigpending, 2, set, _NSIG / 8);
+  return inline_syscall (__NR_rt_sigpending, set, _NSIG / 8);
 }
diff --git a/sysdeps/unix/sysv/linux/sigqueue.c b/sysdeps/unix/sysv/linux/sigqueue.c
index 129b5604a2..1ae6a522aa 100644
--- a/sysdeps/unix/sysv/linux/sigqueue.c
+++ b/sysdeps/unix/sysv/linux/sigqueue.c
@@ -37,6 +37,6 @@ __sigqueue (pid_t pid, int sig, const union sigval val)
   info.si_uid = __getuid ();
   info.si_value = val;
 
-  return INLINE_SYSCALL_CALL (rt_sigqueueinfo, pid, sig, &info);
+  return inline_syscall (__NR_rt_sigqueueinfo, pid, sig, &info);
 }
 weak_alias (__sigqueue, sigqueue)
diff --git a/sysdeps/unix/sysv/linux/sigsuspend.c b/sysdeps/unix/sysv/linux/sigsuspend.c
index dd5df5af25..6ac7303e31 100644
--- a/sysdeps/unix/sysv/linux/sigsuspend.c
+++ b/sysdeps/unix/sysv/linux/sigsuspend.c
@@ -23,7 +23,7 @@
 int
 __sigsuspend (const sigset_t *set)
 {
-  return SYSCALL_CANCEL (rt_sigsuspend, set, _NSIG / 8);
+  return inline_syscall_cancel (__NR_rt_sigsuspend, set, _NSIG / 8);
 }
 libc_hidden_def (__sigsuspend)
 weak_alias (__sigsuspend, sigsuspend)
diff --git a/sysdeps/unix/sysv/linux/sigtimedwait.c b/sysdeps/unix/sysv/linux/sigtimedwait.c
index 6b3d8f705f..59101252c4 100644
--- a/sysdeps/unix/sysv/linux/sigtimedwait.c
+++ b/sysdeps/unix/sysv/linux/sigtimedwait.c
@@ -26,7 +26,8 @@ __sigtimedwait (const sigset_t *set, siginfo_t *info,
 {
   /* XXX The size argument hopefully will have to be changed to the
      real size of the user-level sigset_t.  */
-  int result = SYSCALL_CANCEL (rt_sigtimedwait, set, info, timeout, _NSIG / 8);
+  int result = inline_syscall_cancel (__NR_rt_sigtimedwait, set, info,
+				      timeout, _NSIG / 8);
 
   /* The kernel generates a SI_TKILL code in si_code in case tkill is
      used.  tkill is transparently used in raise().  Since having
diff --git a/sysdeps/unix/sysv/linux/socket.c b/sysdeps/unix/sysv/linux/socket.c
index efa0e34467..cb5ac1281d 100644
--- a/sysdeps/unix/sysv/linux/socket.c
+++ b/sysdeps/unix/sysv/linux/socket.c
@@ -27,9 +27,9 @@ int
 __socket (int fd, int type, int domain)
 {
 #ifdef __ASSUME_SOCKET_SYSCALL
-  return INLINE_SYSCALL (socket, 3, fd, type, domain);
+  return inline_syscall (__NR_socket, fd, type, domain);
 #else
-  return SOCKETCALL (socket, fd, type, domain);
+  return socketcall (socket, fd, type, domain);
 #endif
 }
 libc_hidden_def (__socket)
diff --git a/sysdeps/unix/sysv/linux/socketcall.h b/sysdeps/unix/sysv/linux/socketcall.h
index b9975f92b4..9a227f7508 100644
--- a/sysdeps/unix/sysv/linux/socketcall.h
+++ b/sysdeps/unix/sysv/linux/socketcall.h
@@ -102,5 +102,41 @@
     sc_ret;								\
   })
 
+#define __socketcall1(name, a1)						\
+  inline_syscall (__NR_socketcall, SOCKOP_##name,			\
+     ((__syscall_arg_t [1]) { ARGIFY (a1) }))
+#define __socketcall2(name, a1, a2)					\
+  inline_syscall (__NR_socketcall, SOCKOP_##name,			\
+     ((__syscall_arg_t [2]) { ARGIFY (a1), ARGIFY (a2) }))
+#define __socketcall3(name, a1, a2, a3)					\
+  inline_syscall (__NR_socketcall, SOCKOP_##name,			\
+     ((__syscall_arg_t [3]) { ARGIFY (a1), ARGIFY (a2), ARGIFY (a3) }))
+#define __socketcall4(name, a1, a2, a3, a4)				\
+  inline_syscall (__NR_socketcall, SOCKOP_##name,			\
+     ((__syscall_arg_t [4]) { ARGIFY (a1), ARGIFY (a2), ARGIFY (a3),	\
+			      ARGIFY (a4) }))
+#define __socketcall5(name, a1, a2, a3, a4, a5)				\
+  inline_syscall (__NR_socketcall, SOCKOP_##name,			\
+     ((__syscall_arg_t [5]) { ARGIFY (a1), ARGIFY (a2), ARGIFY (a3),	\
+			      ARGIFY (a4), ARGIFY (a5) }))
+#define __socketcall6(name, a1, a2, a3, a4, a5, a6)			\
+  inline_syscall (__NR_socketcall, SOCKOP_##name,			\
+     ((__syscall_arg_t [6]) { ARGIFY (a1), ARGIFY (a2), ARGIFY (a3),	\
+			      ARGIFY (a4), ARGIFY (a5), ARGIFY (a6) }))
+
+#define socketcall(...)							\
+  __SOCKETCALL_DISP (__socketcall, __VA_ARGS__)
+
+#define socketcall_cancel(...) 						\
+  ({									\
+    long int __sc_ret;							\
+    int __sc_cancel_oldtype = -1;					\
+    if (! SINGLE_THREAD_P)						\
+      __sc_cancel_oldtype = LIBC_CANCEL_ASYNC ();			\
+    __sc_ret = socketcall (__VA_ARGS__);				\
+    if (__sc_cancel_oldtype != -1)					\
+      LIBC_CANCEL_RESET (__sc_cancel_oldtype);				\
+    __sc_ret;								\
+  })
 
 #endif /* sys/socketcall.h */
diff --git a/sysdeps/unix/sysv/linux/socketpair.c b/sysdeps/unix/sysv/linux/socketpair.c
index 0ca03aa8dc..859f012ea0 100644
--- a/sysdeps/unix/sysv/linux/socketpair.c
+++ b/sysdeps/unix/sysv/linux/socketpair.c
@@ -27,9 +27,9 @@ int
 __socketpair (int domain, int type, int protocol, int sv[2])
 {
 #ifdef __ASSUME_SOCKETPAIR_SYSCALL
-  return INLINE_SYSCALL (socketpair, 4, domain, type, protocol, &sv[0]);
+  return inline_syscall (__NR_socketpair, domain, type, protocol, &sv[0]);
 #else
-  return SOCKETCALL (socketpair, domain, type, protocol, sv);
+  return socketcall (socketpair, domain, type, protocol, sv);
 #endif
 }
 weak_alias (__socketpair, socketpair)
diff --git a/sysdeps/unix/sysv/linux/spawni.c b/sysdeps/unix/sysv/linux/spawni.c
index aab777fb43..23f66831d4 100644
--- a/sysdeps/unix/sysv/linux/spawni.c
+++ b/sysdeps/unix/sysv/linux/spawni.c
@@ -80,7 +80,7 @@ static int local_seteuid (uid_t euid)
 #ifndef __NR_setresuid32
 # define __NR_setresuid32 __NR_setresuid
 #endif
-  return INLINE_SYSCALL_CALL (setresuid32, -1, euid, -1);
+  return inline_syscall (__NR_setresuid32, -1, euid, -1);
 }
 
 static int local_setegid (uid_t egid)
@@ -88,7 +88,7 @@ static int local_setegid (uid_t egid)
 #ifndef __NR_setresgid32
 # define __NR_setresgid32 __NR_setresgid
 #endif
-  return INLINE_SYSCALL_CALL (setresgid32, -1, egid, -1);
+  return inline_syscall (__NR_setresgid32, -1, egid, -1);
 }
 
 
diff --git a/sysdeps/unix/sysv/linux/speed.c b/sysdeps/unix/sysv/linux/speed.c
index d7d74ddb67..c150d15ef8 100644
--- a/sysdeps/unix/sysv/linux/speed.c
+++ b/sysdeps/unix/sysv/linux/speed.c
@@ -56,7 +56,7 @@ cfsetospeed (struct termios *termios_p, speed_t speed)
 {
   if ((speed & ~CBAUD) != 0
       && (speed < B57600 || speed > __MAX_BAUD))
-    return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
+    return __syscall_ret_err (EINVAL);
 
 #if _HAVE_STRUCT_TERMIOS_C_OSPEED
   termios_p->c_ospeed = speed;
@@ -78,7 +78,7 @@ cfsetispeed (struct termios *termios_p, speed_t speed)
 {
   if ((speed & ~CBAUD) != 0
       && (speed < B57600 || speed > __MAX_BAUD))
-    return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
+    return __syscall_ret_err (EINVAL);
 
 #if _HAVE_STRUCT_TERMIOS_C_ISPEED
   termios_p->c_ispeed = speed;
diff --git a/sysdeps/unix/sysv/linux/splice.c b/sysdeps/unix/sysv/linux/splice.c
index fe21cf1988..2f36d46151 100644
--- a/sysdeps/unix/sysv/linux/splice.c
+++ b/sysdeps/unix/sysv/linux/splice.c
@@ -23,5 +23,6 @@ ssize_t
 splice (int fd_in, loff_t *off_in, int fd_out, loff_t *off_out, size_t len,
 	unsigned int flags)
 {
-  return SYSCALL_CANCEL (splice, fd_in, off_in, fd_out, off_out, len, flags);
+  return inline_syscall_cancel (__NR_splice, fd_in, off_in, fd_out, off_out,
+				len, flags);
 }
diff --git a/sysdeps/unix/sysv/linux/statfs64.c b/sysdeps/unix/sysv/linux/statfs64.c
index c941128637..5e8f47cdb8 100644
--- a/sysdeps/unix/sysv/linux/statfs64.c
+++ b/sysdeps/unix/sysv/linux/statfs64.c
@@ -49,7 +49,7 @@ __statfs64 (const char *file, struct statfs64 *buf)
   if (! __no_statfs64)
 # endif
     {
-      int result = INLINE_SYSCALL (statfs64, 3, file, sizeof (*buf), buf);
+      int result = inline_syscall (__NR_statfs64, file, sizeof (*buf), buf);
 
 # if __ASSUME_STATFS64 == 0
       if (result == 0 || errno != ENOSYS)
diff --git a/sysdeps/unix/sysv/linux/statx.c b/sysdeps/unix/sysv/linux/statx.c
index cea6eefb7e..65f82797fd 100644
--- a/sysdeps/unix/sysv/linux/statx.c
+++ b/sysdeps/unix/sysv/linux/statx.c
@@ -25,7 +25,7 @@ int
 statx (int fd, const char *path, int flags,
        unsigned int mask, struct statx *buf)
 {
-  int ret = INLINE_SYSCALL_CALL (statx, fd, path, flags, mask, buf);
+  int ret = inline_syscall (__NR_statx, fd, path, flags, mask, buf);
 #ifdef __ASSUME_STATX
   return ret;
 #else
diff --git a/sysdeps/unix/sysv/linux/sync_file_range.c b/sysdeps/unix/sysv/linux/sync_file_range.c
index 18c43c54a8..d84f99d4c2 100644
--- a/sysdeps/unix/sysv/linux/sync_file_range.c
+++ b/sysdeps/unix/sysv/linux/sync_file_range.c
@@ -23,11 +23,11 @@ int
 sync_file_range (int fd, __off64_t offset, __off64_t len, unsigned int flags)
 {
 #if defined (__NR_sync_file_range2)
-  return SYSCALL_CANCEL (sync_file_range2, fd, flags, SYSCALL_LL64 (offset),
-			 SYSCALL_LL64 (len));
+  return inline_syscall_cancel (__NR_sync_file_range2, fd, flags,
+				SYSCALL_LL64 (offset), SYSCALL_LL64 (len));
 #elif defined (__NR_sync_file_range)
-  return SYSCALL_CANCEL (sync_file_range, fd,
-			 __ALIGNMENT_ARG SYSCALL_LL64 (offset),
-			 SYSCALL_LL64 (len), flags);
+  return inline_syscall_cancel (__NR_sync_file_range, fd,
+				__ALIGNMENT_ARG SYSCALL_LL64 (offset),
+				SYSCALL_LL64 (len), flags);
 #endif
 }
diff --git a/sysdeps/unix/sysv/linux/sysdep-vdso.h b/sysdeps/unix/sysv/linux/sysdep-vdso.h
index a9215494dc..d818d44b8b 100644
--- a/sysdeps/unix/sysv/linux/sysdep-vdso.h
+++ b/sysdeps/unix/sysv/linux/sysdep-vdso.h
@@ -36,17 +36,17 @@
     if (vdsop != NULL)							      \
       {									      \
 	sc_ret = INTERNAL_VSYSCALL_CALL (vdsop, nr, ##args);	      	      \
-	if (!INTERNAL_SYSCALL_ERROR_P (sc_ret))			      	      \
+	if (!__syscall_err (sc_ret))					      \
 	  goto out;							      \
-	if (INTERNAL_SYSCALL_ERRNO (sc_ret) != ENOSYS)		      	      \
+	if (sc_ret != -ENOSYS)						      \
 	  goto iserr;							      \
       }									      \
 									      \
-    sc_ret = INTERNAL_SYSCALL_CALL (name, ##args);		      	      \
-    if (INTERNAL_SYSCALL_ERROR_P (sc_ret))			      	      \
+    sc_ret = internal_syscall (__NR_##name, ##args);		      	      \
+    if (__syscall_err (sc_ret))						      \
       {									      \
       iserr:								      \
-        __set_errno (INTERNAL_SYSCALL_ERRNO (sc_ret));		      	      \
+        __set_errno (-sc_ret);						      \
         sc_ret = -1L;							      \
       }									      \
   out:									      \
diff --git a/sysdeps/unix/sysv/linux/sysdep.h b/sysdeps/unix/sysv/linux/sysdep.h
index 65441b8eee..d5e44cb5d4 100644
--- a/sysdeps/unix/sysv/linux/sysdep.h
+++ b/sysdeps/unix/sysv/linux/sysdep.h
@@ -65,13 +65,16 @@ static inline _Bool __syscall_err (unsigned long int val)
   return val > -4096UL;
 }
 
-static inline long __syscall_ret (unsigned long int val)
+static inline long int __syscall_ret_err (int err)
+{
+  __set_errno (err);
+  return -1;
+}
+
+static inline long int __syscall_ret (unsigned long int val)
 {
   if (__glibc_unlikely (__syscall_err (val)))
-    {
-       __set_errno (-val);
-       return -1;
-    }
+    return __syscall_ret_err (-val);
   return val;
 }
 #endif
diff --git a/sysdeps/unix/sysv/linux/tcdrain.c b/sysdeps/unix/sysv/linux/tcdrain.c
index 14ae76884d..d69fcbff00 100644
--- a/sysdeps/unix/sysv/linux/tcdrain.c
+++ b/sysdeps/unix/sysv/linux/tcdrain.c
@@ -25,6 +25,6 @@ int
 __libc_tcdrain (int fd)
 {
   /* With an argument of 1, TCSBRK for output to be drain.  */
-  return SYSCALL_CANCEL (ioctl, fd, TCSBRK, 1);
+  return inline_syscall_cancel (__NR_ioctl, fd, TCSBRK, 1);
 }
 weak_alias (__libc_tcdrain, tcdrain)
diff --git a/sysdeps/unix/sysv/linux/tcgetattr.c b/sysdeps/unix/sysv/linux/tcgetattr.c
index 2d687c38a0..c4b0daf61a 100644
--- a/sysdeps/unix/sysv/linux/tcgetattr.c
+++ b/sysdeps/unix/sysv/linux/tcgetattr.c
@@ -35,7 +35,7 @@ __tcgetattr (int fd, struct termios *termios_p)
   struct __kernel_termios k_termios;
   int retval;
 
-  retval = INLINE_SYSCALL (ioctl, 3, fd, TCGETS, &k_termios);
+  retval = inline_syscall (__NR_ioctl, fd, TCGETS, &k_termios);
 
   if (__glibc_likely (retval == 0))
     {
diff --git a/sysdeps/unix/sysv/linux/tcsendbrk.c b/sysdeps/unix/sysv/linux/tcsendbrk.c
index 5d81d86bb2..7c87f54116 100644
--- a/sysdeps/unix/sysv/linux/tcsendbrk.c
+++ b/sysdeps/unix/sysv/linux/tcsendbrk.c
@@ -39,6 +39,6 @@ tcsendbreak (int fd, int duration)
   /* ioctl can't send a break of any other duration for us.
      This could be changed to use trickery (e.g. lower speed and
      send a '\0') to send the break, but for now just return an error.  */
-  return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
+  return __syscall_ret_err (EINVAL);
 #endif
 }
diff --git a/sysdeps/unix/sysv/linux/tcsetattr.c b/sysdeps/unix/sysv/linux/tcsetattr.c
index 50b2b0af8a..5715f0e780 100644
--- a/sysdeps/unix/sysv/linux/tcsetattr.c
+++ b/sysdeps/unix/sysv/linux/tcsetattr.c
@@ -58,7 +58,7 @@ __tcsetattr (int fd, int optional_actions, const struct termios *termios_p)
       cmd = TCSETSF;
       break;
     default:
-      return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
+      return __syscall_ret_err (EINVAL);
     }
 
   k_termios.c_iflag = termios_p->c_iflag & ~IBAUD0;
@@ -75,7 +75,7 @@ __tcsetattr (int fd, int optional_actions, const struct termios *termios_p)
   memcpy (&k_termios.c_cc[0], &termios_p->c_cc[0],
 	  __KERNEL_NCCS * sizeof (cc_t));
 
-  return INLINE_SYSCALL (ioctl, 3, fd, cmd, &k_termios);
+  return inline_syscall (__NR_ioctl, fd, cmd, &k_termios);
 }
 weak_alias (__tcsetattr, tcsetattr)
 libc_hidden_def (tcsetattr)
diff --git a/sysdeps/unix/sysv/linux/tee.c b/sysdeps/unix/sysv/linux/tee.c
index 0e62c226dd..75b87de18f 100644
--- a/sysdeps/unix/sysv/linux/tee.c
+++ b/sysdeps/unix/sysv/linux/tee.c
@@ -22,5 +22,5 @@
 ssize_t
 tee (int src, int dest, size_t len, unsigned int flags)
 {
-  return SYSCALL_CANCEL (tee, src, dest, len, flags);
+  return inline_syscall_cancel (__NR_tee, src, dest, len, flags);
 }
diff --git a/sysdeps/unix/sysv/linux/time.c b/sysdeps/unix/sysv/linux/time.c
index 9d8e573c0a..69cba4e2bf 100644
--- a/sysdeps/unix/sysv/linux/time.c
+++ b/sysdeps/unix/sysv/linux/time.c
@@ -29,7 +29,7 @@
 static time_t
 time_syscall (time_t *t)
 {
-  return INLINE_SYSCALL_CALL (time, t);
+  return inline_syscall (__NR_time, t);
 }
 
 # undef INIT_ARCH
diff --git a/sysdeps/unix/sysv/linux/timer_create.c b/sysdeps/unix/sysv/linux/timer_create.c
index 370c99a517..40c44cd386 100644
--- a/sysdeps/unix/sysv/linux/timer_create.c
+++ b/sysdeps/unix/sysv/linux/timer_create.c
@@ -75,7 +75,7 @@ timer_create (clockid_t clock_id, struct sigevent *evp, timer_t *timerid)
 	  }
 
 	kernel_timer_t ktimerid;
-	int retval = INLINE_SYSCALL (timer_create, 3, syscall_clockid, evp,
+	int retval = inline_syscall (__NR_timer_create, syscall_clockid, evp,
 				     &ktimerid);
 
 	if (retval != -1)
@@ -149,9 +149,9 @@ timer_create (clockid_t clock_id, struct sigevent *evp, timer_t *timerid)
 
 	/* Create the timer.  */
 	int res;
-	res = INTERNAL_SYSCALL_CALL (timer_create,
-				     syscall_clockid, &sev, &newp->ktimerid);
-	if (! INTERNAL_SYSCALL_ERROR_P (res))
+	res = inline_syscall (__NR_timer_create,
+			      syscall_clockid, &sev, &newp->ktimerid);
+	if (res == 0)
 	  {
 	    /* Add to the queue of active timers with thread
 	       delivery.  */
@@ -167,9 +167,7 @@ timer_create (clockid_t clock_id, struct sigevent *evp, timer_t *timerid)
 	/* Free the resources.  */
 	free (newp);
 
-	__set_errno (INTERNAL_SYSCALL_ERRNO (res));
-
-	return -1;
+	return res;
       }
   }
 }
diff --git a/sysdeps/unix/sysv/linux/timer_delete.c b/sysdeps/unix/sysv/linux/timer_delete.c
index c240c06139..80d78c90f8 100644
--- a/sysdeps/unix/sysv/linux/timer_delete.c
+++ b/sysdeps/unix/sysv/linux/timer_delete.c
@@ -35,7 +35,7 @@ timer_delete (timer_t timerid)
   struct timer *kt = (struct timer *) timerid;
 
   /* Delete the kernel timer object.  */
-  int res = INLINE_SYSCALL (timer_delete, 1, kt->ktimerid);
+  int res = inline_syscall (__NR_timer_delete, kt->ktimerid);
 
   if (res == 0)
     {
diff --git a/sysdeps/unix/sysv/linux/timer_getoverr.c b/sysdeps/unix/sysv/linux/timer_getoverr.c
index 81b9723f01..7b859ad8d5 100644
--- a/sysdeps/unix/sysv/linux/timer_getoverr.c
+++ b/sysdeps/unix/sysv/linux/timer_getoverr.c
@@ -34,7 +34,7 @@ timer_getoverrun (timer_t timerid)
   struct timer *kt = (struct timer *) timerid;
 
   /* Get the information from the kernel.  */
-  int res = INLINE_SYSCALL (timer_getoverrun, 1, kt->ktimerid);
+  int res = inline_syscall (__NR_timer_getoverrun, kt->ktimerid);
 
   return res;
 }
diff --git a/sysdeps/unix/sysv/linux/timer_gettime.c b/sysdeps/unix/sysv/linux/timer_gettime.c
index 1e07d4845b..ab5247450d 100644
--- a/sysdeps/unix/sysv/linux/timer_gettime.c
+++ b/sysdeps/unix/sysv/linux/timer_gettime.c
@@ -32,15 +32,15 @@ __timer_gettime64 (timer_t timerid, struct __itimerspec64 *value)
 # ifndef __NR_timer_gettime64
 #  define __NR_timer_gettime64 __NR_timer_gettime
 # endif
-  return INLINE_SYSCALL_CALL (timer_gettime64, kt->ktimerid, value);
+  return inline_syscall (__NR_timer_gettime64, kt->ktimerid, value);
 #else
 # ifdef __NR_timer_gettime64
-  int ret = INLINE_SYSCALL_CALL (timer_gettime64, kt->ktimerid, value);
+  int ret = inline_syscall (__NR_timer_gettime64, kt->ktimerid, value);
   if (ret == 0 || errno != ENOSYS)
     return ret;
 # endif
   struct itimerspec its32;
-  int retval = INLINE_SYSCALL_CALL (timer_gettime, kt->ktimerid, &its32);
+  int retval = inline_syscall (__NR_timer_gettime, kt->ktimerid, &its32);
   if (retval == 0)
     {
       value->it_interval = valid_timespec_to_timespec64 (its32.it_interval);
diff --git a/sysdeps/unix/sysv/linux/timer_settime.c b/sysdeps/unix/sysv/linux/timer_settime.c
index c97a9e92ef..3405fffae6 100644
--- a/sysdeps/unix/sysv/linux/timer_settime.c
+++ b/sysdeps/unix/sysv/linux/timer_settime.c
@@ -34,12 +34,12 @@ __timer_settime64 (timer_t timerid, int flags,
 # ifndef __NR_timer_settime64
 #  define __NR_timer_settime64 __NR_timer_settime
 # endif
-  return INLINE_SYSCALL_CALL (timer_settime64, kt->ktimerid, flags, value,
-                              ovalue);
+  return inline_syscall (__NR_timer_settime64, kt->ktimerid, flags, value,
+                         ovalue);
 #else
 # ifdef __NR_timer_settime64
-  int ret = INLINE_SYSCALL_CALL (timer_settime64, kt->ktimerid, flags, value,
-                                 ovalue);
+  int ret = inline_syscall (__NR_timer_settime64, kt->ktimerid, flags, value,
+                            ovalue);
   if (ret == 0 || errno != ENOSYS)
     return ret;
 # endif
@@ -55,7 +55,7 @@ __timer_settime64 (timer_t timerid, int flags,
   its32.it_interval = valid_timespec64_to_timespec (value->it_interval);
   its32.it_value = valid_timespec64_to_timespec (value->it_value);
 
-  int retval = INLINE_SYSCALL_CALL (timer_settime, kt->ktimerid, flags,
+  int retval = inline_syscall (__NR_timer_settime, kt->ktimerid, flags,
                                     &its32, ovalue ? &oits32 : NULL);
   if (retval == 0 && ovalue)
     {
diff --git a/sysdeps/unix/sysv/linux/timerfd_gettime.c b/sysdeps/unix/sysv/linux/timerfd_gettime.c
index 7d09eeb11a..327367880e 100644
--- a/sysdeps/unix/sysv/linux/timerfd_gettime.c
+++ b/sysdeps/unix/sysv/linux/timerfd_gettime.c
@@ -29,15 +29,15 @@ __timerfd_gettime64 (int fd, struct __itimerspec64 *value)
 # ifndef __NR_timerfd_gettime64
 #  define __NR_timerfd_gettime64 __NR_timerfd_gettime
 # endif
-  return INLINE_SYSCALL_CALL (timerfd_gettime64, fd, value);
+  return inline_syscall (__NR_timerfd_gettime64, fd, value);
 #else
 # ifdef __NR_timerfd_gettime64
-  int ret = INLINE_SYSCALL_CALL (timerfd_gettime64, fd, value);
+  int ret = inline_syscall (__NR_timerfd_gettime64, fd, value);
   if (ret == 0 || errno != ENOSYS)
     return ret;
 # endif
   struct itimerspec its32;
-  int retval = INLINE_SYSCALL_CALL (timerfd_gettime, fd, &its32);
+  int retval = inline_syscall (__NR_timerfd_gettime, fd, &its32);
   if (retval == 0)
     {
       value->it_interval = valid_timespec_to_timespec64 (its32.it_interval);
diff --git a/sysdeps/unix/sysv/linux/timerfd_settime.c b/sysdeps/unix/sysv/linux/timerfd_settime.c
index 164b4e860a..bb6036c739 100644
--- a/sysdeps/unix/sysv/linux/timerfd_settime.c
+++ b/sysdeps/unix/sysv/linux/timerfd_settime.c
@@ -30,10 +30,10 @@ __timerfd_settime64 (int fd, int flags, const struct __itimerspec64 *value,
 # ifndef __NR_timerfd_settime64
 #  define __NR_timerfd_settime64 __NR_timerfd_settime
 # endif
-  return INLINE_SYSCALL_CALL (timerfd_settime64, fd, flags, value, ovalue);
+  return inline_syscall (__NR_timerfd_settime64, fd, flags, value, ovalue);
 #else
 # ifdef __NR_timerfd_settime64
-  int ret = INLINE_SYSCALL_CALL (timerfd_settime64, fd, flags, value, ovalue);
+  int ret = inline_syscall (__NR_timerfd_settime64, fd, flags, value, ovalue);
   if (ret == 0 || errno != ENOSYS)
     return ret;
 # endif
@@ -49,7 +49,7 @@ __timerfd_settime64 (int fd, int flags, const struct __itimerspec64 *value,
   its32.it_interval = valid_timespec64_to_timespec (value->it_interval);
   its32.it_value = valid_timespec64_to_timespec (value->it_value);
 
-  int retval = INLINE_SYSCALL_CALL (timerfd_settime, fd, flags,
+  int retval = inline_syscall (__NR_timerfd_settime, fd, flags,
                                     &its32, ovalue ? &oits32 : NULL);
   if (retval == 0 && ovalue)
     {
diff --git a/sysdeps/unix/sysv/linux/times.c b/sysdeps/unix/sysv/linux/times.c
index e3db9cb400..ff5cec5c89 100644
--- a/sysdeps/unix/sysv/linux/times.c
+++ b/sysdeps/unix/sysv/linux/times.c
@@ -23,9 +23,8 @@
 clock_t
 __times (struct tms *buf)
 {
-  clock_t ret = INTERNAL_SYSCALL_CALL (times, buf);
-  if (INTERNAL_SYSCALL_ERROR_P (ret)
-      && __glibc_unlikely (INTERNAL_SYSCALL_ERRNO (ret) == EFAULT)
+  clock_t ret = internal_syscall (__NR_times, buf);
+  if (__glibc_unlikely (-ret == EFAULT)
       && buf)
     {
       /* This might be an error or not.  For architectures which have no
diff --git a/sysdeps/unix/sysv/linux/truncate.c b/sysdeps/unix/sysv/linux/truncate.c
index f8596e80e0..f284bd7a39 100644
--- a/sysdeps/unix/sysv/linux/truncate.c
+++ b/sysdeps/unix/sysv/linux/truncate.c
@@ -25,10 +25,10 @@ int
 __truncate (const char *path, off_t length)
 {
 # ifndef __NR_truncate
-  return INLINE_SYSCALL_CALL (truncate64, path,
-			      __ALIGNMENT_ARG SYSCALL_LL (length));
+  return inline_syscall (__NR_truncate64, path,
+			 __ALIGNMENT_ARG SYSCALL_LL (length));
 # else
-  return INLINE_SYSCALL_CALL (truncate, path, length);
+  return inline_syscall (__NR_truncate, path, length);
 # endif
 }
 weak_alias (__truncate, truncate)
diff --git a/sysdeps/unix/sysv/linux/truncate64.c b/sysdeps/unix/sysv/linux/truncate64.c
index ac43a2b542..aa9fe7d2a8 100644
--- a/sysdeps/unix/sysv/linux/truncate64.c
+++ b/sysdeps/unix/sysv/linux/truncate64.c
@@ -26,8 +26,8 @@
 int
 __truncate64 (const char *path, off64_t length)
 {
-  return INLINE_SYSCALL_CALL (truncate64, path,
-			      __ALIGNMENT_ARG SYSCALL_LL64 (length));
+  return inline_syscall (__NR_truncate64, path,
+			 __ALIGNMENT_ARG SYSCALL_LL64 (length));
 }
 weak_alias (__truncate64, truncate64)
 
diff --git a/sysdeps/unix/sysv/linux/umount2.c b/sysdeps/unix/sysv/linux/umount2.c
index a91fd50733..a676323c78 100644
--- a/sysdeps/unix/sysv/linux/umount2.c
+++ b/sysdeps/unix/sysv/linux/umount2.c
@@ -22,7 +22,7 @@
 int
 __umount2 (const char *special_file, int flags)
 {
-  return INLINE_SYSCALL_CALL (umount2, special_file, flags);
+  return inline_syscall (__NR_umount2, special_file, flags);
 }
 libc_hidden_def (__umount2)
 
diff --git a/sysdeps/unix/sysv/linux/ustat.c b/sysdeps/unix/sysv/linux/ustat.c
index e38b792705..8a527240d5 100644
--- a/sysdeps/unix/sysv/linux/ustat.c
+++ b/sysdeps/unix/sysv/linux/ustat.c
@@ -31,7 +31,7 @@
     unsigned long long int k_dev;				\
     k_dev = dev & ((1ULL << 32) - 1);				\
     if (k_dev != dev)						\
-     return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);		\
+     return __syscall_ret_err (EINVAL);				\
     (unsigned int) k_dev;					\
   })
 # endif
@@ -48,9 +48,9 @@ int
 __old_ustat (dev_t dev, struct ustat *ubuf)
 {
 # ifdef __NR_ustat
-  return INLINE_SYSCALL_CALL (ustat, DEV_TO_KDEV (dev), ubuf);
+  return inline_syscall (__NR_ustat, DEV_TO_KDEV (dev), ubuf);
 # else
-  return INLINE_SYSCALL_ERROR_RETURN_VALUE (ENOSYS);
+  return __syscall_ret_err (ENOSYS);
 # endif
 }
 compat_symbol (libc, __old_ustat, ustat, GLIBC_2_0);
diff --git a/sysdeps/unix/sysv/linux/utimensat.c b/sysdeps/unix/sysv/linux/utimensat.c
index eb16f0f3d5..6172321304 100644
--- a/sysdeps/unix/sysv/linux/utimensat.c
+++ b/sysdeps/unix/sysv/linux/utimensat.c
@@ -32,10 +32,10 @@ __utimensat64_helper (int fd, const char *file,
 # ifndef __NR_utimensat_time64
 #  define __NR_utimensat_time64 __NR_utimensat
 # endif
-  return INLINE_SYSCALL (utimensat_time64, 4, fd, file, &tsp64[0], flags);
+  return inline_syscall (__NR_utimensat_time64, fd, file, &tsp64[0], flags);
 #else
 # ifdef __NR_utimensat_time64
-  int ret = INLINE_SYSCALL (utimensat_time64, 4, fd, file, &tsp64[0], flags);
+  int ret = inline_syscall (__NR_utimensat_time64, fd, file, &tsp64[0], flags);
   if (ret == 0 || errno != ENOSYS)
     return ret;
 # endif
@@ -54,7 +54,7 @@ __utimensat64_helper (int fd, const char *file,
       tsp32[1] = valid_timespec64_to_timespec (tsp64[1]);
     }
 
-  return INLINE_SYSCALL (utimensat, 4, fd, file, tsp64 ? &tsp32[0] : NULL,
+  return inline_syscall (__NR_utimensat, fd, file, tsp64 ? &tsp32[0] : NULL,
                          flags);
 #endif
 
@@ -70,7 +70,7 @@ __utimensat64 (int fd, const char *file, const struct __timespec64 tsp64[2],
                int flags)
 {
   if (file == NULL)
-    return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
+    return __syscall_ret_err (EINVAL);
 
   return __utimensat64_helper (fd, file, &tsp64[0], flags);
 }
diff --git a/sysdeps/unix/sysv/linux/vmsplice.c b/sysdeps/unix/sysv/linux/vmsplice.c
index 17cc7bf8e7..5576a6d196 100644
--- a/sysdeps/unix/sysv/linux/vmsplice.c
+++ b/sysdeps/unix/sysv/linux/vmsplice.c
@@ -23,5 +23,5 @@
 ssize_t
 vmsplice (int fd, const struct iovec *iov, size_t count, unsigned int flags)
 {
-  return SYSCALL_CANCEL (vmsplice, fd, iov, count, flags);
+  return inline_syscall_cancel (__NR_vmsplice, fd, iov, count, flags);
 }
diff --git a/sysdeps/unix/sysv/linux/wait4.c b/sysdeps/unix/sysv/linux/wait4.c
index 44c55f60fe..b7ef407b64 100644
--- a/sysdeps/unix/sysv/linux/wait4.c
+++ b/sysdeps/unix/sysv/linux/wait4.c
@@ -27,13 +27,13 @@ __wait4_time64 (pid_t pid, int *stat_loc, int options, struct __rusage64 *usage)
 {
 #ifdef __NR_wait4
 # if __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64
-  return SYSCALL_CANCEL (wait4, pid, stat_loc, options, usage);
+  return inline_syscall_cancel (__NR_wait4, pid, stat_loc, options, usage);
 # else
   pid_t ret;
   struct __rusage32 usage32;
 
-  ret = SYSCALL_CANCEL (wait4, pid, stat_loc, options,
-                        usage != NULL ? &usage32 : NULL);
+  ret = inline_syscall_cancel (__NR_wait4, pid, stat_loc, options,
+			       usage != NULL ? &usage32 : NULL);
 
   if (ret > 0 && usage != NULL)
     rusage32_to_rusage64 (&usage32, usage);
@@ -58,12 +58,14 @@ __wait4_time64 (pid_t pid, int *stat_loc, int options, struct __rusage64 *usage)
   siginfo_t infop;
 
 # if __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64
-  if (SYSCALL_CANCEL (waitid, idtype, pid, &infop, options, usage) < 0)
+  if (inline_syscall_cancel (__NR_waitid, idtype, pid, &infop, options, usage)
+			     < 0)
     return -1;
 # else
   {
     struct __rusage32 usage32;
-    if (SYSCALL_CANCEL (waitid, idtype, pid, &infop, options, &usage32) < 0)
+    if (inline_syscall_cancel (__NR_waitid, idtype, pid, &infop, options,
+			       &usage32) < 0)
       return -1;
     if (usage != NULL)
       rusage32_to_rusage64 (&usage32, usage);
diff --git a/sysdeps/unix/sysv/linux/waitid.c b/sysdeps/unix/sysv/linux/waitid.c
index 023fa95f4f..150605a600 100644
--- a/sysdeps/unix/sysv/linux/waitid.c
+++ b/sysdeps/unix/sysv/linux/waitid.c
@@ -26,7 +26,7 @@ __waitid (idtype_t idtype, id_t id, siginfo_t *infop, int options)
 {
   /* The unused fifth argument is a `struct rusage *' that we could
      pass if we were using waitid to simulate wait3/wait4.  */
-  return SYSCALL_CANCEL (waitid, idtype, id, infop, options, NULL);
+  return inline_syscall_cancel (__NR_waitid, idtype, id, infop, options, NULL);
 }
 weak_alias (__waitid, waitid)
 strong_alias (__waitid, __libc_waitid)
diff --git a/sysdeps/unix/sysv/linux/wordsize-64/fxstat.c b/sysdeps/unix/sysv/linux/wordsize-64/fxstat.c
index 24bfe847d7..54bd40ebb7 100644
--- a/sysdeps/unix/sysv/linux/wordsize-64/fxstat.c
+++ b/sysdeps/unix/sysv/linux/wordsize-64/fxstat.c
@@ -32,7 +32,7 @@ int
 __fxstat (int vers, int fd, struct stat *buf)
 {
   if (vers == _STAT_VER_KERNEL || vers == _STAT_VER_LINUX)
-    return INLINE_SYSCALL (fstat, 2, fd, buf);
+    return inline_syscall (__NR_fstat, fd, buf);
 
   __set_errno (EINVAL);
   return -1;
diff --git a/sysdeps/unix/sysv/linux/wordsize-64/fxstatat.c b/sysdeps/unix/sysv/linux/wordsize-64/fxstatat.c
index b8f5ab562e..6d00c2e069 100644
--- a/sysdeps/unix/sysv/linux/wordsize-64/fxstatat.c
+++ b/sysdeps/unix/sysv/linux/wordsize-64/fxstatat.c
@@ -40,7 +40,7 @@ __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag)
       return -1;
     }
 
-  return INLINE_SYSCALL (newfstatat, 4, fd, file, st, flag);
+  return inline_syscall (__NR_newfstatat, fd, file, st, flag);
 }
 libc_hidden_def (__fxstatat)
 #undef __fxstatat64
diff --git a/sysdeps/unix/sysv/linux/wordsize-64/lxstat.c b/sysdeps/unix/sysv/linux/wordsize-64/lxstat.c
index 156fbe7c64..19c6b43bf7 100644
--- a/sysdeps/unix/sysv/linux/wordsize-64/lxstat.c
+++ b/sysdeps/unix/sysv/linux/wordsize-64/lxstat.c
@@ -32,7 +32,7 @@ int
 __lxstat (int vers, const char *name, struct stat *buf)
 {
   if (vers == _STAT_VER_KERNEL || vers == _STAT_VER_LINUX)
-    return INLINE_SYSCALL (lstat, 2, name, buf);
+    return inline_syscall (__NR_lstat, name, buf);
 
   __set_errno (EINVAL);
   return -1;
diff --git a/sysdeps/unix/sysv/linux/wordsize-64/xstat.c b/sysdeps/unix/sysv/linux/wordsize-64/xstat.c
index 438d54d291..5976f1ec14 100644
--- a/sysdeps/unix/sysv/linux/wordsize-64/xstat.c
+++ b/sysdeps/unix/sysv/linux/wordsize-64/xstat.c
@@ -32,7 +32,7 @@ int
 __xstat (int vers, const char *name, struct stat *buf)
 {
   if (vers == _STAT_VER_KERNEL || vers == _STAT_VER_LINUX)
-    return INLINE_SYSCALL (stat, 2, name, buf);
+    return inline_syscall (__NR_stat, name, buf);
 
   __set_errno (EINVAL);
   return -1;
diff --git a/sysdeps/unix/sysv/linux/write.c b/sysdeps/unix/sysv/linux/write.c
index 7848f7de27..6a78854219 100644
--- a/sysdeps/unix/sysv/linux/write.c
+++ b/sysdeps/unix/sysv/linux/write.c
@@ -23,7 +23,7 @@
 ssize_t
 __libc_write (int fd, const void *buf, size_t nbytes)
 {
-  return SYSCALL_CANCEL (write, fd, buf, nbytes);
+  return inline_syscall_cancel (__NR_write, fd, buf, nbytes);
 }
 libc_hidden_def (__libc_write)
 
diff --git a/sysdeps/unix/sysv/linux/write_nocancel.c b/sysdeps/unix/sysv/linux/write_nocancel.c
index 36d406cf74..0df4804f4f 100644
--- a/sysdeps/unix/sysv/linux/write_nocancel.c
+++ b/sysdeps/unix/sysv/linux/write_nocancel.c
@@ -23,6 +23,6 @@
 ssize_t
 __write_nocancel (int fd, const void *buf, size_t nbytes)
 {
-  return INLINE_SYSCALL_CALL (write, fd, buf, nbytes);
+  return inline_syscall (__NR_write, fd, buf, nbytes);
 }
 hidden_def (__write_nocancel)
diff --git a/sysdeps/unix/sysv/linux/writev.c b/sysdeps/unix/sysv/linux/writev.c
index 8d628535f8..f7661ba8e8 100644
--- a/sysdeps/unix/sysv/linux/writev.c
+++ b/sysdeps/unix/sysv/linux/writev.c
@@ -23,7 +23,7 @@
 ssize_t
 __writev (int fd, const struct iovec *iov, int iovcnt)
 {
-  return SYSCALL_CANCEL (writev, fd, iov, iovcnt);
+  return inline_syscall_cancel (__NR_writev, fd, iov, iovcnt);
 }
 libc_hidden_def (__writev)
 weak_alias (__writev, writev)
diff --git a/sysdeps/unix/sysv/linux/xmknod.c b/sysdeps/unix/sysv/linux/xmknod.c
index 5d0ae97c34..b88702e0cb 100644
--- a/sysdeps/unix/sysv/linux/xmknod.c
+++ b/sysdeps/unix/sysv/linux/xmknod.c
@@ -33,14 +33,14 @@ __xmknod (int vers, const char *path, mode_t mode, dev_t *dev)
   unsigned long long int k_dev;
 
   if (vers != _MKNOD_VER)
-    return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
+    return __syscall_ret_err (EINVAL);
 
   /* We must convert the value to dev_t type used by the kernel.  */
   k_dev =  (*dev) & ((1ULL << 32) - 1);
   if (k_dev != *dev)
-    return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
+    return __syscall_ret_err (EINVAL);
 
-  return INLINE_SYSCALL (mknod, 3, path, mode, (unsigned int) k_dev);
+  return inline_syscall (__NR_mknod, path, mode, (unsigned int) k_dev);
 }
 
 weak_alias (__xmknod, _xmknod)
diff --git a/sysdeps/unix/sysv/linux/xmknodat.c b/sysdeps/unix/sysv/linux/xmknodat.c
index 5640a499aa..cfef1af819 100644
--- a/sysdeps/unix/sysv/linux/xmknodat.c
+++ b/sysdeps/unix/sysv/linux/xmknodat.c
@@ -34,14 +34,14 @@ int
 __xmknodat (int vers, int fd, const char *file, mode_t mode, dev_t *dev)
 {
   if (vers != _MKNOD_VER)
-    return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
+    return __syscall_ret_err (EINVAL);
 
   /* We must convert the value to dev_t type used by the kernel.  */
   unsigned long long int k_dev =  (*dev) & ((1ULL << 32) - 1);
   if (k_dev != *dev)
-    return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
+    return __syscall_ret_err (EINVAL);
 
-  return INLINE_SYSCALL (mknodat, 4, fd, file, mode, (unsigned int) k_dev);
+  return inline_syscall (__NR_mknodat, fd, file, mode, (unsigned int) k_dev);
 }
 
 libc_hidden_def (__xmknodat)
diff --git a/sysdeps/unix/sysv/linux/xstat.c b/sysdeps/unix/sysv/linux/xstat.c
index a93d635611..0c426efa09 100644
--- a/sysdeps/unix/sysv/linux/xstat.c
+++ b/sysdeps/unix/sysv/linux/xstat.c
@@ -35,15 +35,15 @@ int
 __xstat (int vers, const char *name, struct stat *buf)
 {
   if (vers == _STAT_VER_KERNEL)
-    return INLINE_SYSCALL (stat, 2, name, buf);
+    return inline_syscall (__NR_stat, name, buf);
 
 #ifdef STAT_IS_KERNEL_STAT
-  return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
+  return __syscall_ret_err (EINVAL);
 #else
   struct kernel_stat kbuf;
   int result;
 
-  result = INLINE_SYSCALL (stat, 2, name, &kbuf);
+  result = inline_syscall (__NR_stat, name, &kbuf);
   if (result == 0)
     result = __xstat_conv (vers, &kbuf, buf);
 
diff --git a/sysdeps/unix/sysv/linux/xstat64.c b/sysdeps/unix/sysv/linux/xstat64.c
index 16c6e69710..cffb1c70fb 100644
--- a/sysdeps/unix/sysv/linux/xstat64.c
+++ b/sysdeps/unix/sysv/linux/xstat64.c
@@ -30,7 +30,7 @@ int
 ___xstat64 (int vers, const char *name, struct stat64 *buf)
 {
   int result;
-  result = INLINE_SYSCALL (stat64, 2, name, buf);
+  result = inline_syscall (__NR_stat64, name, buf);
   return result;
 }
 
diff --git a/sysdeps/unix/sysv/linux/xstatconv.c b/sysdeps/unix/sysv/linux/xstatconv.c
index 89c803cce2..8e226a445b 100644
--- a/sysdeps/unix/sysv/linux/xstatconv.c
+++ b/sysdeps/unix/sysv/linux/xstatconv.c
@@ -96,7 +96,7 @@ __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
       break;
 
     default:
-      return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
+      return __syscall_ret_err (EINVAL);
     }
 
   return 0;
@@ -169,7 +169,7 @@ __xstat64_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
 	 _STAT_VER_KERNEL does not make sense.  */
     case _STAT_VER_KERNEL:
     default:
-      return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
+      return __syscall_ret_err (EINVAL);
     }
 
   return 0;
@@ -192,7 +192,7 @@ __xstat32_conv (int vers, struct stat64 *kbuf, struct stat *buf)
 	buf->st_ino = kbuf->st_ino;
 	if (sizeof (buf->st_ino) != sizeof (kbuf->st_ino)
 	    && buf->st_ino != kbuf->st_ino)
-	  return INLINE_SYSCALL_ERROR_RETURN_VALUE (EOVERFLOW);
+	  return __syscall_ret_err (EOVERFLOW);
 	buf->st_mode = kbuf->st_mode;
 	buf->st_nlink = kbuf->st_nlink;
 	buf->st_uid = kbuf->st_uid;
@@ -205,13 +205,13 @@ __xstat32_conv (int vers, struct stat64 *kbuf, struct stat *buf)
 	/* Check for overflow.  */
 	if (sizeof (buf->st_size) != sizeof (kbuf->st_size)
 	    && buf->st_size != kbuf->st_size)
-	  return INLINE_SYSCALL_ERROR_RETURN_VALUE (EOVERFLOW);
+	  return __syscall_ret_err (EOVERFLOW);
 	buf->st_blksize = kbuf->st_blksize;
 	buf->st_blocks = kbuf->st_blocks;
 	/* Check for overflow.  */
 	if (sizeof (buf->st_blocks) != sizeof (kbuf->st_blocks)
 	    && buf->st_blocks != kbuf->st_blocks)
-	  return INLINE_SYSCALL_ERROR_RETURN_VALUE (EOVERFLOW);
+	  return __syscall_ret_err (EOVERFLOW);
 #ifdef _HAVE_STAT_NSEC
 	buf->st_atim.tv_sec = kbuf->st_atim.tv_sec;
 	buf->st_atim.tv_nsec = kbuf->st_atim.tv_nsec;
@@ -247,7 +247,7 @@ __xstat32_conv (int vers, struct stat64 *kbuf, struct stat *buf)
 	 _STAT_VER_KERNEL does not make sense.  */
     case _STAT_VER_KERNEL:
     default:
-      return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
+      return __syscall_ret_err (EINVAL);
     }
 
   return 0;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-06-29 21:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-29 21:46 [glibc/azanella/syscall-refactor] linux: Syscall refactor Adhemerval Zanella

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).