xref: /titanic_50/usr/src/lib/libbc/inc/include/sys/uio.h (revision b00044a2eb43864b8718585d21949611a2ee59ef)
1 /*
2  * Copyright 1989 Sun Microsystems, Inc.  All rights reserved.
3  * Use is subject to license terms.
4  */
5 
6 /*
7  * Copyright (c) 1982, 1986 Regents of the University of California.
8  * All rights reserved.  The Berkeley software License Agreement
9  * specifies the terms and conditions for redistribution.
10  */
11 
12 #pragma ident	"%Z%%M%	%I%	%E% SMI"
13 
14 #ifndef	_sys_uio_h
15 #define	_sys_uio_h
16 
17 struct	iovec {
18 	caddr_t	iov_base;
19 	int	iov_len;
20 };
21 
22 /*
23  * The uio_seg define below is obsolete and is included only
24  * for compatibility with previous releases.  New code should
25  * use the uio_segflg field.
26  */
27 struct	uio {
28 	struct	iovec *uio_iov;
29 	int	uio_iovcnt;
30 	off_t	uio_offset;
31 	short	uio_segflg;
32 #define	uio_seg	uio_segflg		/* obsolete */
33 	short	uio_fmode;		/* careful what you put here, the file
34 					 * bits that fill this are an int. */
35 	int	uio_resid;
36 };
37 
38 enum	uio_rw { UIO_READ, UIO_WRITE };
39 
40 /*
41  * Segment flag values (should be enum).
42  *
43  * The UIOSEG_* defines are obsolete and are included only
44  * for compatibility with previous releases.  New code should
45  * use the UIO_* definitions.
46  */
47 #define	UIO_USERSPACE	0		/* from user data space */
48 #define	UIO_SYSSPACE	1		/* from system space */
49 #define	UIO_USERISPACE	2		/* from user I space */
50 
51 #define	UIOSEG_USER	0		/* obsolete */
52 #define	UIOSEG_KERNEL	1		/* obsolete */
53 
54 #endif	/*!_sys_uio_h*/
55