diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2020-01-29 20:38:36 +0000 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2020-02-14 21:12:45 -0300 |
commit | bc2eb9321ec0d17d41596933617b2522c9aa5e0b (patch) | |
tree | 772961371ee718659d4a3f556fa5c9470123a2ed /sysdeps/unix/sysv/linux/i386 | |
parent | d1aea2805df2d9f5e06f8b508b377a8bc95ba335 (diff) | |
download | glibc-bc2eb9321ec0d17d41596933617b2522c9aa5e0b.tar glibc-bc2eb9321ec0d17d41596933617b2522c9aa5e0b.tar.gz glibc-bc2eb9321ec0d17d41596933617b2522c9aa5e0b.tar.bz2 glibc-bc2eb9321ec0d17d41596933617b2522c9aa5e0b.zip |
linux: Remove INTERNAL_SYSCALL_DECL
With all Linux ABIs using the expected Linux kABI to indicate
syscalls errors, the INTERNAL_SYSCALL_DECL is an empty declaration
on all ports.
This patch removes the 'err' argument on INTERNAL_SYSCALL* macro
and remove the INTERNAL_SYSCALL_DECL usage.
Checked with a build against all affected ABIs.
Diffstat (limited to 'sysdeps/unix/sysv/linux/i386')
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/brk.c | 3 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/fxstat.c | 8 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/fxstatat.c | 8 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/lxstat.c | 8 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/sysdep.h | 58 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/xstat.c | 8 |
6 files changed, 42 insertions, 51 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/brk.c b/sysdeps/unix/sysv/linux/i386/brk.c index b0e5b0f85c..021b6d37a0 100644 --- a/sysdeps/unix/sysv/linux/i386/brk.c +++ b/sysdeps/unix/sysv/linux/i386/brk.c @@ -36,8 +36,7 @@ weak_alias (__curbrk, ___brk_addr) int __brk (void *addr) { - INTERNAL_SYSCALL_DECL (err); - void *newbrk = (void *) INTERNAL_SYSCALL (brk, err, 1, addr); + void *newbrk = (void *) INTERNAL_SYSCALL_CALL (brk, addr); __curbrk = newbrk; if (newbrk < addr) return INLINE_SYSCALL_ERROR_RETURN_VALUE (ENOMEM); diff --git a/sysdeps/unix/sysv/linux/i386/fxstat.c b/sysdeps/unix/sysv/linux/i386/fxstat.c index 8eda42f2e6..db59baa71b 100644 --- a/sysdeps/unix/sysv/linux/i386/fxstat.c +++ b/sysdeps/unix/sysv/linux/i386/fxstat.c @@ -42,11 +42,9 @@ __fxstat (int vers, int fd, struct stat *buf) { struct stat64 buf64; - INTERNAL_SYSCALL_DECL (err); - result = INTERNAL_SYSCALL (fstat64, err, 2, fd, &buf64); - if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (result, err))) - return INLINE_SYSCALL_ERROR_RETURN_VALUE (INTERNAL_SYSCALL_ERRNO (result, - err)); + result = INTERNAL_SYSCALL_CALL (fstat64, fd, &buf64); + if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (result))) + return INLINE_SYSCALL_ERROR_RETURN_VALUE (INTERNAL_SYSCALL_ERRNO (result)); else return __xstat32_conv (vers, &buf64, buf); } diff --git a/sysdeps/unix/sysv/linux/i386/fxstatat.c b/sysdeps/unix/sysv/linux/i386/fxstatat.c index d510d7463d..f720f6e429 100644 --- a/sysdeps/unix/sysv/linux/i386/fxstatat.c +++ b/sysdeps/unix/sysv/linux/i386/fxstatat.c @@ -38,13 +38,11 @@ int __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag) { int result; - INTERNAL_SYSCALL_DECL (err); struct stat64 st64; - result = INTERNAL_SYSCALL (fstatat64, err, 4, fd, file, &st64, flag); - if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (result, err))) - return INLINE_SYSCALL_ERROR_RETURN_VALUE (INTERNAL_SYSCALL_ERRNO (result, - err)); + result = INTERNAL_SYSCALL_CALL (fstatat64, fd, file, &st64, flag); + if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (result))) + return INLINE_SYSCALL_ERROR_RETURN_VALUE (INTERNAL_SYSCALL_ERRNO (result)); else return __xstat32_conv (vers, &st64, st); } diff --git a/sysdeps/unix/sysv/linux/i386/lxstat.c b/sysdeps/unix/sysv/linux/i386/lxstat.c index e6f8e0fbca..e960077893 100644 --- a/sysdeps/unix/sysv/linux/i386/lxstat.c +++ b/sysdeps/unix/sysv/linux/i386/lxstat.c @@ -43,11 +43,9 @@ __lxstat (int vers, const char *name, struct stat *buf) { struct stat64 buf64; - INTERNAL_SYSCALL_DECL (err); - result = INTERNAL_SYSCALL (lstat64, err, 2, name, &buf64); - if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (result, err))) - return INLINE_SYSCALL_ERROR_RETURN_VALUE (INTERNAL_SYSCALL_ERRNO (result, - err)); + result = INTERNAL_SYSCALL_CALL (lstat64, name, &buf64); + if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (result))) + return INLINE_SYSCALL_ERROR_RETURN_VALUE (INTERNAL_SYSCALL_ERRNO (result)); else return __xstat32_conv (vers, &buf64, buf); } diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.h b/sysdeps/unix/sysv/linux/i386/sysdep.h index 2387a4a144..5e3888060b 100644 --- a/sysdeps/unix/sysv/linux/i386/sysdep.h +++ b/sysdeps/unix/sysv/linux/i386/sysdep.h @@ -299,25 +299,25 @@ struct libc_do_syscall_args The _NCS variant allows non-constant syscall numbers but it is not possible to use more than four parameters. */ #undef INTERNAL_SYSCALL -#define INTERNAL_SYSCALL_MAIN_0(name, err, args...) \ - INTERNAL_SYSCALL_MAIN_INLINE(name, err, 0, args) -#define INTERNAL_SYSCALL_MAIN_1(name, err, args...) \ - INTERNAL_SYSCALL_MAIN_INLINE(name, err, 1, args) -#define INTERNAL_SYSCALL_MAIN_2(name, err, args...) \ - INTERNAL_SYSCALL_MAIN_INLINE(name, err, 2, args) -#define INTERNAL_SYSCALL_MAIN_3(name, err, args...) \ - INTERNAL_SYSCALL_MAIN_INLINE(name, err, 3, args) -#define INTERNAL_SYSCALL_MAIN_4(name, err, args...) \ - INTERNAL_SYSCALL_MAIN_INLINE(name, err, 4, args) -#define INTERNAL_SYSCALL_MAIN_5(name, err, args...) \ - INTERNAL_SYSCALL_MAIN_INLINE(name, err, 5, args) +#define INTERNAL_SYSCALL_MAIN_0(name, args...) \ + INTERNAL_SYSCALL_MAIN_INLINE(name, 0, args) +#define INTERNAL_SYSCALL_MAIN_1(name, args...) \ + INTERNAL_SYSCALL_MAIN_INLINE(name, 1, args) +#define INTERNAL_SYSCALL_MAIN_2(name, args...) \ + INTERNAL_SYSCALL_MAIN_INLINE(name, 2, args) +#define INTERNAL_SYSCALL_MAIN_3(name, args...) \ + INTERNAL_SYSCALL_MAIN_INLINE(name, 3, args) +#define INTERNAL_SYSCALL_MAIN_4(name, args...) \ + INTERNAL_SYSCALL_MAIN_INLINE(name, 4, args) +#define INTERNAL_SYSCALL_MAIN_5(name, args...) \ + INTERNAL_SYSCALL_MAIN_INLINE(name, 5, args) /* Each object using 6-argument inline syscalls must include a definition of __libc_do_syscall. */ #ifdef OPTIMIZE_FOR_GCC_5 -# define INTERNAL_SYSCALL_MAIN_6(name, err, args...) \ - INTERNAL_SYSCALL_MAIN_INLINE(name, err, 6, args) +# define INTERNAL_SYSCALL_MAIN_6(name, args...) \ + INTERNAL_SYSCALL_MAIN_INLINE(name, 6, args) #else /* GCC 5 */ -# define INTERNAL_SYSCALL_MAIN_6(name, err, arg1, arg2, arg3, \ +# define INTERNAL_SYSCALL_MAIN_6(name, arg1, arg2, arg3, \ arg4, arg5, arg6) \ struct libc_do_syscall_args _xv = \ { \ @@ -332,22 +332,22 @@ struct libc_do_syscall_args : "i" (__NR_##name), "c" (arg2), "d" (arg3), "S" (arg4), "D" (&_xv) \ : "memory", "cc") #endif /* GCC 5 */ -#define INTERNAL_SYSCALL(name, err, nr, args...) \ +#define INTERNAL_SYSCALL(name, nr, args...) \ ({ \ register unsigned int resultvar; \ - INTERNAL_SYSCALL_MAIN_##nr (name, err, args); \ + INTERNAL_SYSCALL_MAIN_##nr (name, args); \ (int) resultvar; }) #if I386_USE_SYSENTER # ifdef OPTIMIZE_FOR_GCC_5 # ifdef PIC -# define INTERNAL_SYSCALL_MAIN_INLINE(name, err, nr, args...) \ +# define INTERNAL_SYSCALL_MAIN_INLINE(name, nr, args...) \ LOADREGS_##nr(args) \ asm volatile ( \ "call *%%gs:%P2" \ : "=a" (resultvar) \ : "a" (__NR_##name), "i" (offsetof (tcbhead_t, sysinfo)) \ ASMARGS_##nr(args) : "memory", "cc") -# define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \ +# define INTERNAL_SYSCALL_NCS(name, nr, args...) \ ({ \ register unsigned int resultvar; \ LOADREGS_##nr(args) \ @@ -358,13 +358,13 @@ struct libc_do_syscall_args ASMARGS_##nr(args) : "memory", "cc"); \ (int) resultvar; }) # else -# define INTERNAL_SYSCALL_MAIN_INLINE(name, err, nr, args...) \ +# define INTERNAL_SYSCALL_MAIN_INLINE(name, nr, args...) \ LOADREGS_##nr(args) \ asm volatile ( \ "call *_dl_sysinfo" \ : "=a" (resultvar) \ : "a" (__NR_##name) ASMARGS_##nr(args) : "memory", "cc") -# define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \ +# define INTERNAL_SYSCALL_NCS(name, nr, args...) \ ({ \ register unsigned int resultvar; \ LOADREGS_##nr(args) \ @@ -376,7 +376,7 @@ struct libc_do_syscall_args # endif # else /* GCC 5 */ # ifdef PIC -# define INTERNAL_SYSCALL_MAIN_INLINE(name, err, nr, args...) \ +# define INTERNAL_SYSCALL_MAIN_INLINE(name, nr, args...) \ EXTRAVAR_##nr \ asm volatile ( \ LOADARGS_##nr \ @@ -386,7 +386,7 @@ struct libc_do_syscall_args : "=a" (resultvar) \ : "i" (__NR_##name), "i" (offsetof (tcbhead_t, sysinfo)) \ ASMFMT_##nr(args) : "memory", "cc") -# define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \ +# define INTERNAL_SYSCALL_NCS(name, nr, args...) \ ({ \ register unsigned int resultvar; \ EXTRAVAR_##nr \ @@ -399,7 +399,7 @@ struct libc_do_syscall_args ASMFMT_##nr(args) : "memory", "cc"); \ (int) resultvar; }) # else -# define INTERNAL_SYSCALL_MAIN_INLINE(name, err, nr, args...) \ +# define INTERNAL_SYSCALL_MAIN_INLINE(name, nr, args...) \ EXTRAVAR_##nr \ asm volatile ( \ LOADARGS_##nr \ @@ -408,7 +408,7 @@ struct libc_do_syscall_args RESTOREARGS_##nr \ : "=a" (resultvar) \ : "i" (__NR_##name) ASMFMT_##nr(args) : "memory", "cc") -# define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \ +# define INTERNAL_SYSCALL_NCS(name, nr, args...) \ ({ \ register unsigned int resultvar; \ EXTRAVAR_##nr \ @@ -423,13 +423,13 @@ struct libc_do_syscall_args # endif /* GCC 5 */ #else # ifdef OPTIMIZE_FOR_GCC_5 -# define INTERNAL_SYSCALL_MAIN_INLINE(name, err, nr, args...) \ +# define INTERNAL_SYSCALL_MAIN_INLINE(name, nr, args...) \ LOADREGS_##nr(args) \ asm volatile ( \ "int $0x80" \ : "=a" (resultvar) \ : "a" (__NR_##name) ASMARGS_##nr(args) : "memory", "cc") -# define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \ +# define INTERNAL_SYSCALL_NCS(name, nr, args...) \ ({ \ register unsigned int resultvar; \ LOADREGS_##nr(args) \ @@ -439,7 +439,7 @@ struct libc_do_syscall_args : "a" (name) ASMARGS_##nr(args) : "memory", "cc"); \ (int) resultvar; }) # else /* GCC 5 */ -# define INTERNAL_SYSCALL_MAIN_INLINE(name, err, nr, args...) \ +# define INTERNAL_SYSCALL_MAIN_INLINE(name, nr, args...) \ EXTRAVAR_##nr \ asm volatile ( \ LOADARGS_##nr \ @@ -448,7 +448,7 @@ struct libc_do_syscall_args RESTOREARGS_##nr \ : "=a" (resultvar) \ : "i" (__NR_##name) ASMFMT_##nr(args) : "memory", "cc") -# define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \ +# define INTERNAL_SYSCALL_NCS(name, nr, args...) \ ({ \ register unsigned int resultvar; \ EXTRAVAR_##nr \ diff --git a/sysdeps/unix/sysv/linux/i386/xstat.c b/sysdeps/unix/sysv/linux/i386/xstat.c index 3557a91394..96f67168ac 100644 --- a/sysdeps/unix/sysv/linux/i386/xstat.c +++ b/sysdeps/unix/sysv/linux/i386/xstat.c @@ -43,11 +43,9 @@ __xstat (int vers, const char *name, struct stat *buf) { struct stat64 buf64; - INTERNAL_SYSCALL_DECL (err); - result = INTERNAL_SYSCALL (stat64, err, 2, name, &buf64); - if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (result, err))) - return INLINE_SYSCALL_ERROR_RETURN_VALUE (INTERNAL_SYSCALL_ERRNO (result, - err)); + result = INTERNAL_SYSCALL_CALL (stat64, name, &buf64); + if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (result))) + return INLINE_SYSCALL_ERROR_RETURN_VALUE (INTERNAL_SYSCALL_ERRNO (result)); else return __xstat32_conv (vers, &buf64, buf); } |