about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/mips
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/mips')
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c21
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c12
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c12
-rw-r--r--sysdeps/unix/sysv/linux/mips/pread.c25
-rw-r--r--sysdeps/unix/sysv/linux/mips/pread64.c29
-rw-r--r--sysdeps/unix/sysv/linux/mips/pwrite.c25
-rw-r--r--sysdeps/unix/sysv/linux/mips/pwrite64.c29
7 files changed, 20 insertions, 133 deletions
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c b/sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c
index 3c91d15e67..b79e44d0eb 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c
+++ b/sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c
@@ -28,23 +28,10 @@
 int
 sync_file_range (int fd, __off64_t from, __off64_t to, unsigned int flags)
 {
-  if (SINGLE_THREAD_P)
-    return INLINE_SYSCALL (sync_file_range, 7, fd, 0,
-			   __LONG_LONG_PAIR ((long) (from >> 32), (long) from),
-			   __LONG_LONG_PAIR ((long) (to >> 32), (long) to),
-			   flags);
-
-  int result;
-  int oldtype = LIBC_CANCEL_ASYNC ();
-
-  result = INLINE_SYSCALL (sync_file_range, 7, fd, 0,
-			   __LONG_LONG_PAIR ((long) (from >> 32), (long) from),
-			   __LONG_LONG_PAIR ((long) (to >> 32), (long) to),
-			   flags);
-
-  LIBC_CANCEL_RESET (oldtype);
-
-  return result;
+  return SYSCALL_CANCEL (sync_file_range, fd, 0,
+			 __LONG_LONG_PAIR ((long) (from >> 32), (long) from),
+			 __LONG_LONG_PAIR ((long) (to >> 32), (long) to),
+			 flags);
 }
 #else
 int
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c b/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c
index 2331cec93b..ce29a0ec71 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c
@@ -25,17 +25,7 @@ int
 fallocate (int fd, int mode, __off_t offset, __off_t len)
 {
 #ifdef __NR_fallocate
-  if (SINGLE_THREAD_P)
-    return INLINE_SYSCALL (fallocate, 4, fd, mode, offset, len);
-
-  int result;
-  int oldtype = LIBC_CANCEL_ASYNC ();
-
-  result = INLINE_SYSCALL (fallocate, 4, fd, mode, offset, len);
-
-  LIBC_CANCEL_RESET (oldtype);
-
-  return result;
+  return SYSCALL_CANCEL (fallocate, fd, mode, offset, len);
 #else
   __set_errno (ENOSYS);
   return -1;
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c b/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c
index d3ed5d19ff..077127eee8 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c
@@ -25,17 +25,7 @@ int
 fallocate64 (int fd, int mode, __off64_t offset, __off64_t len)
 {
 #ifdef __NR_fallocate
-  if (SINGLE_THREAD_P)
-    return INLINE_SYSCALL (fallocate, 4, fd, mode, offset, len);
-
-  int result;
-  int oldtype = LIBC_CANCEL_ASYNC ();
-
-  result = INLINE_SYSCALL (fallocate, 4, fd, mode, offset, len);
-
-  LIBC_CANCEL_RESET (oldtype);
-
-  return result;
+  return SYSCALL_CANCEL (fallocate, fd, mode, offset, len);
 #else
   __set_errno (ENOSYS);
   return -1;
diff --git a/sysdeps/unix/sysv/linux/mips/pread.c b/sysdeps/unix/sysv/linux/mips/pread.c
index a7b1618968..0bd712dcd5 100644
--- a/sysdeps/unix/sysv/linux/mips/pread.c
+++ b/sysdeps/unix/sysv/linux/mips/pread.c
@@ -38,35 +38,16 @@
 ssize_t
 __libc_pread (int fd, void *buf, size_t count, off_t offset)
 {
-  ssize_t result;
-
 #if _MIPS_SIM != _ABI64
   assert (sizeof (offset) == 4);
 #endif
 
-  if (SINGLE_THREAD_P)
-    {
-#if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64
-      result = INLINE_SYSCALL (pread, 4, fd, buf, count, offset);
-#else
-      result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0,
-			       __LONG_LONG_PAIR (offset >> 31, offset));
-#endif
-      return result;
-    }
-
-  int oldtype = LIBC_CANCEL_ASYNC ();
-
 #if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64
-  result = INLINE_SYSCALL (pread, 4, fd, buf, count, offset);
+  return SYSCALL_CANCEL (pread, fd, buf, count, offset);
 #else
-  result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0,
-			   __LONG_LONG_PAIR (offset >> 31, offset));
+  return SYSCALL_CANCEL (pread, fd, buf, count, 0,
+			 __LONG_LONG_PAIR (offset >> 31, offset));
 #endif
-
-  LIBC_CANCEL_RESET (oldtype);
-
-  return result;
 }
 
 strong_alias (__libc_pread, __pread)
