Moves a block of data between kernel space and a space defined by a uio structure.
#include <sys/types.h> #include <sys/errno.h> #include <sys/uio.h>
int uiomove ( cp, n, rw, uiop)
caddr_t cp;
int n;
uio_rw rw;
struct uio *uiop;
The uiomove kernel service moves the specified number of bytes of data between kernel space and a space described by a uio structure. Device driver top halves, especially character device drivers, frequently use the uiomove service to transfer data into or out of a user area. The uio_resid and uio_iovcnt fields in the uio structure describing the data area must be greater than 0 or an error is returned.
The uiomove service moves the number of bytes of data specified by either the n or uio_resid parameter, whichever is less. If either the n or uio_resid parameter is 0, no data is moved. The uio_segflg field in the uio structure is used to indicate if the move is accessing a user- or kernel-data area, or if the caller requires cross-memory operations and has provided the required cross-memory descriptors. If a cross-memory operation is indicated, there must be a cross-memory descriptor in the uio_xmem array for each iovec element.
If the move is successful, the following fields in the uio structure are updated:
The uiomove kernel service can be called from the process environment only.
0 | Indicates successful completion. |
-1 | Indicates that an error occurred for one of the following conditions: |
The uphysio kernel service, ureadc kernel service, uwritec kernel service.
The uio structure.
Memory Kernel Services in AIX 5L Version 5.2 Kernel Extensions and Device Support Programming Concepts.