#include <sys/types.h> #include <sys/uio.h>
int uiomove(caddr_t address, long nbytes, enum uio_rw rwflag, uio_t *uio_p);
Architecture independent level 1 (DDI/DKI).
The uio_segflg member of the uio(9S) structure determines the type of space to or from which the transfer is being made. If it is set to UIO_SYSSPACE , the data transfer is between addresses in the kernel. If it is set to UIO_USERSPACE , the transfer is between a user program and kernel space.
rwflag indicates the direction of the transfer. If UIO_READ is set, the data will be transferred from address to the buffer(s) described by uio_p . If UIO_WRITE is set, the data will be transferred from the buffer(s) described by uio_p to address.
In addition to moving the data, uiomove() adds the number of bytes moved to the iov_base member of the iovec(9S) structure, decreases the iov_len member, increases the uio_offset member of the uio(9S) structure, and decreases the uio_resid member.
This function automatically handles page faults. nbytes does not have to be word-aligned.
User context only, if uio_segflg is set to UIO_USERSPACE . User or interrupt context, if uio_segflg is set to UIO_SYSSPACE .
If uio_segflg is set to UIO_SYSSPACE and address is selected from user space, the system may panic.