DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SCO OpenServer

iomove(D3oddi)


iomove -- move data to/from the user/kernel area

Synopsis

#include <sys/buf.h>
#include <sys/types.h>
#include <sys/user.h>

void iomove(caddr_t cp, int n, int flag);

Description

The iomove( ) function provides a convenient interface to the routines copyin(D3oddi), copyout(D3oddi), and bcopy(D3oddi). It copies bytes between kernel virtual addresses, and between a kernel virtual address and a user virtual address. In this respect it is very similar to copyio(D3oddi) except that, as a side effect, the user area members u.u_base, u.u_offset, and u.u_count are updated by the number of bytes copied.

Arguments


cp
Base virtual address of the area to be copied to or from.

n
Number of bytes to copy.

flag
The direction of the transfer. Valid values are:

B_WRITE
Copy n bytes of data starting at the base address given by cp to the address given by u.u_base.

B_READ
Copy n bytes of data starting at the base address given by u.u_base to the address given by cp.

Return values

No value is returned. However, note the following side effects:

Usage

The value of the u.u_segflg member of the u-area is set to specify the data spaces accessed in the transfer, as follows:


0
Between user data space and kernel data space.

1
Within kernel data space.

2
Between user instruction space and kernel data space.

Context and synchronization

User context.

Hardware applicability

All

Version applicability

oddi: 1, 2, 2mp, 3, 3mp, 4, 4mp, 5, 5mp, 6, 6mp

SVR5 DDI compatibility

DDI drivers can use the uiomove(D3) function in place of iomove( ). uiomove( ) has syntactical differences and uses the uio(D4) structure.

References

bcopy(D3oddi), copyin(D3oddi), copyio(D3oddi), copyout(D3oddi)

``Data, copying'' in HDK Technical Reference


19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 5 HDK - June 2005