]> git.proxmox.com Git - mirror_spl-debian.git/blob - include/sys/uio.h
Move sunddi include
[mirror_spl-debian.git] / include / sys / uio.h
1 #ifndef _SPL_UIO_H
2 #define _SPL_UIO_H
3
4 #include <linux/uio.h>
5 #include <asm/uaccess.h>
6 #include <sys/types.h>
7
8 typedef enum uio_rw {
9 UIO_READ = 0,
10 UIO_WRITE = 1,
11 } uio_rw_t;
12
13 typedef enum uio_seg {
14 UIO_USERSPACE = 0,
15 UIO_SYSSPACE = 1,
16 UIO_USERISPACE =2,
17 } uio_seg_t;
18
19 typedef struct uio {
20 struct iovec *uio_iov; /* pointer to array of iovecs */
21 int uio_iovcnt; /* number of iovecs */
22 offset_t uio_loffset; /* file offset */
23 uio_seg_t uio_segflg; /* address space (kernel or user) */
24 uint16_t uio_fmode; /* file mode flags */
25 uint16_t uio_extflg; /* extended flags */
26 offset_t uio_limit; /* u-limit (maximum byte offset) */
27 ssize_t uio_resid; /* residual count */
28 } uio_t;
29
30 typedef struct aio_req {
31 uio_t *aio_uio; /* UIO for this request */
32 void *aio_private;
33 } aio_req_t;
34
35 /* XXX: Must be fully implemented when ZVOL is needed, for reference:
36 * http://cvs.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/os/move.c
37 */
38 #if 0
39 static __inline__ int
40 uiomove(void *p, size_t n, enum uio_rw rw, struct uio *uio)
41 {
42 return 0;
43 }
44 #endif
45
46 #endif /* SPL_UIO_H */