home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.2 (Developer) / NS_dev_3.2.iso / NextDeveloper / Headers / bsd / sys / uio.h < prev    next >
Text File  |  1993-10-19  |  2KB  |  86 lines

  1. /* 
  2.  * Mach Operating System
  3.  * Copyright (c) 1989 Carnegie-Mellon University
  4.  * Copyright (c) 1988 Carnegie-Mellon University
  5.  * Copyright (c) 1987 Carnegie-Mellon University
  6.  * All rights reserved.  The CMU software License Agreement specifies
  7.  * the terms and conditions for use and redistribution.
  8.  */
  9. /*
  10.  * HISTORY
  11.  * $Log:    uio.h,v $
  12.  * 16-Feb-90  Gregg Kellogg (gk) at NeXT
  13.  *    Added uio_fmode flag for vfs compatibility.
  14.  *
  15.  * Revision 2.7  89/04/22  15:32:36  gm0w
  16.  *     Removed MACH_VFS changes.
  17.  *     [89/04/14            gm0w]
  18.  * 
  19.  * Revision 2.6  89/03/09  22:09:37  rpd
  20.  *     More cleanup.
  21.  * 
  22.  * Revision 2.5  89/02/25  17:57:49  gm0w
  23.  *     Made CMUCS and MACH_VFS conditional code always
  24.  *     true.
  25.  *     [89/02/14            mrt]
  26.  * 
  27.  * Revision 2.4  89/01/18  01:20:06  jsb
  28.  *     Vnode support: define uio_seg as alias for uio_segflg (for Sun-derived
  29.  *     code which uses uio_seg).
  30.  *     [89/01/13            jsb]
  31.  * 
  32.  * Revision 2.3  88/08/24  02:51:09  mwyoung
  33.  *     Adjusted include file references.
  34.  *     [88/08/17  02:26:52  mwyoung]
  35.  * 
  36.  * 26-Feb-88  David Kirschen (kirschen) at Encore Computer Corporation
  37.  *      Added #include of types.h to get caddr_t.
  38.  *
  39.  * 06-Jan-88  Jay Kistler (jjk) at Carnegie Mellon University
  40.  *    Added declarations for __STDC__.
  41.  *
  42.  */
  43. /*
  44.  * Copyright (c) 1982, 1986 Regents of the University of California.
  45.  * All rights reserved.  The Berkeley software License Agreement
  46.  * specifies the terms and conditions for redistribution.
  47.  *
  48.  *    @(#)uio.h    7.1 (Berkeley) 6/4/86
  49.  */
  50.  
  51. #ifndef    _SYS_UIO_H_
  52. #define _SYS_UIO_H_
  53.  
  54. #import <sys/types.h>
  55.  
  56. struct iovec {
  57.     caddr_t    iov_base;
  58.     int    iov_len;
  59. };
  60.  
  61. struct uio {
  62.     struct    iovec *uio_iov;
  63.     int    uio_iovcnt;
  64.     off_t    uio_offset;
  65.     int    uio_segflg;
  66.     short    uio_fmode;
  67.     int    uio_resid;
  68. };
  69.  
  70. enum    uio_rw { UIO_READ, UIO_WRITE };
  71.  
  72. /*
  73.  * Segment flag values (should be enum).
  74.  */
  75. #define UIO_USERSPACE    0        /* from user data space */
  76. #define UIO_SYSSPACE    1        /* from system space */
  77. #define UIO_USERISPACE    2        /* from user I space */
  78.  
  79. #if    defined(__STDC__) && !defined(KERNEL)
  80. extern int readv(int, struct iovec *, int);
  81. extern int writev(int, struct iovec *, int);
  82. #endif    defined(__STDC__) && !defined(KERNEL)
  83.  
  84. #endif    _SYS_UIO_H_
  85.  
  86.