diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite.c | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite.c index e897c7d6ad..2f0f7a1747 100644 --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite.c +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite.c @@ -25,29 +25,12 @@ #include <sysdep-cancel.h> #include <sys/syscall.h> -static ssize_t -do_pwrite (int fd, const void *buf, size_t count, off_t offset) -{ - assert (sizeof (offset) == 4); - return INLINE_SYSCALL (pwrite64, __ALIGNMENT_COUNT (5, 6), fd, - buf, count, __ALIGNMENT_ARG - __LONG_LONG_PAIR (offset >> 31, offset)); -} - - ssize_t __libc_pwrite (int fd, const void *buf, size_t count, off_t offset) { - if (SINGLE_THREAD_P) - return do_pwrite (fd, buf, count, offset); - - int oldtype = LIBC_CANCEL_ASYNC (); - - ssize_t result = do_pwrite (fd, buf, count, offset); - - LIBC_CANCEL_RESET (oldtype); - - return result; + assert (sizeof (offset) == 4); + return SYSCALL_CANCEL (pwrite64, fd, buf, count, __ALIGNMENT_ARG + __LONG_LONG_PAIR (offset >> 31, offset)); } strong_alias (__libc_pwrite, __pwrite) weak_alias (__libc_pwrite, pwrite) |