1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178
|
.\" Hey Emacs! This file is -*- nroff -*- source.
.\"
.\" (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
.\"
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Permission is granted to copy and distribute modified versions of this
.\" manual under the conditions for verbatim copying, provided that the
.\" entire resulting derived work is distributed under the terms of a
.\" permission notice identical to this one.
.\"
.\" Since the Linux kernel and libraries are constantly changing, this
.\" manual page may be incorrect or out-of-date. The author(s) assume no
.\" responsibility for errors or omissions, or for damages resulting from
.\" the use of the information contained herein. The author(s) may not
.\" have taken the same level of care in the production of this manual,
.\" which is licensed free of charge, as they might when working
.\" professionally.
.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\" License.
.\" Modified Sat Jul 24 18:34:44 1993 by Rik Faith (faith@cs.unc.edu)
.\" Merged readv.[23], 2002-10-17, aeb
.\"
.\" 1996-04-12 Tom Bjorkholm <tomb@mydata.se>
.\" First version written
.\" Modified Tue Oct 22 17:41:07 1996 by Eric S. Raymond <esr@thyrsus.com>
.\"
.\" Japanese Version Copyright (c) 1997-1999 HANATAKA Shinya
.\" all rights reserved.
.\" Translated 1997-02-23, HANATAKA Shinya <hanataka@abyss.rim.or.jp>
.\" Updated 1999-04-03, HANATAKA Shinya
.\" Updated 2003-01-14, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
.\" Updated 2005-10-07, Akihiro MOTOKI
.\"
.\"WORD: vector ٥ (vector)
.\"WORD: file descriptor ե롦ǥץ
.\"WORD: buffer Хåե
.\"
.TH READV 2 2002-10-17 "" "Linux Programmer's Manual"
.SH ̾
readv, writev \- ʣΥХåեؤɤ߽Ԥʤ
.SH
.nf
.B #include <sys/uio.h>
.sp
.BI "ssize_t readv(int " fd ", const struct iovec *" vector ", int " count );
.sp
.BI "ssize_t writev(int " fd ", const struct iovec *" vector ", int " count );
.fi
.SH
.BR readv ()
ؿϡե롦ǥץ
.I fd
˴Ϣդ줿ե뤫
.I count
֥åΥǡɤ߹ߡ
.IR vector
ǻꤵ줿ʣΥХåե˳Ǽ롣
.PP
.BR writev ()
ؿϡ
.I vector
ǻꤵ줿Хåե
.I count
֥åΥǡФե롦ǥץ˴Ϣդ줿
ե˽ࡣ
.PP
ݥ
.I vector
.I struct iovec
ؤΥݥǤ롣
.I struct iovec
.I <sys/uio.h>
ǰʲΤ褦Ƥ:
.PP
.br
.in +0.25in
.nf
struct iovec {
void *iov_base; /* Starting address */
size_t iov_len; /* Number of bytes */
};
.fi
.in 0.25in
.PP
Хåեϻꤵ줿ǽ롣
.PP
.BR readv ()
ؿϡʣΥХåե˥ǡɤ߹
.BR read (2)
ƱͤưԤ
.PP
.BR writev ()
ؿϡʣΥХåեΥǡФʳ
.BR write (2)
ƱͤưԤ
.PP
.SH ֤
硢
.BR readv ()
ؿɤ߹Хȿ֤
.BR writev ()
ؿϽХȿ֤
顼ξ \-1 ֤\fIerrno\fR Ŭڤꤹ롣
.SH 顼
.BR read (2)
.BR write (2)
Ʊ顼Ƥ롣
˰ʲΥ顼Ƥ:
.TP
.B EINVAL
.I iov_len
ιפ
.I ssize_t
ϰϤСե⤷ϡ
٥ \fIcount\fR 0 꾮Ĥ줿ͤ礭ä
.SH
.\"O- functions first appeared in 4.2BSD), Unix98, POSIX 1003.1-2001.
.\"O+ functions first appeared in 4.2BSD), POSIX.1-2001.
4.4BSD
.RB ( readv ()
.BR writev ()
ؿ 4.2BSD Ǻǽ˸줿)POSIX.1-2001
Linux libc5 Ǥ \fIcount\fR ηȤ \fIsize_t\fR
δؿ֤ͤȤ \fIint\fR ѤƤ
.\" readv/writev ƥॳ Linux 1.3.40 ϥХ餱Ǥä
.\" ( release.libc ˽Ƥ)
.SH "Linux Ǥ"
POSIX.1-2001 Ǥϡ
.I vector
ϤȤǤǿ˾¤ߤǧƤ롣
ϡ
.I <limits.h>
.B IOV_MAX
뤳Ȥ䡢¹Ի
.I sysconf(_SC_IOV_MAX)
֤ͷͳǡξ¤𤹤뤳ȤǤ롣
Linux ǤϡλȤߤˤ깭𤵤¤ 1024 Ǥꡢ
ͤϥͥǤξ¤ΤΤǤ롣
ǡglibc ΥåѡؿϡδؿǸƤФ륫ͥ롦
ƥॳ뤬ξ¤ĶᤷƼԤȤФȡ
ɲäư롣
.BR readv ()
ξ硢åѡؿ
.I vector
ǻꤵ줿ƤǤǼǤ礭ΰХåեơ
.BR read ()
ƤӽФݤˤΥХåեϤ
ΥХåեΥǡ
.I vector
γǤ
.I iov_base
եɤꤹ˥ԡƤ顢
ΥХåե롣
.BR writev ()
Υåѡؿ⡢Ʊ褦˰ХåեȤä
.BR write ()
ƤӽФ
.SH Х
.BR readv ()
.BR writev ()
Τ褦ʥե롦ǥץФԤؿȡ
ɸϥ饤֥δؿޤˤƸƤ֤ΤϤᤷʤ
ɤʷ̤ˤʤ뤫Ƥ餺
餯ߤ̤ʤ
.SH Ϣ
.BR read (2),
.BR write (2)
|