From fcb78a55058fd4e3477d9e4c6a5083d650aefa31 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Wed, 29 Jan 2020 17:36:58 +0000 Subject: linux: Consolidate INLINE_SYSCALL With all Linux ABIs using the expected Linux kABI to indicate syscalls errors, there is no need to replicate the INLINE_SYSCALL. The generic Linux sysdep.h includes errno.h even for !__ASSEMBLER__, which is ok now and it allows cleanup some archaic code that assume otherwise. Checked with a build against all affected ABIs. --- sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h | 6 +----- sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h | 6 +----- sysdeps/unix/sysv/linux/s390/sysdep.h | 21 --------------------- 3 files changed, 2 insertions(+), 31 deletions(-) (limited to 'sysdeps/unix/sysv/linux/s390') diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h b/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h index 520c9356c6..98e5ba02f6 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h +++ b/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h @@ -26,11 +26,6 @@ #include /* For RTLD_PRIVATE_ERRNO. */ #include -/* Define __set_errno() for INLINE_SYSCALL macro below. */ -#ifndef __ASSEMBLER__ -#include -#endif - /* For Linux we can use the system call table in the header file /usr/include/asm/unistd.h of the kernel. But these symbols do not follow the SYS_* syntax @@ -85,6 +80,7 @@ #define PSEUDO_END_ERRVAL(name) \ END (name) +#undef SYSCALL_ERROR_LABEL #ifndef PIC # define SYSCALL_ERROR_LABEL 0f # define SYSCALL_ERROR_HANDLER \ diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h b/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h index 623059135e..2a4874c610 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h +++ b/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h @@ -27,11 +27,6 @@ #include /* For RTLD_PRIVATE_ERRNO. */ #include -/* Define __set_errno() for INLINE_SYSCALL macro below. */ -#ifndef __ASSEMBLER__ -#include -#endif - /* For Linux we can use the system call table in the header file /usr/include/asm/unistd.h of the kernel. But these symbols do not follow the SYS_* syntax @@ -99,6 +94,7 @@ SYSCALL_ERROR_HANDLER; \ END (name) +#undef SYSCALL_ERROR_LABEL #ifndef PIC # define SYSCALL_ERROR_LABEL syscall_error # define SYSCALL_ERROR_HANDLER diff --git a/sysdeps/unix/sysv/linux/s390/sysdep.h b/sysdeps/unix/sysv/linux/s390/sysdep.h index 7731d2ec7f..e0e25c9352 100644 --- a/sysdeps/unix/sysv/linux/s390/sysdep.h +++ b/sysdeps/unix/sysv/linux/s390/sysdep.h @@ -21,20 +21,6 @@ #undef SYS_ify #define SYS_ify(syscall_name) __NR_##syscall_name -#undef INLINE_SYSCALL -#define INLINE_SYSCALL(name, nr, args...) \ - ({ \ - long int _ret = INTERNAL_SYSCALL (name, , nr, args); \ - if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (_ret, ))) \ - { \ - __set_errno (INTERNAL_SYSCALL_ERRNO (_ret, )); \ - _ret = -1; \ - } \ - _ret; }) - -#undef INTERNAL_SYSCALL_DECL -#define INTERNAL_SYSCALL_DECL(err) do { } while (0) - #undef INTERNAL_SYSCALL_DIRECT #define INTERNAL_SYSCALL_DIRECT(name, err, nr, args...) \ ({ \ @@ -80,13 +66,6 @@ ? INTERNAL_SYSCALL_DIRECT(name, nr, args) \ : INTERNAL_SYSCALL_SVC0(name, nr, args)) -#undef INTERNAL_SYSCALL_ERROR_P -#define INTERNAL_SYSCALL_ERROR_P(val, err) \ - ((unsigned long int) (val) > -4096UL) - -#undef INTERNAL_SYSCALL_ERRNO -#define INTERNAL_SYSCALL_ERRNO(val, err) (-(val)) - #define DECLARGS_0() #define DECLARGS_1(arg1) \ register unsigned long int gpr2 __asm__ ("2") = (unsigned long int)(arg1); -- cgit 1.4.1