|
|
#include <sys/types.h> #include <sys/uio.h> #include <sys/ddi.h>int uiomove(void * addr, long nbytes, uio_rw_t rwflag, uio_t *uiop);
uio_segflg
member of the uio structure
specifies the type of space described by
the uio structure.
If uio_segflg
is set to UIO_SYSSPACE,
the uio structure
describes a portion of the kernel address space.
If uio_segflg
is set to UIO_USERSPACE,
the uio structure
describes a portion of the user address space.
If the copy is successful,
uiomove( )
updates the appropriate members
of the uio and
iovec(D4)
structures to reflect the copy:
(uio_offset
and iov_base
are increased
by nbytes and
uio_resid
and iov_len
are decreased
by nbytes).
uio_segflg
is set to UIO_USERSPACE.
Non-blockable, interrupt, user, or blockable
context
if uio_segflg
is set to UIO_SYSSPACE.
uio_segflg
is not consistent
with the type of address space described by
the uio structure, the system can panic.
When holding locks across calls to this function, multithreaded drivers must be careful to avoid creating a deadlock. During the data transfer, page fault resolution might result in another I/O to the same device. For example, this could occur if the driver controls the disk drive used as the swap device.