about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/powerpc
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/powerpc')
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/pread.c20
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/pread64.c23
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite.c20
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite64.c23
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/fcntl.c10
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/sync_file_range.c12
6 files changed, 9 insertions, 99 deletions
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread.c b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread.c
index 10763f563d..f6b7f43f3f 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread.c
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread.c
@@ -26,26 +26,8 @@
 ssize_t
 __libc_pread (int fd, void *buf, size_t count, off_t offset)
 {
-  ssize_t result;
-
-  if (SINGLE_THREAD_P)
-    {
-      /* On PPC32 64bit values are aligned in odd/even register pairs.  */
-      result = INLINE_SYSCALL (pread, 6, fd, buf, count,
-			       0, offset >> 31, offset);
-
-      return result;
-    }
-
-  int oldtype = LIBC_CANCEL_ASYNC ();
-
   /* On PPC32 64bit values are aligned in odd/even register pairs.  */
-  result = INLINE_SYSCALL (pread, 6, fd, buf, count,
-			       0, offset >> 31, offset);
-
-  LIBC_CANCEL_RESET (oldtype);
-
-  return result;
+  return SYSCALL_CANCEL (pread, fd, buf, count, 0, offset >> 31, offset);
 }
 
 strong_alias (__libc_pread, __pread)
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread64.c b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread64.c
index f3dc7e5618..75ee34bcce 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread64.c
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread64.c
@@ -26,28 +26,9 @@
 ssize_t
 __libc_pread64 (int fd, void *buf, size_t count, off64_t offset)
 {
-  ssize_t result;
-
-  if (SINGLE_THREAD_P)
-    {
-      /* On PPC32 64bit values are aligned in odd/even register pairs.  */
-      result = INLINE_SYSCALL (pread, 6, fd, buf, count,
-			       0, (long) (offset >> 32),
-			       (long) offset);
-
-      return result;
-    }
-
-  int oldtype = LIBC_CANCEL_ASYNC ();
-
   /* On PPC32 64bit values are aligned in odd/even register pairs.  */
-  result = INLINE_SYSCALL (pread, 6, fd, buf, count,
-			   0, (long) (offset >> 32),
-			   (long) offset);
-
-  LIBC_CANCEL_RESET (oldtype);
-
-  return result;
+  return SYSCALL_CANCEL (pread, fd, buf, count, 0, (long) (offset >> 32),
+			 (long) offset);
 }
 
 weak_alias (__libc_pread64, __pread64)
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite.c b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite.c
index 65109ed54c..fc822d7c8d 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite.c
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite.c
@@ -27,26 +27,8 @@
 ssize_t
 __libc_pwrite (int fd, const void *buf, size_t count, off_t offset)
 {
-  ssize_t result;
-
-  if (SINGLE_THREAD_P)
-    {
-      /* On PPC32 64bit values are aligned in odd/even register pairs.  */
-      result = INLINE_SYSCALL (pwrite, 6, fd, buf, count,
-			       0, offset >> 31, offset);
-
-      return result;
-    }
-
-  int oldtype = LIBC_CANCEL_ASYNC ();
-
   /* On PPC32 64bit values are aligned in odd/even register pairs.  */
-  result = INLINE_SYSCALL (pwrite, 6, fd, buf, count,
-			   0, offset >> 31, offset);
-
-  LIBC_CANCEL_RESET (oldtype);
-
-  return result;
+  return SYSCALL_CANCEL (pwrite, fd, buf, count, 0, offset >> 31, offset);
 }
 
 strong_alias (__libc_pwrite, __pwrite)
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite64.c b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite64.c
index 77749c98b0..dbeaed8775 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite64.c
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite64.c
@@ -26,28 +26,9 @@
 ssize_t
 __libc_pwrite64 (int fd, const void *buf, size_t count, off64_t offset)
 {
-  ssize_t result;
-
-  if (SINGLE_THREAD_P)
-    {
   /* On PPC32 64bit values are aligned in odd/even register pairs.  */
-      result = INLINE_SYSCALL (pwrite, 6, fd, buf, count,
-			       0, (long) (offset >> 32),
-			       (long) offset);
-
-      return result;
-    }
-
-  int oldtype = LIBC_CANCEL_ASYNC ();
-
-  /* On PPC32 64bit values are aligned in odd/even register pairs.  */
-  result = INLINE_SYSCALL (pwrite, 6, fd, buf, count,
-			   0, (long) (offset >> 32),
-			   (long) offset);
-
-  LIBC_CANCEL_RESET (oldtype);
-
-  return result;
+  return SYSCALL_CANCEL (pwrite, fd, buf, count, 0, (long) (offset >> 32),
+			 (long) offset);
 }
 
 weak_alias (__libc_pwrite64, __pwrite64)
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/fcntl.c b/sysdeps/unix/sysv/linux/powerpc/powerpc64/fcntl.c
index a4f90b6695..69031bad94 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/fcntl.c
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/fcntl.c
@@ -53,16 +53,10 @@ __libc_fcntl (int fd, int cmd, ...)
   if (cmd >= F_GETLK64 && cmd <= F_SETLKW64)
     cmd -= F_GETLK64 - F_GETLK;
 
-  if (SINGLE_THREAD_P || cmd != F_SETLKW)
+  if (cmd != F_SETLKW)
     return INLINE_SYSCALL (fcntl, 3, fd, cmd, arg);
 
-  int oldtype = LIBC_CANCEL_ASYNC ();
-
-  int result = INLINE_SYSCALL (fcntl, 3, fd, cmd, arg);
-
-  LIBC_CANCEL_RESET (oldtype);
-
-  return result;
+  return SYSCALL_CANCEL (fcntl, fd, cmd, arg);
 }
 libc_hidden_def (__libc_fcntl)
 
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/sync_file_range.c b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sync_file_range.c
index 18bb0dd478..9f46458581 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/sync_file_range.c
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sync_file_range.c
@@ -28,17 +28,7 @@
 int
 sync_file_range (int fd, __off64_t from, __off64_t to, unsigned int flags)
 {
-  if (SINGLE_THREAD_P)
-    return INLINE_SYSCALL (sync_file_range2, 4, fd, flags, from, to);
-
-  int result;
-  int oldtype = LIBC_CANCEL_ASYNC ();
-
-  result = INLINE_SYSCALL (sync_file_range2, 4, fd, flags, from, to);
-
-  LIBC_CANCEL_RESET (oldtype);
-
-  return result;
+  return SYSCALL_CANCEL (sync_file_range2, fd, flags, from, to);
 }
 #else
 int