Beispiel #1
0
ssize_t
PREADV (int fd, const struct iovec *vector, int count, OFF_T offset)
{
#ifdef __NR_preadv
  ssize_t result;

  if (SINGLE_THREAD_P)
    result = INLINE_SYSCALL (preadv, 5, fd, vector, count,
			     LO_HI_LONG (offset));
  else
    {
      int oldtype = LIBC_CANCEL_ASYNC ();

      result = INLINE_SYSCALL (preadv, 5, fd, vector, count,
			       LO_HI_LONG (offset));

      LIBC_CANCEL_RESET (oldtype);
    }
# ifdef __ASSUME_PREADV
  return result;
# endif
#endif

#ifndef __ASSUME_PREADV
# ifdef __NR_preadv
  if (result >= 0 || errno != ENOSYS)
    return result;
# endif

  return PREADV_REPLACEMENT (fd, vector, count, offset);
#endif
}
Beispiel #2
0
ssize_t
pwritev (int fd, const struct iovec *vector, int count, off_t offset)
{
#  ifdef __NR_pwritev
  ssize_t result = SYSCALL_CANCEL (pwritev, fd, vector, count,
				   LO_HI_LONG (offset));
  if (result >= 0 || errno != ENOSYS)
    return result;
#  endif
  return __atomic_pwritev_replacement (fd, vector, count, offset);
}
Beispiel #3
0
ssize_t
PWRITEV (int fd, const struct iovec *vector, int count, OFF_T offset)
{
#ifdef __NR_pwritev
  ssize_t result;

  result = SYSCALL_CANCEL (pwritev, fd, vector, count, LO_HI_LONG (offset));

# ifdef __ASSUME_PWRITEV
  return result;
# endif
#endif

#ifndef __ASSUME_PWRITEV
# ifdef __NR_pwritev
  if (result >= 0 || errno != ENOSYS)
    return result;
# endif

  return PWRITEV_REPLACEMENT (fd, vector, count, offset);
#endif
}
Beispiel #4
0
ssize_t
pwritev (int fd, const struct iovec *vector, int count, off_t offset)
{
  return SYSCALL_CANCEL (pwritev, fd, vector, count, LO_HI_LONG (offset));
}