Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ uiomove(D3DK) — Motorola System V 88k Release 4 Version 4.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

uiomove(D3DK)  —  

NAME

uiomove − copy data using uio(D4DK) structure .IX \f4uiomove\fP(D3DK)

SYNOPSIS

#include <sys/types.h>
#include <sys/uio.h>
int uiomove(caddr_t addr, long nbytes, uio_rw_t rwflag, uio_t ∗ uiop);

ARGUMENTS

addrSource/destination kernel address of the copy. 

nbytesNumber of bytes to copy. 

rwflagFlag indicating read or write operation.  Possible values are UIO_READ and UIO_WRITE. 

uiopPointer to the uio structure for the copy. 

DESCRIPTION

The uiomove function copies nbytes of data between the kernel address addr and the space defined by the uio structure pointed to by uiop.  If rwflag is UIO_READ, the data is copied from addr to the space described by the uio structure.  If rwflag is UIO_WRITE, the data is copied from the space described by the uio structure to addr. 

The 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(D4DK) structures to reflect the copy (uio_offset and iov_base are increased by nbytes and uio_resid and iov_len are decrease by nbytes). 

RETURN VALUE

uiomove returns 0 on success or an error number on failure.  If a partial transfer occurs, the uio structure is updated to indicate the amount not transferred and an error is returned. 

LEVEL

Base only if uio_segflg is set to UIO_USERSPACE.  Base or interrupt if uio_segflg is set to UIO_SYSSPACE. 

NOTES

May sleep if uio_segflg is set to UIO_USERSPACE. 

Driver-defined basic locks and read/write locks may be held across calls to this function if uio_segflg is UIO_SYSSPACE but may not be held if uio_segflg is UIO_USERSPACE. 

Driver-defined sleep locks may be held across calls to this function regardless of the value of uio_segflg. 

When holding locks across calls to this function, 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. 

If addr specifies an address in user space, or if the value of uio_segflg is not consistent with the type of address space described by the uio structure, the system can panic. 

SEE ALSO

bcopy(D3DK), copyin(D3DK), copyout(D3DK), ureadc(D3DK), uwritec(D3DK), iovec(D4DK), uio(D4DK)

DDI/DKI

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026