diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/pread64.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/pread64.c | 36 |
1 files changed, 5 insertions, 31 deletions
diff --git a/sysdeps/unix/sysv/linux/pread64.c b/sysdeps/unix/sysv/linux/pread64.c index 0bb2ec2f20..baf23555f0 100644 --- a/sysdeps/unix/sysv/linux/pread64.c +++ b/sysdeps/unix/sysv/linux/pread64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2014 Free Software Foundation, Inc. +/* Copyright (C) 1997-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. @@ -23,8 +23,6 @@ #include <sysdep-cancel.h> #include <sys/syscall.h> -#include <kernel-features.h> - #ifdef __NR_pread64 /* Newer kernels renamed but it's the same. */ # ifdef __NR_pread # error "__NR_pread and __NR_pread64 both defined???" @@ -33,36 +31,12 @@ #endif -static ssize_t -do_pread64 (int fd, void *buf, size_t count, off64_t offset) -{ - ssize_t result; - - result = INLINE_SYSCALL (pread, 5, fd, buf, count, - __LONG_LONG_PAIR ((off_t) (offset >> 32), - (off_t) (offset & 0xffffffff))); - - return result; -} - - ssize_t -__libc_pread64 (fd, buf, count, offset) - int fd; - void *buf; - size_t count; - off64_t offset; +__libc_pread64 (int fd, void *buf, size_t count, off64_t offset) { - if (SINGLE_THREAD_P) - return do_pread64 (fd, buf, count, offset); - - int oldtype = LIBC_CANCEL_ASYNC (); - - ssize_t result = do_pread64 (fd, buf, count, offset); - - LIBC_CANCEL_RESET (oldtype); - - return result; + return SYSCALL_CANCEL (pread, fd, buf, count, + __LONG_LONG_PAIR ((off_t) (offset >> 32), + (off_t) (offset & 0xffffffff))); } weak_alias (__libc_pread64, __pread64) |