about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/mips
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2020-01-29 20:38:36 +0000
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2020-02-14 21:12:45 -0300
commitbc2eb9321ec0d17d41596933617b2522c9aa5e0b (patch)
tree772961371ee718659d4a3f556fa5c9470123a2ed /sysdeps/unix/sysv/linux/mips
parentd1aea2805df2d9f5e06f8b508b377a8bc95ba335 (diff)
downloadglibc-bc2eb9321ec0d17d41596933617b2522c9aa5e0b.tar.gz
glibc-bc2eb9321ec0d17d41596933617b2522c9aa5e0b.tar.xz
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/mips')
-rw-r--r--sysdeps/unix/sysv/linux/mips/brk.c3
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips32/sysdep.h10
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips64/fxstatat64.c7
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips64/sysdep.h29
4 files changed, 23 insertions, 26 deletions
diff --git a/sysdeps/unix/sysv/linux/mips/brk.c b/sysdeps/unix/sysv/linux/mips/brk.c
index 4ec2a43bc8..0335837948 100644
--- a/sysdeps/unix/sysv/linux/mips/brk.c
+++ b/sysdeps/unix/sysv/linux/mips/brk.c
@@ -30,10 +30,9 @@ weak_alias (__curbrk, ___brk_addr)
 int
 __brk (void *addr)
 {
-  INTERNAL_SYSCALL_DECL (err);
   void *newbrk;
 
-  newbrk = (void *) INTERNAL_SYSCALL (brk, err, 1, addr);
+  newbrk = (void *) INTERNAL_SYSCALL_CALL (brk, addr);
   __curbrk = newbrk;
 
   if (newbrk < addr)
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h
index 7c04819f6c..c5bcd90c25 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h
+++ b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h
@@ -95,10 +95,10 @@ union __mips_syscall_return
 
 # include <mips16-syscall.h>
 
-# define INTERNAL_SYSCALL(name, err, nr, args...)			\
-	INTERNAL_SYSCALL_NCS (SYS_ify (name), err, nr, args)
+# define INTERNAL_SYSCALL(name, nr, args...)				\
+	INTERNAL_SYSCALL_NCS (SYS_ify (name), nr, args)
 
-# define INTERNAL_SYSCALL_NCS(number, err, nr, args...)			\
+# define INTERNAL_SYSCALL_NCS(number, nr, args...)			\
 ({									\
 	union __mips_syscall_return _sc_ret;				\
 	_sc_ret.val = __mips16_syscall##nr (args, number);		\
@@ -111,12 +111,12 @@ union __mips_syscall_return
 			      number, err, args)
 
 #else /* !__mips16 */
-# define INTERNAL_SYSCALL(name, err, nr, args...)			\
+# define INTERNAL_SYSCALL(name, nr, args...)				\
 	internal_syscall##nr ("li\t%0, %2\t\t\t# " #name "\n\t",	\
 			      "IK" (SYS_ify (name)),			\
 			      SYS_ify (name), err, args)
 
-# define INTERNAL_SYSCALL_NCS(number, err, nr, args...)			\
+# define INTERNAL_SYSCALL_NCS(number, nr, args...)			\
 	internal_syscall##nr (MOVE32 "\t%0, %2\n\t",			\
 			      "r" (__s0),				\
 			      number, err, args)
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/fxstatat64.c b/sysdeps/unix/sysv/linux/mips/mips64/fxstatat64.c
index 6d36adab05..cd495a3337 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/fxstatat64.c
+++ b/sysdeps/unix/sysv/linux/mips/mips64/fxstatat64.c
@@ -40,15 +40,14 @@ __fxstatat64 (int vers, int fd, const char *file, struct stat64 *st, int flag)
     }
 
   int result;
-  INTERNAL_SYSCALL_DECL (err);
   struct kernel_stat kst;
 
