[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Kernel and Subsystems Technical Reference, Volume 1

xmemout Kernel Service

Purpose

Performs a cross-memory move by copying data from kernel global memory to a specified address space.

Syntax

#include <sys/types.h>
#include <sys/errno.h>
#include <sys/xmem.h>
int xmemout (kaddr, uaddr, count, dp)
caddr_t *kaddr;
caddr_t *uaddr;
int count;
struct xmem *dp;

Parameters

kaddr Specifies the address in kernel memory.
uaddr Specifies the address in memory specified by a cross-memory descriptor.
count Specifies the number of bytes to copy.
dp Specifies the cross-memory descriptor.

Description

The xmemout kernel service performs a cross-memory move. A cross-memory move occurs when data is moved to or from an address space other than the address space that the program is executing in. The xmemout kernel service copies data from kernel global memory to the specified address space.

The xmemout kernel service is provided so that kernel processes and interrupt handlers can safely access a buffer within a user process. Calling the xmattach kernel service prepares the user buffer for the cross-memory move.

The xmemout kernel service differs from the copyin and copyout kernel services in that it is used to access a user buffer when not executing under the user process. In contrast, the copyin and copyout kernel services are only used to access a user buffer while executing under the user process.

Execution Environment

The xmemout kernel service can be called from either the process or interrupt environment.

Return Values

XMEM_SUCC Indicates successful completion.
XMEM_FAIL Indicates one of the following errors:
  • The user does not have the appropriate access authority for the user buffer.
  • The user buffer is located in an address range that is not valid.
  • The segment containing the user buffer has been deleted.
  • The cross-memory descriptor is not valid.
  • A paging I/O error occurred while the user buffer was being accessed.

    If the user buffer is not in memory, the xmemout service also returns an XMEM_FAIL error when executing on an interrupt level.

Implementation Specifics

The xmemout kernel service is part of Base Operating System (BOS) Runtime.

Related Information

The xmattach kernel service, xmdetach kernel service, xmemin kernel service.

Cross Memory Kernel Services and Memory Kernel Services in AIX Kernel Extensions and Device Support Programming Concepts.


[ Previous | Next | Contents | Home | Search ]