diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/generic/wordsize-32/pread.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/generic/wordsize-32/pread.c | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/sysdeps/unix/sysv/linux/generic/wordsize-32/pread.c b/sysdeps/unix/sysv/linux/generic/wordsize-32/pread.c index ad97e97135..6f9703cc21 100644 --- a/sysdeps/unix/sysv/linux/generic/wordsize-32/pread.c +++ b/sysdeps/unix/sysv/linux/generic/wordsize-32/pread.c @@ -25,28 +25,13 @@ #include <sysdep-cancel.h> #include <sys/syscall.h> -static ssize_t -do_pread (int fd, void *buf, size_t count, off_t offset) +ssize_t +__libc_pread (int fd, void *buf, size_t count, off_t offset) { assert (sizeof (offset) == 4); - return INLINE_SYSCALL (pread64, __ALIGNMENT_COUNT (5, 6), fd, + return SYSCALL_CANCEL (pread64, fd, buf, count, __ALIGNMENT_ARG __LONG_LONG_PAIR (offset >> 31, offset)); } - -ssize_t -__libc_pread (int fd, void *buf, size_t count, off_t offset) -{ - if (SINGLE_THREAD_P) - return do_pread (fd, buf, count, offset); - - int oldtype = LIBC_CANCEL_ASYNC (); - - ssize_t result = do_pread (fd, buf, count, offset); - - LIBC_CANCEL_RESET (oldtype); - - return result; -} strong_alias (__libc_pread, __pread) weak_alias (__libc_pread, pread) |