-  result = INTERNAL_SYSCALL (newfstatat, err, 4, fd, file, &kst, flag);
-  if (!__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 1))
+  result = INTERNAL_SYSCALL_CALL (newfstatat, fd, file, &kst, flag);
+  if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (result)))
     return __xstat64_conv (vers, &kst, st);
   else
     {
-      __set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
+      __set_errno (INTERNAL_SYSCALL_ERRNO (result));
       return -1;
     }
 }
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/sysdep.h
index 112d940dd7..1882fe4e73 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/mips/mips64/sysdep.h
@@ -79,18 +79,18 @@ typedef long int __syscall_arg_t;
 #endif
 
 #undef INTERNAL_SYSCALL
-#define INTERNAL_SYSCALL(name, err, nr, args...)			\
+#define INTERNAL_SYSCALL(name, nr, args...)			\
 	internal_syscall##nr ("li\t%0, %2\t\t\t# " #name "\n\t",	\
 			      "IK" (SYS_ify (name)),			\
-			      0, err, args)
+			      0, args)
 
 #undef INTERNAL_SYSCALL_NCS
-#define INTERNAL_SYSCALL_NCS(number, err, nr, args...)			\
+#define INTERNAL_SYSCALL_NCS(number, nr, args...)			\
 	internal_syscall##nr (MOVE32 "\t%0, %2\n\t",			\
 			      "r" (__s0),				\
-			      number, err, args)
+			      number, args)
 
-#define internal_syscall0(v0_init, input, number, err, dummy...)	\
+#define internal_syscall0(v0_init, input, number, dummy...)	\
 ({									\
 	long int _sys_result;						\
 									\
@@ -112,7 +112,7 @@ typedef long int __syscall_arg_t;
 	_sys_result;							\
 })
 
-#define internal_syscall1(v0_init, input, number, err, arg1)		\
+#define internal_syscall1(v0_init, input, number, arg1)		\
 ({									\
 	long int _sys_result;						\
 									\
@@ -136,7 +136,7 @@ typedef long int __syscall_arg_t;
 	_sys_result;							\
 })
 
-#define internal_syscall2(v0_init, input, number, err, arg1, arg2)	\
+#define internal_syscall2(v0_init, input, number, arg1, arg2)	\
 ({									\
 	long int _sys_result;						\
 									\
@@ -162,8 +162,7 @@ typedef long int __syscall_arg_t;
 	_sys_result;							\
 })
 
-#define internal_syscall3(v0_init, input, number, err,			\
-			  arg1, arg2, arg3)				\
+#define internal_syscall3(v0_init, input, number, arg1, arg2, arg3)	\
 ({									\
 	long int _sys_result;						\
 									\
@@ -191,8 +190,8 @@ typedef long int __syscall_arg_t;
 	_sys_result;							\
 })
 
-#define internal_syscall4(v0_init, input, number, err,			\
-			  arg1, arg2, arg3, arg4)			\
+#define internal_syscall4(v0_init, input, number, arg1, arg2, arg3, 	\
+			  arg4)						\
 ({									\
 	long int _sys_result;						\
 									\
@@ -221,8 +220,8 @@ typedef long int __syscall_arg_t;
 	_sys_result;							\
 })
 
-#define internal_syscall5(v0_init, input, number, err,			\
-			  arg1, arg2, arg3, arg4, arg5)			\
+#define internal_syscall5(v0_init, input, number, arg1, arg2, arg3, 	\
+			  arg4, arg5)					\
 ({									\
 	long int _sys_result;						\
 									\
@@ -253,8 +252,8 @@ typedef long int __syscall_arg_t;
 	_sys_result;							\
 })
 
-#define internal_syscall6(v0_init, input, number, err,			\
-			  arg1, arg2, arg3, arg4, arg5, arg6)		\
+#define internal_syscall6(v0_init, input, number, arg1, arg2, arg3, 	\
+			  arg4, arg5, arg6)				\
 ({									\
 	long int _sys_result;						\
 									\