[Go to CFHT Home Page] Man Pages
Back to Software Index  BORDER=0Manpage Top Level
    uio(9S) manual page Table of Contents

Name

uio - scatter/gather I/O request structure

Synopsis

#include <sys/uio.h>

Interface Level

Architecture independent level 1 (DDI/DKI).

Description

A uio structure describes an I/O request that can be broken up into different data storage areas (scatter/gather I/O). A request is a list of iovec structures (base/length pairs) indicating where in user space or kernel space the I/O data is to be read/written.

The contents of uio structures passed to the driver through the entry points should not be written by the driver. The uiomove(9F) function takes care of all overhead related to maintaining the state of the uio structure.

uio structures allocated by the driver should be initialized to zero before use (by bzero(9F) , kmem_zalloc(9F) , or an equivalent).

Structure Members

iovec_t*uio_iov;/* pointer to the start of the iovec */
/* list for the uio structure */
intuio_iovcnt;/* the number of iovecs in the list */
off_tuio_offset;/* 32-bit offset into file where data is */
/* transferred from or to. See NOTES. */
offset_tuio_loffset;/* 64-bit offset into file where data is */
/* transferred from or to. See NOTES. */
uio_seg_tuio_segflg;/* identifies the type of I/O transfer: */
/* UIO_SYSSPACE: kernel <-> kernel */
/* UIO_USERSPACE: kernel <-> user */
shortuio_fmode;/* file mode flags (not driver setable) */
daddr_tuio_limit;/* 32-bit ulimit for file (maximum block */
/* offset). not driver setable. See NOTES. */
diskaddr_tuio_llimit;/* 64-bit ulimit for file (maximum block */
/* offset). not driver setable. See NOTES. */
intuio_resid;/* residual count */

The uio_iov member is a pointer to the beginning of the iovec(9S) list for the uio. When the uio structure is passed to the driver through an entry point, the driver should not set uio_iov. When the uio structure is created by the driver, uio_iov should be initialized by the driver and not written to afterward.

See Also

bzero(9F) , kmem_zalloc(9F) , uiomove(9F) , cb_ops(9S) , iovec(9S)

Notes

Only one of uio_offset or uio_loffset should be interpreted by the driver. Which field the driver interprets is dependent upon the settings in the cb_ops(9S) structure.

Only one of uio_limit or uio_llimit should be interpreted by the driver. Which field the driver interprets is dependent upon the settings in the cb_ops(9S) structure.


Table of Contents