diff --git a/sysdeps/unix/sysv/linux/mips/pread64.c b/sysdeps/unix/sysv/linux/mips/pread64.c
index ad948aada7..3ed100be02 100644
--- a/sysdeps/unix/sysv/linux/mips/pread64.c
+++ b/sysdeps/unix/sysv/linux/mips/pread64.c
@@ -37,34 +37,13 @@
 ssize_t
 __libc_pread64 (int fd, void *buf, size_t count, off64_t offset)
 {
-  ssize_t result;
-
-
-  if (SINGLE_THREAD_P)
-    {
 #if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64
-      result = INLINE_SYSCALL (pread, 4, fd, buf, count, offset);
+  return SYSCALL_CANCEL (pread, fd, buf, count, offset);
 #else
-     result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0,
-			      __LONG_LONG_PAIR ((off_t) (offset >> 32),
-			      (off_t) (offset & 0xffffffff)));
+  return SYSCALL_CANCEL (pread, fd, buf, count, 0,
+			 __LONG_LONG_PAIR ((off_t) (offset >> 32),
+					   (off_t) (offset & 0xffffffff)));
 #endif
-     return result;
-    }
-
-  int oldtype = LIBC_CANCEL_ASYNC ();
-
-#if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64
-  result = INLINE_SYSCALL (pread, 4, fd, buf, count, offset);
-#else
-  result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0,
-			   __LONG_LONG_PAIR ((off_t) (offset >> 32),
-					     (off_t) (offset & 0xffffffff)));
-#endif
-
-  LIBC_CANCEL_RESET (oldtype);
-
-  return result;
 }
 
 weak_alias (__libc_pread64, __pread64)
diff --git a/sysdeps/unix/sysv/linux/mips/pwrite.c b/sysdeps/unix/sysv/linux/mips/pwrite.c
index 2c38e04060..f4d71d4ae8 100644
--- a/sysdeps/unix/sysv/linux/mips/pwrite.c
+++ b/sysdeps/unix/sysv/linux/mips/pwrite.c
@@ -38,35 +38,16 @@
 ssize_t
 __libc_pwrite (int fd, const void *buf, size_t count, off_t offset)
 {
-  ssize_t result;
-
 #if _MIPS_SIM != _ABI64
   assert (sizeof (offset) == 4);
 #endif
 
-  if (SINGLE_THREAD_P)
-    {
-#if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64
-      result = INLINE_SYSCALL (pwrite, 4, fd, buf, count, offset);
-#else
-      result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0,
-			       __LONG_LONG_PAIR (offset >> 31, offset));
-#endif
-      return result;
-    }
-
-  int oldtype = LIBC_CANCEL_ASYNC ();
-
 #if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64
-  result = INLINE_SYSCALL (pwrite, 4, fd, buf, count, offset);
+  return SYSCALL_CANCEL (pwrite, fd, buf, count, offset);
 #else
-  result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0,
-			   __LONG_LONG_PAIR (offset >> 31, offset));
+  return SYSCALL_CANCEL (pwrite, fd, buf, count, 0,
+			 __LONG_LONG_PAIR (offset >> 31, offset));
 #endif
-
-  LIBC_CANCEL_RESET (oldtype);
-
-  return result;
 }
 
 strong_alias (__libc_pwrite, __pwrite)
diff --git a/sysdeps/unix/sysv/linux/mips/pwrite64.c b/sysdeps/unix/sysv/linux/mips/pwrite64.c
index 504c88aa10..ac0dc408fe 100644
--- a/sysdeps/unix/sysv/linux/mips/pwrite64.c
+++ b/sysdeps/unix/sysv/linux/mips/pwrite64.c
@@ -37,34 +37,13 @@
 ssize_t
 __libc_pwrite64 (int fd, const void *buf, size_t count, off64_t offset)
 {
-  ssize_t result;
-
-  if (SINGLE_THREAD_P)
-    {
 #if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64
-      result = INLINE_SYSCALL (pwrite, 4, fd, buf, count, offset);
+  return SYSCALL_CANCEL (pwrite, fd, buf, count, offset);
 #else
-     result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0,
-			      __LONG_LONG_PAIR ((off_t) (offset >> 32),
-			     (off_t) (offset & 0xffffffff)));
+  return SYSCALL_CANCEL (pwrite, fd, buf, count, 0,
+			 __LONG_LONG_PAIR ((off_t) (offset >> 32),
+					   (off_t) (offset & 0xffffffff)));
 #endif
-
-     return result;
-    }
-
-  int oldtype = LIBC_CANCEL_ASYNC ();
-
-#if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64
-  result = INLINE_SYSCALL (pwrite, 4, fd, buf, count, offset);
-#else
-  result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0,
-			   __LONG_LONG_PAIR ((off_t) (offset >> 32),
-					     (off_t) (offset & 0xffffffff)));
-#endif
-
-  LIBC_CANCEL_RESET (oldtype);
-
-  return result;
 }
 
 weak_alias (__libc_pwrite64, __pwrite64)