1 /* Copyright (C) 1991,1992,1996-1999,2003,2009 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, write to the Free
16 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
24 #include <sys/types.h>
28 /* This file defines `struct iovec'. */
32 /* Read data from file descriptor FD, and put the result in the
33 buffers described by IOVEC, which is a vector of COUNT 'struct iovec's.
34 The buffers are filled in the order specified.
35 Operates just like 'read' (see <unistd.h>) except that data are
36 put in IOVEC instead of a contiguous buffer.
38 This function is a cancellation point and therefore not marked with
40 extern ssize_t
readv (int __fd
, __const
struct iovec
*__iovec
, int __count
)
43 /* Write data pointed by the buffers described by IOVEC, which
44 is a vector of COUNT 'struct iovec's, to file descriptor FD.
45 The data is written in the order specified.
46 Operates just like 'write' (see <unistd.h>) except that the data
47 are taken from IOVEC instead of a contiguous buffer.
49 This function is a cancellation point and therefore not marked with
51 extern ssize_t
writev (int __fd
, __const
struct iovec
*__iovec
, int __count
)
56 # ifndef __USE_FILE_OFFSET64
57 /* Read data from file descriptor FD at the given position OFFSET
58 without change the file pointer, and put the result in the buffers
59 described by IOVEC, which is a vector of COUNT 'struct iovec's.
60 The buffers are filled in the order specified. Operates just like
61 'pread' (see <unistd.h>) except that data are put in IOVEC instead
62 of a contiguous buffer.
64 This function is a cancellation point and therefore not marked with
66 extern ssize_t
preadv (int __fd
, __const
struct iovec
*__iovec
, int __count
,
67 __off_t __offset
) __wur
;
69 /* Write data pointed by the buffers described by IOVEC, which is a
70 vector of COUNT 'struct iovec's, to file descriptor FD at the given
71 position OFFSET without change the file pointer. The data is
72 written in the order specified. Operates just like 'pwrite' (see
73 <unistd.h>) except that the data are taken from IOVEC instead of a
76 This function is a cancellation point and therefore not marked with
78 extern ssize_t
pwritev (int __fd
, __const
struct iovec
*__iovec
, int __count
,
79 __off_t __offset
) __wur
;
82 extern ssize_t
__REDIRECT (preadv
, (int __fd
, __const
struct iovec
*__iovec
,
83 int __count
, __off64_t __offset
),
85 extern ssize_t
__REDIRECT (pwritev
, (int __fd
, __const
struct iovec
*__iovec
,
86 int __count
, __off64_t __offset
),
89 # define preadv preadv64
90 # define pwritev pwritev64
94 # ifdef __USE_LARGEFILE64
95 /* Read data from file descriptor FD at the given position OFFSET
96 without change the file pointer, and put the result in the buffers
97 described by IOVEC, which is a vector of COUNT 'struct iovec's.
98 The buffers are filled in the order specified. Operates just like
99 'pread' (see <unistd.h>) except that data are put in IOVEC instead
100 of a contiguous buffer.
102 This function is a cancellation point and therefore not marked with
104 extern ssize_t
preadv64 (int __fd
, __const
struct iovec
*__iovec
, int __count
,
105 __off64_t __offset
) __wur
;
107 /* Write data pointed by the buffers described by IOVEC, which is a
108 vector of COUNT 'struct iovec's, to file descriptor FD at the given
109 position OFFSET without change the file pointer. The data is
110 written in the order specified. Operates just like 'pwrite' (see
111 <unistd.h>) except that the data are taken from IOVEC instead of a
114 This function is a cancellation point and therefore not marked with
116 extern ssize_t
pwritev64 (int __fd
, __const
struct iovec
*__iovec
, int __count
,
117 __off64_t __offset
) __wur
;
123 #endif /* sys/uio.h */