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

xmdetach Kernel Service

Purpose

Detaches from a user buffer used for cross-memory operations.

Syntax

#include <sys/types.h>
#include <sys/errno.h>
#include <sys/xmem.h>
int xmdetach (dp)
struct xmem *dp;

Parameter

dp Points to a cross-memory descriptor initialized by the xmattach kernel service.

Description

The xmdetach kernel service informs the kernel that a user buffer can no longer be accessed. This means that some previous caller, typically a device driver bottom half or a kernel process, is no longer permitted to do cross-memory operations on this buffer. Subsequent calls to either the xmemin or xmemout kernel service using this cross-memory descriptor result in an error return. The cross-memory descriptor is set to dp->aspace_id = XMEM_INVAL so that the descriptor can be used again. "Cross Memory Kernel Services" in Memory Kernel Services in AIX Kernel Extensions and Device Support Programming Concepts describes how the cross-memory kernel services use cross-memory descriptors.

Execution Environment

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

Return Values

XMEM_SUCC Indicates successful completion.
XMEM_FAIL Indicates that the descriptor was not valid or the buffer was not defined.

Implementation Specifics

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

Related Information

The xmattach kernel service, xmemin kernel service, xmemout kernel service.

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


[ Previous | Next | Contents | Home | Search ]