Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/uio.h
Show First 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | struct uio { | ||||
int uio_iovcnt; /* length of scatter/gather list */ | int uio_iovcnt; /* length of scatter/gather list */ | ||||
off_t uio_offset; /* offset in target object */ | off_t uio_offset; /* offset in target object */ | ||||
ssize_t uio_resid; /* remaining bytes to process */ | ssize_t uio_resid; /* remaining bytes to process */ | ||||
enum uio_seg uio_segflg; /* address space */ | enum uio_seg uio_segflg; /* address space */ | ||||
enum uio_rw uio_rw; /* operation */ | enum uio_rw uio_rw; /* operation */ | ||||
struct thread *uio_td; /* owner */ | struct thread *uio_td; /* owner */ | ||||
}; | }; | ||||
#define HAVE_UBOP | |||||
asomers: Where is the matching #endif ? And what defines HAVE_UBOP? | |||||
enum uio_bio_flags { | |||||
UIO_BIO_ERROR = 1 << 0, | |||||
UIO_BIO_SPARSE = 2 << 0, | |||||
}; | |||||
Not Done Inline ActionsWhat are the UIO_BIO_USER, UIO_BIO_PREEMPTED, and UIO_BIO_SG flags for? asomers: What are the UIO_BIO_USER, UIO_BIO_PREEMPTED, and UIO_BIO_SG flags for? | |||||
struct uio_bio { | |||||
uint8_t uio_cmd; /* operation */ | |||||
uint8_t uio_error; /* Errno for UIO_ERROR. */ | |||||
uint16_t uio_ma_cnt; /* length of scatter/gather list */ | |||||
uint16_t uio_flags; /* General flags */ | |||||
off_t uio_ma_offset; /* offset in to page list */ | |||||
off_t uio_offset; /* offset in target object */ | |||||
uint32_t uio_resid; /* remaining bytes to process */ | |||||
struct thread *uio_td; /* owner */ | |||||
void (*uio_bio_done)(struct uio_bio *); | |||||
void *uio_arg; | |||||
struct vm_page **uio_ma; /* user buffer's pages */ | |||||
}; | |||||
/* | /* | ||||
* Limits | * Limits | ||||
* | * | ||||
Not Done Inline ActionsWould it be preferrable to make the field off_t if we want to support 64bit operation length with DELETE operation on 32bit platform potentially? khng: Would it be preferrable to make the field off_t if we want to support 64bit operation length… | |||||
Not Done Inline Actions
Unfortunately, what I said above sounds quite impossible, since our current aio interface use ssize_t for length also. khng: > Would it be preferrable to make the field off_t if we want to support 64bit operation length… | |||||
* N.B.: UIO_MAXIOV must be no less than IOV_MAX from <sys/syslimits.h> | * N.B.: UIO_MAXIOV must be no less than IOV_MAX from <sys/syslimits.h> | ||||
* which in turn must be no less than _XOPEN_IOV_MAX from <limits.h>. If | * which in turn must be no less than _XOPEN_IOV_MAX from <limits.h>. If | ||||
* we ever make this tunable (probably pointless), then IOV_MAX should be | * we ever make this tunable (probably pointless), then IOV_MAX should be | ||||
* removed from <sys/syslimits.h> and applications would be expected to use | * removed from <sys/syslimits.h> and applications would be expected to use | ||||
* sysconf(3) to find out the correct value, or else assume the worst | * sysconf(3) to find out the correct value, or else assume the worst | ||||
* (_XOPEN_IOV_MAX). Perhaps UIO_MAXIOV should be simply defined as | * (_XOPEN_IOV_MAX). Perhaps UIO_MAXIOV should be simply defined as | ||||
* IOV_MAX. | * IOV_MAX. | ||||
*/ | */ | ||||
Show All 11 Lines | |||||
int copyout_unmap(struct thread *td, vm_offset_t addr, size_t sz); | int copyout_unmap(struct thread *td, vm_offset_t addr, size_t sz); | ||||
int physcopyin(void *src, vm_paddr_t dst, size_t len); | int physcopyin(void *src, vm_paddr_t dst, size_t len); | ||||
int physcopyout(vm_paddr_t src, void *dst, size_t len); | int physcopyout(vm_paddr_t src, void *dst, size_t len); | ||||
int physcopyin_vlist(struct bus_dma_segment *src, off_t offset, | int physcopyin_vlist(struct bus_dma_segment *src, off_t offset, | ||||
vm_paddr_t dst, size_t len); | vm_paddr_t dst, size_t len); | ||||
int physcopyout_vlist(vm_paddr_t src, struct bus_dma_segment *dst, | int physcopyout_vlist(vm_paddr_t src, struct bus_dma_segment *dst, | ||||
off_t offset, size_t len); | off_t offset, size_t len); | ||||
int uiomove(void *cp, int n, struct uio *uio); | int uiomove(void *cp, int n, struct uio *uio); | ||||
int uiobiomove(void *cp, int n, struct uio_bio *uio); | |||||
int uiomove_frombuf(void *buf, int buflen, struct uio *uio); | int uiomove_frombuf(void *buf, int buflen, struct uio *uio); | ||||
int uiomove_fromphys(struct vm_page *ma[], vm_offset_t offset, int n, | int uiomove_fromphys(struct vm_page *ma[], vm_offset_t offset, int n, | ||||
struct uio *uio); | struct uio *uio); | ||||
int uiomove_nofault(void *cp, int n, struct uio *uio); | int uiomove_nofault(void *cp, int n, struct uio *uio); | ||||
int uiomove_object(struct vm_object *obj, off_t obj_size, struct uio *uio); | int uiomove_object(struct vm_object *obj, off_t obj_size, struct uio *uio); | ||||
#else /* !_KERNEL */ | #else /* !_KERNEL */ | ||||
Show All 12 Lines |
Where is the matching #endif ? And what defines HAVE_UBOP?