vm_move Kernel Service

Purpose

Moves data between a virtual memory object and a buffer specified in the uio structure.

Syntax

#include <sys/types.h>
#include <sys/errno.h>
#include <sys/vmuser.h>
#include <sys/uio.h>

int vm_move (vmid, offset, limit, rw, uio)
vmid_t  vmid;      
caddr_t  offset;    
int  limit;        
enum uio_rw  rw;  
struct uio * uio;      

Parameters

Item Description
vmid Specifies the virtual memory object ID.
offset Specifies the offset in the virtual memory object.
limit Indicates the limit on the transfer length. If this parameter is negative or 0, no bytes are transferred.
rw Specifies a read/write flag that gives the direction of the move. The possible values for this parameter (UIO_READ, UIO_WRITE) are defined in the /usr/include/sys/uio.h file.
uio Points to the uio structure.

Description

The vm_move kernel service moves data between a virtual memory object and the buffer specified in a uio structure.

This service determines the virtual addressing required for the data movement according to the offset in the object.

The vm_move kernel service is similar to the uiomove kernel service, but the address for the trusted buffer is specified by the vmid and offset parameters instead of as a caddr_t address. The offset size is also limited to the size of a caddr_t address since virtual memory objects must be smaller than this size.

Note: The vm_move kernel service does not support use of cross-memory descriptors.

I/O errors for paging space and a lack of paging space are reported as signals.

Execution Environment

The vm_move kernel service can be called from the process environment only.

Return Values

Item Description
0 Indicates a successful operation.
EFAULT Indicates a bad address.
ENOMEM Indicates insufficient memory.
ENOSPC Indicates insufficient disk space.
EIO Indicates an I/O error.

Other file system-specific errno global variables are returned by the virtual file system involved in the move function.