readv man page on Plan9

Man page or keyword search:  
man Server   549 pages
apropos Keyword Search (all sections)
Output format
Plan9 logo
[printable version]

READV(2)							      READV(2)

       readv, writev, preadv, pwritev - scatter/gather read and write

       #include <u.h>
       #include <libc.h>

       struct IOchunk
	    void      *addr;
	    ulong     len;
       } IOchunk;

       long readv(int fd, IOchunk *io, int nio)

       long preadv(int fd, IOchunk *io, int nio, vlong off)

       long writev(int fd, IOchunk *io, int nio)

       long pwritev(int fd, IOchunk *io, int nio, vlong off)

       These  functions	 supplement  the standard read and write operations of
       read(2) with facilities for scatter/gather I/O.	The set of I/O buffers
       is collected into an array of IOchunk structures passed as an argument.

       Readv  reads  data  from	 fd  and  returns  the	total  number of bytes
       received.  The received data is stored in the successive	 nio  elements
       of  the	IOchunk array, storing io[0].len bytes at io[0].addr, the next
       io[1].len at io[1].addr, and so on.  Preadv does the same, but  implic‐
       itly seeks to I/O offset off by analogy with readv.

       Writev and pwritev are the analogous write routines.


       intro(2), read(2)

       These functions set errstr.

       The  implementations use malloc(2) to build a single buffer for a stan‐
       dard call to read or write.  They are placeholders for possible	future
       system calls.

                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server Plan9

List of man pages available for Plan9

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
Vote for polarhome
Free Shell Accounts :: the biggest list on the net