Annotation of coherent/f/usr/include/sys/uio.h, revision 1.1

1.1     ! root        1: #ifndef        __SYS_UIO_H__
        !             2: #define        __SYS_UIO_H__
        !             3: 
        !             4: /*
        !             5:  * This file defines the uio_t data structure used to control a scatter/gather
        !             6:  * I/O request under the System V DDI/DKI. Drivers should follow the DDI/DKI
        !             7:  * guidelines with respect to this structure by not directly modifying any
        !             8:  * members. The only permitted use of this structure is to initialise members
        !             9:  * of a driver-created uio_t to pass to the DDI/DKI library functions.
        !            10:  */
        !            11: /*
        !            12:  *-IMPORTS
        !            13:  *     <common/ccompat.h>
        !            14:  *             __EXTERN_C_BEGIN__
        !            15:  *             __EXTERN_C_END__
        !            16:  *             __PROTO ()
        !            17:  *     <sys/types.h>
        !            18:  *             caddr_t
        !            19:  *             off_t
        !            20:  */
        !            21: 
        !            22: #include <common/ccompat.h>
        !            23: #include <sys/types.h>
        !            24: 
        !            25: 
        !            26: typedef        struct uio      uio_t;
        !            27: typedef struct iovec   iovec_t;
        !            28: 
        !            29: /*
        !            30:  * Note that the definition of this structure in the DDI/DKI allows the
        !            31:  * routines uiomove (), ureadc () and uwritec () license to maintain all kinds
        !            32:  * of cached state about iovec's once I/O through a uio structure has been
        !            33:  * initiated. For now, we don't define any such state, but note that it may
        !            34:  * be added.
        !            35:  */
        !            36: 
        !            37: struct uio {
        !            38:        iovec_t       * uio_iov;        /* start of the iovec array */
        !            39:        int             uio_iovcnt;     /* number of iovecs in the array */
        !            40:        off_t           uio_offset;     /* offset into file/device */
        !            41:        short           uio_segflg;     /* type of I/O transfer */
        !            42:        short           uio_fmode;      /* file mode flags (see <sys/file.h>) */
        !            43:        int             uio_resid;      /* residual count */
        !            44: };
        !            45: 
        !            46: struct iovec {
        !            47:        caddr_t         iov_base;       /* base address of storage area */
        !            48:        int             iov_len;        /* size of the storage area in bytes */
        !            49: };
        !            50: 
        !            51: 
        !            52: /*
        !            53:  * Values for "uio_segflg"
        !            54:  */
        !            55: 
        !            56: enum {
        !            57:        UIO_USERSPACE,
        !            58:        UIO_SYSSPACE
        !            59: };
        !            60: 
        !            61: typedef enum {
        !            62:        UIO_READ,
        !            63:        UIO_WRITE
        !            64: } uio_rw_t;
        !            65: 
        !            66: 
        !            67: __EXTERN_C_BEGIN__
        !            68: 
        !            69: int            uiomove         __PROTO ((caddr_t _addr, long _nbytes,
        !            70:                                          uio_rw_t _rwflag, uio_t * _uiop));
        !            71: int            ureadc          __PROTO ((int _c, uio_t * _uiop));
        !            72: int            uwritec         __PROTO ((uio_t * uiop));
        !            73: 
        !            74: __EXTERN_C_END__
        !            75: 
        !            76: #endif /* ! defined (__SYS_UIO_H__) */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.