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/nios2/sysdep.h | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) (limited to 'sysdeps/unix/sysv/linux/nios2') diff --git a/sysdeps/unix/sysv/linux/nios2/sysdep.h b/sysdeps/unix/sysv/linux/nios2/sysdep.h index ae2f2a583f..45ef817ab5 100644 --- a/sysdeps/unix/sysv/linux/nios2/sysdep.h +++ b/sysdeps/unix/sysv/linux/nios2/sysdep.h @@ -37,6 +37,7 @@ #ifdef __ASSEMBLER__ +#undef SYSCALL_ERROR_LABEL #define SYSCALL_ERROR_LABEL __local_syscall_error #undef PSEUDO @@ -143,29 +144,6 @@ which lead in a non existent __send symbol in libc.so. */ # undef HAVE_INTERNAL_SEND_SYMBOL -/* Define a macro which expands into the inline wrapper code for a system - call. */ -#undef INLINE_SYSCALL -#define INLINE_SYSCALL(name, nr, args...) \ - ({ INTERNAL_SYSCALL_DECL(err); \ - unsigned int result_var = INTERNAL_SYSCALL (name, err, nr, args); \ - if ( INTERNAL_SYSCALL_ERROR_P (result_var, err) ) \ - { \ - __set_errno (INTERNAL_SYSCALL_ERRNO (result_var, err)); \ - result_var = -1L; \ - } \ - (int) result_var; }) - -#undef INTERNAL_SYSCALL_DECL -#define INTERNAL_SYSCALL_DECL(err) do { } while (0) - -#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)) - #undef INTERNAL_SYSCALL_RAW #define INTERNAL_SYSCALL_RAW(name, err, nr, args...) \ ({ unsigned int _sys_result; \ -- cgit 1.4.1