vm: use assert() instead of vm_assert(); remove vm_assert().
[minix.git] / man / man3 / readv.3
blob85f0c8407b47e2d2338e35cde4c6652abb8d5df5
1 .TH READV 3  "January 6, 2010"
2 .UC 4
3 .SH NAME
4 readv, writev \- vector-based IO
5 .SH SYNOPSIS
6 .nf
7 .ft B
8 #include <sys/uio.h>
10 ssize_t readv(int \fIfildes\fP, const struct iovec *\fIiov\fP, int \fIiovcnt\fP);
11 ssize_t writev(int \fIfildes\fP, const struct iovec *\fIiov\fP, int \fIiovcnt\fP);
12 .fi
13 .SH DESCRIPTION
14 The \fBreadv\fP and \fBwritev\fP functions allow one to use multiple buffers
15 when reading from or writing to files.  The \fIfildes\fP parameter specifies the
16 file descriptor as with the \fBread\fP and \fBwrite\fP functions.  \fIiov\fP
17 specifies an array of buffers to be read into or written from.  For each element
18 of this array, the iov_base member specifies the address of the buffer and
19 iov_len specifies its size in bytes. The number of buffers is specified by 
20 \fIiovcnt\fP. At most IOV_MAX buffers may be specified and their total size may
21 not exceed SSIZE_MAX (both constants are defined in limits.h).
22 .SH "RETURN VALUE"
23 In case of success, the total number of bytes read or written is returned. 
24 Zero may be returned if no buffers were specified or each buffer has size zero.
25 In the case of writev, a return value zero may also indicate an end of file 
26 condition. If the functions fail, -1 is returned.
27 .SH "SEE ALSO"
28 read(2), write(2)