diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/pread.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/pread.c | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/sysdeps/unix/sysv/linux/pread.c b/sysdeps/unix/sysv/linux/pread.c index 5c1b174382..09389e477a 100644 --- a/sysdeps/unix/sysv/linux/pread.c +++ b/sysdeps/unix/sysv/linux/pread.c @@ -32,36 +32,17 @@ #endif -static ssize_t -#ifdef NO_CANCELLATION -inline __attribute ((always_inline)) -#endif -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) { ssize_t result; assert (sizeof (offset) == 4); - result = INLINE_SYSCALL (pread, 5, fd, buf, count, + result = SYSCALL_CANCEL (pread, fd, buf, count, __LONG_LONG_PAIR (offset >> 31, offset)); return result; } - -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) |